Jump to content
  • Advertisement
Sign in to follow this  
jn_rntkl

2d engine: depth?

This topic is 4840 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 now have an engine that draws 2d isometric graphics as textured triangles. The simplest way to handle depth would be to give each corner a z-value based on its y-coordinate. This, however, does not work with objects that should have great depth, such as walls. The graphics in question are not tile-based, but rather pre-rendered. Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
Just have x, y, and z separate variables in your Sprite class (or whatever you are using to represent a graphical object). Then the user can manually set them however he pleases, and it gives you a starting point for more sophistocated solutions to this problem, such as a secondary sort by Y when Z values are the same or similar.

--Vic--

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!