While working on a platformer sample, I encountered a really strange issue with my sprite.
As you can see in this gif the sprite is sometimes flickering and changing rapidly position before going back to its expected position.
After digging around it seems this is related to sprite:setImageFlip(playdate.graphics.kImageFlippedX)
If I leave the sprite flipped horizontally all the time, it seems the sprite will be rendered with an unexpected offset. Slowing down the movement I noticed it happened when the position is a multiple of 32 pixels.
As you can see the collision box of the character is in the right place but the sprite is not rendered at the right position. If I do not force to always redraw the whole screen, I also have sprite ghosting because the dirty rects are not correct.
The two places to reproduce the issues easily:
Here is the project with the bug
Bug flipped sprite.zip (220.1 KB)