0
\$\begingroup\$

I started working on a tile engine recently and have been trying to get this depth sorting for the tiles right. I am using XNA and the SpriteSortMode.Deferred to get the tiles to sort correctly in the X direction along with a for loop to loop through all tiles that should be drawn, but the Deferred mode does not work in the Y direction. Anyone have any advice or a solution?

Just an image for reference: http://dl.dropbox.com/u/31957180/test_1_2.png

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

You could try drawing with Z order. Make each row have a different Z. That will require you to change the sortmode to front-back / vise-versa.

Another option is to draw columns first (| | | | |).

\$\endgroup\$
1
  • \$\begingroup\$ It's funny because I came up with the exact same answer right before I went to check this. I fixed it with the column solution. Thanks! \$\endgroup\$
    – x3zinja12
    Commented Jan 22, 2013 at 2:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .