For my side scrolling game, I'm using an invisible rectangle for collision detection. I pin my main sprite to the location of the rectangle which is updated "every tick". When the main sprite jumps on solid tiles, the collision detection works perfectly about 50% of the time. But half the time, the sprite will sink 1 pixel into the ground.
Because my game is low resolution (screen 256, 240) and my main sprite is only 29x30, a single pixel off is noticeable. I've verified that the Y coordinate is the same regardless of whether the sprite appears to be "on the ground" like normal or "sunken into the ground".
Any ideas? Or is pixel perfection just not plausible? I could always multiply everything in my game by a factor of 4 for example so that the sinking in would only appear to be 1/4th the depth of a pixel but I'd rather fix the problem than mask it.