[DGD] Rooms implementation

Colin Coghill mugginsm at under-the-fridge.com
Wed Jan 15 06:05:29 CET 2003


On Tuesday, January 14, 2003, at 03:39  AM, Stephen Schmidt wrote:
>  Muds have always been oriented
> by exits and they just don't work well for a true spacial
> orientation, though I guess DGD would work better than any
> other since you could re-implement the physical concepts at
> a lower level.
>

A feature I'm trying to implement at the moment is "go to x,y,z 
coordinate",
with it's companion "give rough distance and direction to object o"

This should allow all sorts of fun - location spells, trebuchets, 
ranged teleport,
all that kind of stuff.

I'm currently managing it by breaking the world into "zones", each with 
a set of
points setting the area in the global co-ordinate system that the zone 
occupies.
I'm just doing rectangles at the moment, but obviously this could be 
extended to
polygons.

Inside the zones are, basically, an array of rooms with coordinates 
relative
to the zone center. This allows zones to be moved around or rehomed 
without
having to redo all the room coordinates in them.

A bit of fudging (easy with rectangular or circular zones) allows a 
pretty good guess
at which room object is nearest to location "x,y,z".

It does mean tracking x,y,z coords for every room, but that's 
surprisingly not all
that painful as long as it's all relative to the zone it's in. No need 
to synchronise scales between different builders/zones - that's all 
taken care of.

- Muggins the Mad

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list