View Single Post
Old 09-09-2007, 02:14 PM   #5
chaosprime
Member
 
Join Date: Jul 2007
Home MUD: Lost Souls
Posts: 199
chaosprime will become famous soon enough
Thumbs up Re: Rooms and links between rooms

That's interesting. I don't think separating rooms from exits (nodes from vertices) is going to benefit you for building purposes -- having one guy making the rooms in a maze and the other connecting the dots is not going to turn out well -- but I can think of considerable technical benefit.

See, with the usual room model, exits aren't necessarily constrained to be orthogonal (an orthogonal exit is one where, if there's an exit north from room A leading to room B, there is also an exit south leading from room B to room A), and if you want to attach any behavior to the linkage between the rooms, you have to do it on each side separately, because the linkage isn't modeled as a thing in itself.

So, in the usual model, if the exit from room A to room B above is one that could only be used if you can fly, that condition has to be defined separately for room A and room B. And if you want, say, doors modeled as full objects, you wind up with twin versions of the door on the two "sides" of the exit, which can be a pain. Some operations wind up such that you have to query room A for information about the exit and then room B for information about its reciprocal exit; again, a pain.

Modeling the linkage between the rooms as a thing in itself would allow all concerns like that to be managed in one place. If passing between room A and room B requires you to be able to fly, that's one setting in one place, which is just plain better design.
chaosprime is offline   Reply With Quote