I'm currently building a 3/4 perspective board game, and so far I'm having a LOT of trouble with the z-order. Normally it would be a breeze, but I've got a certain element of uncertainty in the game.
As you can see, I've got these screens which make bullets bounce, and depending on where the bullet is coming from, the bullet should be either in front or behind the screen when they share a tile. I've tried a million different approaches to the z-ordering but every time there's a certain case where it doesn't work as intended.
Does anyone know of a reliable algorithm to sort my sprites in the Z layer? As you can see, it's not a thing of just moving things with the highest Y to the top of the layer.