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

Nathan Yospe yospe at hawaii.edu
Fri May 30 11:32:19 CEST 1997


On Thu, 29 May 1997, Raz wrote:

:On Tue, 27 May 1997 08:19:34 PST8PDT, Nathan wrote:

:> :I'm very taken with the idea of a system which *never* replies "You can't
:> :go that way", but instead either moves you or suggests *why* you can't go
:> :that way, and lets you figure out how to overcome it.
:> 
:> Ah, now we're getting into interesting new thoughts. Um. OK, I've tried to
:> get some degree of this The edges of the approved format area in
                       ^^^^^
:Did something go missing there..?

Yeah. a period. Here it is: '.' (Little bugger was hiding under my
keyboard.)

:> Singularity 2 are essentially randomized repeated landscape types seeded
:> off of the location that continue on indeffinately - or at least, for some
:> 2^31 cm in any given direction.

:Yipe - I'm scared already... =)  Could you explain a couple of concepts for
:me: 'approved format area', and 'randomized repeated landscape types [...]
:that continue on indeffinately'.

Well, approved format means that I have made provisions for exceptions to
that "continue on to the edges of infinity" rule - IF there is a good
reason. So an unapproved format area could, for example, look exactly like
the smurf village in Dikus (to use a particularly repulsive example.)
Complete with the compass direction exits, walls you can't go through,
discreet rooms in the middle of open space... that sort of thing. As for
the randomized repeated landscapes... say you had an unpopulated desert
world. There are three types of nonunique features... sand dunes, oasises,
and craggy rocks. You have a percentage chance for each type, which is
decided by a positional check for the node at the center of that region.
Descriptions are assembled out of a file of partial descriptions for the
region. These regions can continue to an area approximately the size of a
continent. No one is going to be able to get to the end, unless they are
really stubborn. When they get there... well, they are simply wrapped back
a few dozen kilometers to the next reasonable match and recycled. If they
are really persistant, they might find the evidence of this... after
putting in enough effort at exploration that I think they deserve the
reward of seeing through the illusion.

:If I understand it right, your system has no pre-defined 'world', prior to
:actually booting the game?  Seeding on locations would mean that it'll be
:the same world each time, yes, but, basically, its fractal generated?

Only in the undefined regions. These are not just boundary regions... you
could have a randomized forest completely surrounded by defined road or
city... and fractally generated is not entirely accurate. Fractal
generation works better for graphics than text, as the theory is
repetition of a set of rules on an infinitely decreasing scale... which,
it turns out, makes perfect forest and rock detail textures.

:> Other than that... well, you
:> can blow down walls, dig through ground, fly over obstacles, dive under
:> water... I think I've pretty well got the basis of the kind of system you
:> are suggesting.

:Yep, that's precisely the sort of thing I'm going for.  Incidentally, do
:you have some notion of an obsticle players can't dig down through,
:assuming they could even get that deep?  How deep does your coordinate
:system go..?  Do you allow tunnels to be dug underground, etc?

Yeah, occasionally you run into "collapsed matter", the only substance I
have defined as "undamageable by any means save enough antimatter to
delete an entire planet from the database". But seriously... if it comes
down to it, that ground goes down some 1000 kilometers. And if you hit the
boundary of "bedrock", you don't wrap back... you end up swimming in
magma. Not that I expect it to ever happen.

:> Unfortunately, it does depend of the diligence of
:> builders. Walls and ground default to concrete and bedrock, etc, etc, etc.

:Hmm, so its a matter of defining a list of known element types and
:properties...  They always give me the feeling that I'm missing certain
:terribly important items from them =)

Well, they can always be added. Its not like a recompile is needed to add
a new material type, or structure type. And I have a database of a few
thousand materials at this point.

:> :Working from memory, the closest I got to any kind of system before
:> :concentrating on other things ran something like this:

:> :You have a 2D matrix of abritrary dimensions - this is 'World', your game
:> :world.  (Yes, obviously 3D makes more sense, but that led to problems I
:> :couldn't overcome at the time =))

:> 2D of arbritrary dimensions... I'm sure I'm missing something here...

:Probably my 'imaginative' grasp of terminology =)  I just mean that it
:doesn't make any difference what dimensions the matrix has; it's up the
:implementor.

Ah. So you mean a tensor of rank two of arbritrary dimensions as opposed
to a 2x2 matrix (the standard meaning of 2D matrix). (Tensor of rank 2
means a "matrix", tensor of rank one is a vector, rank zero is a scalor
(number), rank 3 would have 2x2x2 worth... the reason a 2x2 is considered
a 2D matrix is that you can represent any transformation in two dimensions
with one of them. A vector of length 2 can represent any 2D coordinate.
Using a matrix of arbritrary dimension to store data is scary. Gobbles
space at an unbelievable rate. Storing things in terms of their
coordinates is all well and good, but you end up with a lot of wasted
space. And a lot of unneeded copying. Better off storing things in local
lists and checking their coordinates for collision detection.

:> :Space sizes was another thing I wanted to take further.  Spaces shouldn't
:> :really be all of a fixed size, but ig explicit Spaces were allowed to be of
:> :differing sizes, how does the system reasonably try to fit virtual Spaces
:> :around them?  [...]

:> OK, here is how I handled this: rather than turning X degrees, you turn
:> "toward" a destination. You are evaluated in terms of your current 3D
:> coordinates, but everything in the region of a node is still stored in a
:> list.

:Mmm, the mechanics are kinda over my head to be honest =), unless you want
:to elaborate on the functions of your nodes and lists.

Well, its like this: you have your coordinates, and there is a tree off in
the distance to your right. You type "run tree", and your movement is
scheduled as a collidable event (which is checked in 4D for any
collisions... in other words, if an anvil falls, it has to check to see if
your head will be right under it when it lands) and you start moving for
the tree at a run. Now, the tree might have been 27.85 degrees to your
right and 34.6 meters away... but do you really want to have to deal with
that? You could, of course, have turned "a tiny bit to the right" which is
about ten degrees, or "a little bit ..." (20) of "a bit..." (30) The
gradations are only exact in an open field with nothing to orient toward.
You tend to face things, as much as possible.

:However, this is a *very* nice system, I think.  If I understand correctly,
:it's pretty much as close to a 'free form walkabout' system as text can
:provide, and I'd guess it wouldn't require much tinkering with your
:node/list system to plug its out put into a graphical client and, hey
:presto, multiuser Daggerfall =)

*grin* Very perceptive. Though, I've got inlined dataform IO that would
allow joystick control...

:The only thing that stops me designing (okay, attempting to design) a
:similar system is that it gives me the heebie-jeebies to move to a system
:with no compass movement, and no easy-to-picture discreet spaces =)  Well,
:not *me*, rather, my players.  Yep, I *know* that you've got to design the
:game *you* want, but what I think is also an important consideration for me
:is that I want to design a game which I will enjoy watching other people
:play...  I don't know whether a text-based game of this nature will be too
:alien... they'll see a text-based multiuser game, and they'll think MUD;
:and then try walking north.

And they'll get a message "You pat your pockets, but you don't seem to
have brought yourself a compass. The sun is off to the right... is it
morning? Maybe North is behind you. You turn around and walk into a tree."
Well, maybe not. But its a reasonable occurance.

:Thinking about it, I suppose it wouldn't be hard to keep compass movement
:active; just make such a command move you a set distance in the specified
:direction, having re-oriented the direction in which you face, then carry
:on as normal.

OK, so now the guy has his compass...
"Your eye on the compass needle, you begin walking north. Suddenly, you
bump into something warm, smelly, and furry. Hot air carresses the back of
your neck, and you look up the front of an angry demigrizzly."

:> :Towns and cities were a major headache.  Back alleys, houses and gardens,
:> :walls that could be climbed over or broken down made me cry; images of
:> :players with ropes and grapples swarming over guildhouses and Crocodile
:> :Dundee'ing their way through a top floor window haunted my dreams.

:> I love these sorts of things.

:I love 'em too - I just hate having to design a system that caters for
:them!  Out of interest, assuming Singularity 2 was fantasy genre, does your
:system support the above actions?

Sure thing. It allows them in sci-fi too. Sometimes the low tech solution
is the best.

:> :Anyway that's what I had and how I was going, and why I put it firmly on
:> :the back burner =)  Recently though, after telling myself I was going to
:> :forget the whole thing, I've started thinking about it again.  I've thought
:> :that a possible answer, at least to the towns problem, would be some kind
:> :of 'structure' object, which would be dropped into a Zone and mark off the
:> :size and rough shape of any particular, well, structure.

:> I still do have "rooms" for this very purpose. (Well, that and aesthetics.
:> I think getting a room described in its entirety is appropriate, while a
:> field only describes what is in front of you, witha  speed narrowed cone
:> of vision.

:Ahh, I see now (I was a little puzzled earlier as to whether your system
:provided these 'explicit Spaces'; a discreet space with pre-defined text
:written by a builder).  Do you keep compass movement inside structures, or
:use, perhaps, a 'face door on the right; walk through door' sort if thing?

Default is the latter, but you can always describe an exit as "the north
exit", which means "north" heads for that exit... and these discreet
descriptions are possible in fields too. Just takes a little more thought
to do it. I think I've posted a few dozen clips over the time I've been
here. Are those archives available yet?

:> :The structure wouldn't care about what was inside it, we'd sort that out
:> :with additional Spaces... hmm, which I suppose would need to be tied to the
:> :Structure in some way...  In fact this would seem to describe a general
:> :'container'.  Castles and beltpouches really of the same ilk..? =)

:> Mine are. =) After all, an imp's castle is a giant's shot glass.

:Indeed, indeed.  The nice thing about 'object orienting' the game (*not* in
:the programming sense) is that it allows all sorts of cool things like
:miniaturisation of beings, putting them in containers that others can carry
:around, having entire buildings that could be moved around (assuming you
:don't make them crumble in the attempt), and so on.

Best one I've ever come across was the whaleworld someone designed... a
lifeform the size of a small planet, with atmosphere and all... giant
black sunlight and magnetism eater, with its own populace. Took a bit of
work to link the locations into the room system so that the threading and
event system could work properly... something I hadn't expected came
along, and I had to improve my model... but we ended up with a Character
(and I switched into its body once, just to try it) that was also an
entire area. With some occasional interesting quakes.
 
:> :Oh yeah... castles... ick.  Model a castle...

:> *grin* Don't worry, it'll come to you. (I use composite rooms of variant
:> dimensions.)

:But its so *hard*! =)  Take a castle with an open courtyard, for example...
:or with Royal gardens at its centre.  That's open, outdoor space, *within*
:the structure object!  Yeep.  But then, my head is still mired in 2D and 3D
:matrices which, as I've discovered, aren't really suited to this free
:roaming sort of system...

Nope. What you do, see, is define the dimensions of everything, and tie it
together at the edges. That way, hammering down some wall might have you
falling out into the courtyard... or the moat.

:> Speaking of which.... if I was incoherent, blame it on lack of sleep.

:Cool, I don't have to blame my own ignorance now - thanks! ;)

*grin*
   __    _   __  _   _   ,  ,  , ,  
  /_  / / ) /_  /_) / ) /| /| / /\            First Light of a Nova Dawn
 /   / / \ /_  /_) / \ /-|/ |/ /_/            Final Night of a World Gone
Nathan F. Yospe - University of Hawaii Dept of Physics - yospe at hawaii.edu




More information about the mud-dev-archive mailing list