Advertisement

Layers vs. true Z

Started by May 08, 2000 05:11 PM
3 comments, last by LilGizmo 24 years, 7 months ago
I''ve been out of the isometric programming community for a long time, but I whipped out my old code the other day and was able to fix a lot of the bugs that I couldn''t before. My question is with regard to elevated objects. My current engine simply draws 5 layers, one on top of the other, to create terrain or to make an object appear to be on top of or above something else. Would it be a good idea to toss out that code and implement true z elevation? I''m not asking how to code this because it doesn''t seem to be too difficult as far as that goes, but I''m just curious as to whether its a necessary feature. The only advantages I can see with having z elevation is if your mobiles can jump or trascend stairways, but even that can be emulated to some degree by just offsetting the drawing location.
_-Gizmo-_
Correct me if I''m wrong but z buffer data defines how far things are away from from you not how high they are. Elevation should be along the y axis.

Sieggy
Advertisement
Yes, in a 3d game world. In any tiled engine, or at least mine for that matter, the screen is drawn with an array consisting of an x and y variable. Obviously, this draws your sqaure or isometric grid.

Implementing a z variable in this case would only mean that every tile would have an added variable. In this case, z would only affect how high the tile is. For example, a ground tile would have a z value of 0, while some extremely tall tower could have a near infinite z value. Tiles with a lower z value are drawn to the screen before higher ones.

All it does is determine where in relation to the ground the tile should be drawn.
_-Gizmo-_
Rather than drawing the low-z tiles before the high-z tiles, Wouldn''t it make more sense to draw the back tiles before the front tiles? Then the high-z tiles will overwrite the low-z ones that are behind them.

Regards,
WhiteWolf
That just depends on the way your Z goes.

nathany.com

This topic is closed to new replies.

Advertisement