Isometric Z-ordering

Blitz3D Forums/Blitz3D Beginners Area/Isometric Z-ordering

slenkar(Posted 2004) [#1]
When Z-ordering do you draw each tile AND its contents, then the next tile,etc.

am I right?


Perturbatio(Posted 2004) [#2]
this might help: http://www.gamedev.net/reference/list.asp?categoryid=44#98


Mark Tiffany(Posted 2004) [#3]
isometric z-ordering in 2d is a pain. There is a very good reason why spindizzy / marble madness player images are small at the bottom...if your player image is wide at it's base, you can have a real headache trying to get the draw order right.

The "correct" draw order also depends a lot on how / whether you have height differences in the game, and also whether you can ever go under a block that you can also go over (i.e. go over a bridge and also through the water under the bridge).

In all, when I tried to write one, I came to the conclusion that in 2d, stick to a simple sprite that's thin at the bottom if you want to have complex maps. Or stick to simple maps. Or if you want it to do everything, write it in 3d.

I may post up my (very old) source sometime. I was meaning to dig it out again for another reason anyway...


slenkar(Posted 2004) [#4]
how about with just land and buildings - no water,

Id like a look at that source,those gamedev articles are a bit confusing,

I dont understand why the sprite has to thin at the bottom,

also, if you have a tall character wouldnt he be drawn over everything that is 'above' him on the screen anyway?


Mark Tiffany(Posted 2004) [#5]
It depends on whether you need a clever z-axis. Is your player *always* at the same height? Do you never want to introduce different heights in your map with the player moving up and down the 'hills'? Do you never want to have them walk under something? And walk back *over* that something?

If you can answer Yes to all of those, then you can simply draw all the floor tiles first, then your player / non-player objects, then your 'tall' tiles. And you draw from the left of your *screen* to the right of the *screen* (not map), working your way down to the bottom of the screen. That's a pretty naff explanation, and from memory too. There are several articles on gamedev - I picked all I know up from online articles...

The problem with thin at the bottom is if you have two tiles at different heights, with the taller one in front. Things get tricky as you approach the point of the tile 'nearest' you (in terms of you looking into the screen). Try to draw as many scenarios on paper as you can, and imagine how the player images will overlap around that.


slenkar(Posted 2004) [#6]
Im thinking of a fallout style game,
where the only tricky thing is the multi-storey buildings,
they dont look TOO dificult,

or would it be easier in 3d?