Above are four images of a character walking along the ground from the bottom right towards the upper left. You can see that the drawing order isn't correct in the third panel.
There doesn't seem to be a "correct order" here. For example if instead of a small guy we had a sprite of a looooong cat going through the door, then no matter if you draw the door first or the cat first, it would be wrong.
How do other game engines handle this? Some hack to prevent this situation from happening? Draw a z-buffer by hand? Some other option that didn't occur to me?
The trick is simply to split the tile into pieces. Draw the right half of the arch, then the character, and then the left half.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With