Hi everyone! I'm trying to evaluate Godot to make an action RPG using pixel art; I came to the conclusion the for dealing with pixel art in Godot the two main ways:
- using "canvas_items" (Godot 4) as the stretch mode, everything will work fine except movement of bodies which will not be pixel perfect since physics uses floats; having a high resolution UI is also simple with this approach
- using "viewport" mode with a viewport set to the pixel art canvas size which will contain the scene; this will guarantee pixel perfection when moving around the bodies
I would like to use the second approach, however I'm having the following problem: when I use functions like MoveAndSlide etc. the sprites get all messy and blurred (I think due to the fact that the physics engine tries to move the sprites to an subpixel location). I tried rounding the position but this causes a lot of problems, for example having some bodies to not move at all since the position always gets rounded back to the starting location.
Is there a way to use the viewport approach but still leverage on the collisions and physics of the engine?
I found some old conversations like https://mcmap.net/q/7162/godot-pixel-perfect-movement-and-rounding however they don't focus on the collisions and movement management for Kinematic bodies.