Room-based vs. coordinate-based

Alex Oren alexo at bigfoot.com
Mon Jun 2 18:07:46 CEST 1997


Hello.

I have some questions regarding a room-based vs. a coordinate-based MUD issues.


(*) Ease of coding and efficiency.

Room-based seems much more efficient and easier to code.

Coordinate-based will require proximity calculations on almost any activity or
command (in room-based I can just assume that objects inside a "room" container
are close to each other).  Motion, visibility, etc. becomes more complex.


(*) Combat.

Coordinate-based makes ranged attacks, closing-in, retreats, etc. simpler to
implement (any ideas how to handle this in a room-based system?).

Also, consider the following sniplets (in the context of room vs. coordinate):

[JCL:]
} The big reason for this is that I am
} working hard to totally lose the concept of rooms.  As such I actively
} want to support two players fighting who are also seperated by the
} entire width of the land, a couple rooms apart, or right beside each
} other.

[Adam:]
} > notch arrow bow
} You notch a wooden arrow into your bow.
} > shoot north orc
} [Here 'bow' and 'arrow' are already in your list of objects recently accessed]
} You fire a wooden arrow north at the orc.
} > notch
} [Here everything it wishes to know is already in your list...]
} You notch a wooden arrow into your bow.
} > shoot
} [Same thing - it just so happens the orc has moved west.]
} You fire a wooden arrow west at the orc.


(*) Area effects.

How will I handle "Boffo arrives from the north" type of messages?

Room-based (or, rather, "container-based") has an advantage here.  A container
may send messages to the objects it contains.  In a coordinate-based system I
will need to consult a "map" of object locations to determine message
recipients.  Or am I wrong?


(*) Movement.

What will be the difference between "north" and "run north" in a room-based and
a coordinate-based systems?

Coordinate-based systems also seem to imply finer movement granularity
(closing-in for combat vs. walking towards the mountain) and therefore,
additional user commands may be needed to realize this.


Ideas?  Comments?  Implementation algorithms?


Have fun,
Alex.




More information about the mud-dev-archive mailing list