Post

705

For a while I had most of the control issues with my game worked out. You could run around and the screen would scroll at least as smoothly as a 1990s era arcade machine or console. I had introduced most of the same constraints, so I was met with the same results. The simulation of the game could move with sub-pixel precision but the graphics could only move in full pixel increments. That meant that some movements would look smooth, but moving in some directions, particularly diagonals would sometimes lead to a stepping or jitter.

Months ago I added fixes to my movement and camera scripts that minimized this jitter. They worked well. I moved on with other issues and systems and sort of forgot about my fixes.

A little while ago I reorganized most of the project. I simplified a lot of it and removed so much reused code, really leaning into Godot’s compositional nature.

While that was great for the project, it also meant that I did miss a few things. Most notably, I ended up doubling up my anti-jitter fix.

I had been working on different parts of the game and hadn’t really noticed until I played the game at full screen. The jitter was atrocious.

It was frustrating, because I was certain that I had fixed the problem literal months previous.

Long story short, I did find the problem. I had the jitter fix enabled both on the camera and on the target that the camera is meant to follow. Disabling it on the target sorted the whole thing out.

So I guess the moral is, if you are going to reorganize a project, test it for everything, and make sure that you turn off or delete any legacy code you aren’t using.

I’m certain that I will forget and this sort of thing will happen again in the future.

This post is licensed under CC BY 4.0 by the author.