adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] More on z-values (was: first real map gfx)


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] More on z-values (was: first real map gfx)
Date: 15 Mar 2002 18:18:14 +0100

> I like this too!
> So let me get this straight - a mapobject or character can have a
> Z-offset, which is how many pixles he/she/it is off the ground.
> Optionally objects can have a height which is how thick they are - a
> table might be 28px but a layer of water or a carpet would just be 0. Is
> that right?

Right for the table - but a layer of water should have a height too,
otherwise you won't be able to actually walk into it.

> If so what happens to the old walkability system? I guess non-walkable
> tiles or masks would behave like objects of infinite height from the
> ground upwards (z=0; h=infinite). This would probably be useful for
> walls inside houses where we want to make sure the player has no way to
> accidentally jump over them.

The old walkability system wouldn't change much, but will be extended.
If an object occupies the area you want to walk to, and it's height is
bigger than, say, 5 pixels, it will block you. On the other hand, if you
fall on that object, your own Z offset would change to it's height - so
you'd actually be walking on it. The map engine would test: it there an 
object at my level to support me? Yes: I stand on it. No: I fall until I
reach an object. This is much like in reality, and doesn't involve much
more processing time (which will always be ridiculous compared to
rendering, for instance).

Imagine the consequences of such a thing: map levels could easily (and
cleanly!) be handled by some flat objects placed at the right Z-offset.
Just like in reality! Needless to say, that this implementation blows
out all the ones I've thought of in terms of consistency. This is the
only one where I can't found a case where "this wouldn't work".

> There is one complication I can see with the z stuff though - it gets
> messy when you want to have the ground at different levels. I've
> attached an image to clarify what I mean.
[...]

I might not have understood everything you explained, but I don't see
where the problem is. With a proper map editor, you could say "ok, now
the objects I'm placing will be x pixels height/the same height as this
object". You could ask it not to draw objects higher than x pixels, if
you want to work on lower grounds. This could appear all transparent for
the map designer.

Also, with all the consistency this system would bring, you won't have
to worry about when a character changes it's level, and so on - as
stairs could be handled automatically, provided they have the right
height parameters (1 more pixel per right pixel for instance).

The more I think about it, the more it looks like the right thing to do.
Imagine the consequences during fightings: An archer or wizard could
place himself on a height, safe place to attack without being worried by
standard warriors.

The hardest part would be the map rendering, of course. I don't think it
would cost much more than the current one, provided I can find the good
priorities formulas for objects, considering their Y and Z position.
Will have to think a lot about this.

Are you reassured, James?
Alex.
-- 
http://www.gnurou.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]