View Single Post
Old 09-09-2007, 09:52 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
Re: Rooms and links between rooms

The approach used by the majority of muds is for each room to store a list of exits, each of which contains the room number to which it links. Thus room 1 might have an exit for "north" leading to room 2, an exit for "south" leading to room 3, and so on.

Other muds use alternative approaches - for example, some don't use exits but instead assign each room a coordinate position, and moving to that coordinate position will then move you to the appropriate room.

Personally I'd recommend downloading a few codebases and taking a look how they work. Whether the mud is Object Oriented or not shouldn't make any difference in regards to the way rooms are linked.
KaVir is offline   Reply With Quote