[MUD-Dev] Re: Overworld Maps on diku style Muds- Design notes
Richard Woolcock
KaVir at dial.pipex.com
Wed Jul 22 01:22:14 CEST 1998
Katrina McClelan wrote:
>
> Not sure how many of you will find this useful, but this is my peliminary
> design for adding a coordinate based overworld to co-exist with standard
> diku style rooms, taking advantages from both world design methods.
[snip]
> a) Coordinate World
>
> The coordinate world, would be divided into square terain sectors. Each
> Sector Grid would have it's own table of encounters. Also each sector
> grid would have a localized list of 'objects' (programming term, not
> swords) that one might see. The world would be (MAX_X by MAX_Y by 2) (the
> z dimension is either ground level or sky level)
Ground, sky...what about underground/water (drow city? atlantis?)...
[snip]
> b) Static Zones (Land Marks)
>
> No way we can avoid having major cities, and places like Myth Drannor.
> Zones would have 5 bounding boxes (coordinates of top, left, right, and
> bottom) These boxes would determine:
>
> i) entrance area
> ii) visibility radius from the ground in daylight
> iii) visibility radius from the ground at night
> iv) visibility radius from the air in daylight
> v) visibility radius from the air at night
>
> Additionally, a zone would have 6 defined entry points:
>
> i) entry from the north
> ii) entry from the south
> iii) entry from the east
> iv) entry from the west
> v) entry from above
> vi) entry by surprise
vii) entry from below ;)
[snip]
> d) Dummy Rooms
>
> On the overworld grid, there will be "floating" rooms to contain wandering
> players. This is to simplify the problem of displaying messages to the 6
[snip]
> want mobs to appear, place them in an encounter. I haven't quite decided
> how best to handle an item dropped in the middle of nowhere. Prolly idle
> out the dummy room it leaves, and it gets "picked up by a some wandering
> beast" (ie destroyed by the god of Anti-Clutter) when the room disappears.
My first attempt at this was a very simplified version of what you describe.
It was simply a 1000x1000 2D map, each room of which could be either a sort
of 'wilderness' room, or a link to an area. It took an entire weekend to
code, and I started rewriting again it within a week because I found it too
restricting.
My current method is a 5120x5120x40 3D map, each room of which can be one of
512 different types OR have a static room mapped over the top of it. I don't
have EXIT_DATA - instead, each room can contain doors, walls and various other
room-specific things. Suppose I wanted to stick your "Myth Drannor" city into
the mud... Instead of putting the whole area at a specific location, I would put
down each individual room, add any walls or doors, and the surrounding rooms
(the air above, earth below, etc) would already be in place.
The main downside with this is that my system doesn't allow overlapping rooms,
and it assumes that every room is the same size. In addition you would have to
'buffer' empty locations with rooms of some sort...for example if you had a city
layout which looked like:
[1]--[2]--[3]--[4]
| | |
[5]--[6] [7]
| |
[8]--[9]
If you wanted to go south from room 3, most muds would say something like "there
is no exit that way" - well in my mud, there is ALWAYS an exit - although it
could be blocked with walls all around it (but what if someone broke them down?).
Assuming your areas are written specially to cater for this, you shouldn't have
a problem, but if not it *can* start to look a bit odd (if you didn't do anything,
you'd probably end up with an empty room, a patch of plain, or something similiar
behind the wall).
On to your other subject, of objects in the virtual rooms...I got around this by
saving objects as they get dropped, and destroying them as the room gets recycled.
If someone re-enters the room, the objects get loaded back up, automatically
renamed if appropriate (eg corpses become rotting corpses, then rotten corpses,
then skeletons, etc) and placed back into the room. I plan to re-write this part
of the code though, as it's too inefficient by far (and besides, my world is
starting to look like a graveyard, with skeletons and bits of bone everywhere).
One solution I had toyed with in the past was to move the objects out of the rooms
and into a list, so that they could be re-distributed should that room later be
re-entered (perhaps if the objects are not put back into play for a while, they
THEN get saved to disk?).
KaVir.
More information about the mud-dev-archive
mailing list