[MUD-Dev] string parsing

Felix A. Croes felix at xs1.simplex.nl
Tue Nov 4 13:25:28 CET 1997


coder at ibm.net wrote:
>[...]
> >If the mud has such object relations as `next to', `on top of' etc, then
> >it makes sense to have syntax rules, and functions to give them meaning,
> >for all of them.
>
> My support for prepositions is currently, err, inelegant and flakey.  I've
> not examined the area in depth, but when I do re-approach it I will want
> the system to be able to analyse the locations of multiple objects and
> determine the applicable prepositions which apply to their positions ("The
> ball and the light are above the table.")  As such the base idea I have
> stashed is to operate off a tuple which defines the class of preposition
> (ie list of terms), and the spatial transformation which defines its
> scope.  This (hopefully) reduces prepositions to a generic form which can
> be both parsed and back-constructed.

I think the difficulty in recognizing such object relations stems from
trying to do everything with a single positional system.

Proposed solution:

Start with a hierarchical container system at its most abstract.  Let
each object have a "position" in its container.  The interpretation of
the position is left to the container.  The position can be a pair of
coordinates meaningful in the plane defined by the room, or a triplet
of coordinates in the 3-D space defined by the room, or
(angle, distance, speed) relative to the room, which is the planet in
whose gravitational field the object resides.

The position could then simply be a string like "inside", "beside" and
"above" to indicate the position relative to the container, without
imposing the same system on the rest of the mud.

Felix Croes



More information about the mud-dev-archive mailing list