Hi there,
I have a question about best practices for sprite layering. I'm currently working on an oldschool rpg style game (eg Zelda ALttP, or Final Fantasy 6 or less) with tilemaps. Tilemap layering is not the issue, but layering overlapping sprites in the world itself.
I want my sprites to overlap sprites that are "behind" them (from game perspective), but are overlapped from the same sprites, if they are "behind" them. I don't know how to best describe my problem, so I made a few images with prototype graphics.
Player is the green link sprite. This is correct.
https://docs.google.com/open?id=0B0m9Fxe6-AAQZ0FWdU1HbktWRVUIf the player walks behind the dark link sprite. This happens now, but is not correct.
https://docs.google.com/open?id=0B0m9Fxe6-AAQV0d3bGxsaEJaQUUAnd this is the correct expected behavior.
https://docs.google.com/open?id=0B0m9Fxe6-AAQeWVQM2pTbmpKNnMMy question is: What are the best practices to get this behavior? I thought of always changing the z-positition of all sprites in regard to their y-position, but i guess thats dumb.
Another thought was to change the render queue all the time, but that would mean to create a new material every time, right?
I appreciate any help of you guys. Thanks in advance
Loofou