View Single Post
Old 05-13-2003, 04:26 AM   #2
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
A dynamic description cannot be generated from nothing. In the case of hand-written dynamic descriptions, the content of those descriptions is already there - the builder just uses variables and conditional checks within the descriptions. For automated dynamic descriptions, far lessinformation is needed, but you do need to know some (even if that information itself was previously generated).

The approach I used in my old Diku derivative was to assign 32 bits of data to each room. That included a "room type" (one of 512 possibilities, including several indoor rooms), walls, doors, etc. That information, combined with the surroundings, was used to determine what should be in the descriptions.

In a true coordinate-based mud, where there are no rooms, you'd probably want to generate the description from the surrounding objects. So yes, for a building that would mean actually having a "building" object which could be entered, and using its data (material, size, etc) to generate the descriptions. Within the building you might well have individual rooms, each of which are additional objects containing data about themselves (room type "hallway", "alcove", etc)
KaVir is offline   Reply With Quote