[MUD-Dev] Rooms, 3D arrays, etc.

Adam Wiggins nightfall at inficad.com
Sun May 25 21:16:03 CEST 1997


[Micheal H:] 
> 	I haven't had much time to read everything that's been posted 
> recently, and I hope I'm being somewhat original, but instead of trying 
> to decide which system to use- diku-style rooms, or a vast 3D array which 
> houses characters, why not use both?
> 	This idea came while i was looking at the areas that I wanted to 
> write for my own MUD.  I wanted to make sea routes, but I couldn't really 
> justify making it so that you have to follow one path.  It's the ocean, 
> after all.  The same thing occurs in large, open plains.
> 	So why not set up such a 3D array, with a default description 
> based on terrain type.  For the rooms that actually get "created", you 
> simply give it a special description.  In this system, "exits" should be 
> replaced by barriers.  In effect, you should be able to go in any 
> direction you please, as long as there isn't something in the way.  The 
> default would be to allow you to change position in the array.

We implemented something almost exactly like what you describe a year ago.
I've been extremely happy with it, although I can hardly claim that the
idea was original - many muds make use of this.  (Lost Souls, AnotherMUD,
and 3M all come to mind.)

> 	Heck, this could get even more interesting if we made it a 4D 
> array.  The standard 3 dimensions you move around in, and the 4th would 
> be time.  It would make time travel an easier thing to deal with.  Ie, 
> Archon goes back in time, and moves two rooms east.  He then comes back 
> to his original time, popping up in the room corresponding with his 
> original position.

Hmmm...interesting, although not something I'm interested in.  One
of the main benefits (to my mind) of going to the grid system was that
all our rooms are forced to have a logical layout.  There's nothing
I abhor more than having north, west take you to a completely different
spot than west, north...especially when the room descs for all four rooms
are "Grassy plains stretch on endlessly..."

> 	This circumvents problems that you currently get with diku-style 
> rooms, in which you'd have to set up some complicated vnum system to keep 
> track of which room in the "future" corresponds to another room in the 
> "past".  Furthermore, you wouldn't have to worry that there isn't a 
> corresponding room, since the array guaruntees it's existance.

Well, the second thing you said is useful even in a 3D world.  Basically,
the grid just fills in rooms that you don't create; it looks in the array
to see if there is a 'real' room associated with that x,y,z coordinate, and
if not, generates a 'room' from data about the terrain, nearby objects or
mobiles, etc.

> 	The only trouble would be to load the original array.  I've been 
> thinking of using a file with a big character map, with each character 
> represtenting each room.  So you could make:
> 
> 	###W######
> 	pppWpppppp
> 	###W######
> 	###WWWWWWW
> 
> Where 	W= water
> 	p= path
> 	#= field.

Ugggh.. we just paint it with a paint program, making an 8 bit PCX file
which is read in directly by the MUD.  (There is two seperate maps - one
for elevation, one for terrain type.)

> Since we've got tons of individual characters to choose from, we could 
> come up with every terrain type we could possibly want.  This would also 
> make it easier to have natural disasters change the terrain, since it 
> would be a simple matter of changing a few characters in the overall map.
> 	Does this sound interesting to anyone?

I'm very happy with our grid system.  At first I was worried that it would
seem like a big, empty space with nothing in it...but being able to write
areas and focus on what's interesting, and not worry about creating long
roads or grassy fields or forests or shorelines or oceans or skies or
long mountainranges is *great*.




More information about the mud-dev-archive mailing list