I wanted to bring up this topic again, as I've been looking for a solution myself.
Ordering sprite objects is pretty easy to do in a non-costly way. It could look something like this:
CONDITIONS:
System -> Every 0.05 Seconds
System -> For Each SpriteObject order by SpriteObject.Y ascending
SpriteObject -> Is on-screen
ACTIONS:
-> SpriteObject -> Move to top of layer
However, Tilemaps seem to be another story.
Someone please correct me if I'm wrong, but I don't think there's a simple, effective way to have a Sprite to pass behind or in front of a tile in a tilemap based on Y position, since there is no way of changing the Z-order of individual tiles. You could change the Z-order of the entire tilemap based on a sprite's position, but that's not really ideal at all for a bunch of reasons.
The only workarounds I can think of would be:
- Use sprites more often. This would be the only way to effectively have a small cactus like in the first post.
- Have two tilemaps, one for tiles that the sprites will always pass in front of, and one for tiles that sprites will always pass behind. This would be effective for something like the large trees from the third post, where you could have a base that the player always passes in front of, and upper parts of the tree that the player always passes behind. Though in this case, it would probably be more efficient to use a sprite for the tree instead.
If anyone has any other solutions to add, I'd love to hear them.