Archived

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

yo

sorting for rendering order

Recommended Posts

how can I sort sprites inside an isometric cube divided in 10 cubes per axis to render them correctly. Here''s a screenshot of it incorrectly rendered. (copy and paste link) http://www.geocities.com/pacoelflaco_2000/siteimages/spaceships.jpg Coordinate (1,1,1) is the axis where the 3 planes meet.

Share this post


Link to post
Share on other sites
A simple way is to add each object''s x,y, and z coordinates together, assuming they are always greater than 0 ( a reasonable assumption for an isometric). Use this sum to sort each cell''s occupant list, from smallest to largest, then draw in this order. It''s the technique I use for Golem.

Josh
vertexnormal AT linuxmail DOT org


Check out Golem: Lands of Shadow, an isometrically rendered hack-and-slash inspired equally by Nethack and Diablo.

Share this post


Link to post
Share on other sites