Smooth camera jittering

I have jittering on tthe smooth camera extension. I solved it with some help as being a resolution issue. When i made my game resolution to 1920 x 1080, and that fixed the issue with a zoom level of x4. At the initial resolutions of 640 x 360 and 1280 x 720, the problem persisted and caused jittering. It’s an interesting issue, as I wouldn’t have expected the resolution to make a difference.

Anyone come across this and causes.

Yes, this is expected, due to how the math works.

Lower resolutions mean less positional numbers for the camera to be at. Even with smooth camera extension attempting to do a gradual movement, it still has less positions to move between.

This is actually true on NES games too, if you render Super Mario Brothers at its native resolution (~250x240) then just stretch it to fit your screen, you will see the same style of movement of the camera.

Your solution of having a higher native resolution and zooming in is the best method to address for it.

Edit: to clarify, While technically non-rounded numbers can be infinite due to decimals, decimals are capped after a point in GDevelop (and javascript) to avoid computational load/performance issues.

Thanks for the reply. Is there a recommended resolution for the smooth camera extension and character size. ie 1920 x 780 for 16 px zoomed in at x4.

I generally recommend nothing smaller than 640x360 for 16:9, as it can perfectly scale into both 720p resolutions (720p, 1440p) and 1080p resolutions (1080p/4k), but even that may not be perfectly smooth for you and you may just need to use 1080p resolution, which would be 6x larger than 320x160 or 3x larger than 640x360 base resolution.

Just keep in mind I explicitly do not recommend using 720p for anything. That’s generally not a resolution used anymore, and only scales into 1440p. The majority of the PC market uses 1080p displays still (something like 70% on the last Steam Survey), and using 720p will mean you’ll have distorted pixels when scaling. (1080p is 1.5x 720p, and you can’t have a “half” pixel).

Hi, thanks for your reply. I did the multiplayer game jam and just centred the camera could never get the smooth camera extension to work correctly. Still came 25th so can’t complain. Working on a Metroidvania gamejam. Same problem again. Journey Beneath - The Great Explorer | Play on gd.games
Its 800x600 with a 3 x zoom. You can see the jitter when the camera centers on the player, how would you eliminate this? Tried all the various screen resolutions and can’t eliminate the jittering.

I’m not seeing any jittering in the example you posted, so now I’m wondering if we’re talking about different things entirely.

Where are you seeing the jitter? (Note that jitter means jumping back and forth, not suttering, and I’m not seeing any stutter either beyond what would be normal for an 800x600 game).

  • Are you seeing it in movement, or the pixel shapes themselves, or something else?
  • Also, does your game have any maximum framerate set?
    • If so, what it is it?
    • And what is the refresh rate of your monitor?
  • Does your project have the “rounded positions” setting turned on in your project settings?

(all browsers are hard locked to Vsync, so if you have a 144hz monitor but a 60fps game you’re never going to get 60fps as it isn’t a supported refresh divisor of 144hz, you’ll get 48fps instead).