[MUD-Dev] MapMaker
S. Patrick Gallaty
choke at sirius.com
Thu Jul 9 16:54:47 CEST 1998
Warning - code post.
Okay, there's a project I've been working on for 4 years on and
off.. the concept is this :
"Array based virtual map manager with dynamic room object
configuration and automatic garbage collection."
The idea is this - you take a text representation of a 2-d map
and the head_object reads this map in. When someone wants to
enter the map they call a function in the head_object which
includes the x,y location on the map they wish to go.
The map checks to see if an object is in fact loaded into
the managed array of rooms, and if so moves the player into
it with all due move messages.
If there isn't, it goes through a series of complex iterations
to determine the long() of the room based on the surrounding
'rooms' and their calculated appearance so that each room
seems to describe its surroundings and is interesting
and different.
Also, objects on the map that have special properties for
high visibility get included in the long description
for surrounding rooms if they have the right functions
to return their far_short() etc.
For example
You are standing at the edge of the sea. To the west and
north you hear the sound of breaking waves. To the east
you see a grassy plain. To the south you see a sparse
forest.
In the distance to the north you see dark tower.
and the resultant text map to create this virtual room
would be something like :
. . -
. - '
. % %
I am going to port this code to a workmud first, and get
the bugs out of it and then use it on EOTL to fulfill
one of my alltime favorite unfinished projects - which is
a random dungeon a la nethack for LP Mud.
This code came out of a desire to be able to make very
large outdoor areas in a sensible way. I realized that
I could also use it for my other sinister purposes.
The rooms in the map are only created when a player moves
into the room, and expire after a while (definable) and
clean themselves up.
If anyone is interested in a demo, let me know and I'll
take you on a tour of an amusing 1600 room overland map :)
More information about the mud-dev-archive
mailing list