ID:1817839
 
(See the best response by Kaiochao.)
I'm still a bit new to pixel movement, and there is one issue in particular that is driving me crazy. It's hard to describe, so check out the image below.



Things like that keep happening a lot from the player or mobs doing nothing more than move around. I've tried SIDE_MAP, and numerous other similar soft coding methods. Googled a lot as well. The world icon size is 32x32, the mob icon file is 48x48, and the mob from that picture is nearly centered at pixels 10 to 43 height wise. As for bounds...

    step_size = 8
bound_x = 16
bound_y = 8
bound_width = 16
bound_height = 16


I know there has GOT to be a way to fix this, but I just can't seem to wrap my head around it. So someone please enlighten me.
Best response
This kind of layering isn't specific to pixel movement. It's just that the SIDE_MAP format isn't working perfectly outside of tile movement (or inside, but anywayy).

What you want is for objects closer to the camera to be layered above objects further away, right? Well, to quantify the closeness of an object to the camera, one way is to use the object's absolute pixel y coordinate:
py = (y - 1) * TILE_HEIGHT + bound_y + step_y


Next, we want it so that lower py -> closer to the camera (when visible, anyway) -> higher layer.
layer = -py // essentially this, but it needs more to actually work

// e.g. this is why soft-coding this isn't ideal
layer = 5 - py * 0.0001
Yep, that's it! Finally something I can actually work with. Every other snippet, idea, etc seemed to have no effect at all. Thank you.