Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

LilGizmo

Layers vs. true Z

This topic is 6922 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!