• 2D
  • Unwanted Side Effect With Using Pixel Snap to Fix Gaps Between Tiles

Alright. So I am creating a top down open world game which uses moving KinematicBody2D nodes as ships and uses a tilemap for terrain.

The existence of a movable and zoomable camera creates lines between the tiles as seen below, which I do not want.

After doing some research, the given solution found all over the place is turning on "Use Pixel Snap" in the project settings. Doing this solves the gaps between tiles, but now creates a jittery effect on my KinematicBody2Ds, the objects will 'shake' or vibrate as they move. Whereas this effect didn't exist with Pixel Snap disabled.

You can see this 'jitter' on the moving ship and it's turrets, as well as the stationary ship's shadow.

I want my tilemap to not having the wrenched gaps between tiles, but I also want a clean movement of my ships and and other moving objects. Is there a way to achieve both of these things? I am new to Godot, so I apologize if the solution is right under my nose, and I have failed to find it.

Doing this solves the gaps between tiles, but now creates a jittery effect on my KinematicBody2Ds, the objects will 'shake' or vibrate as they move. Whereas this effect didn't exist with Pixel Snap disabled.

This is the very nature of pixel snapping. You can't have both smooth pixel motion and crisp visuals at the same time. Most pixel art projects will favor crisp visuals over smooth motion.

2D snapping is a complex problem with no easy solution. People have tried to improve it for 3.3, but these changes were ultimately reverted because it caused many regressions.

The bottom image actually doesn't look bad to me. More like a retro look.