Rooms, 3D arrays, etc.
michael at sparta.mainstream.net
Sun May 25 09:28:32 New Zealand Standard Time 1997
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.
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
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.
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:
Where W= water
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?
Michael Hohensee michael at mainstream.net
Any code of your own that you haven't looked at for six or more
months, might as well have been written by someone else. (Eagleson is
an optimist, the real number is more like three weeks.)
More information about the MUD-Dev