Feedback: jittery sprites on parallax layers with lerp camera and round pixels turned on. Impossible to have smooth scrolling on all layers(?)

Background

Last week I solved a jitter/wobble problem in my game by enabling ‘Round pixels’ in the game’s properties. The jittering of collectables on top of the base layer artwork (same layer, higher z-order) was an issue when using the smooth camera extension or a simple player X pos follow with lerp. My game is not pixel art, but it does have lots of sharp pixel-perfect edges. The jittering was most obvious as the camera decelerated and stopped, though I also observed jittering while the artwork was scrolling. This also affected the main background art in bizarre ways (the artwork on a lower z-order than the collectables) e.g. a green book on a bookshelf would jitter, while the other books were perfectly fine. All books are in the same graphic!

image

The issue

Once I enabled round pixels in properties the original issue was solved… but now the parallax sprite objects jitter and wobble. They even wobble from side to side briefly after the camera has stopped moving, as if they can’t decide what pixels to occupy. It looks terrible. I have a background layer that uses CameraX()/0.98 and a foreground layer that uses CameraX()*1.025. They work great with round pixels turned off, and slow to a natural stop without jitter. Objects on both layers are sprite objects. I generally don’t use tile sprites. I position the objects in the scene editor. For example, I might have a cobweb or room divider pass in front of the base layer on the foreground layer, and a sprite object showing another room pass behind the base layer on the background layer. Again: this works great without round pixels, but that is not acceptable because of jittering base layer sprite objects.

I have tried rounding the numbers, round(CameraX()*0.95), but this creates odd, linear-looking movement when the camera slows. I have tried various things like basing the parallax sprite objects’ camera movement on a hidden tile sprite’s x-offset, since tile-based parallax does not seem to suffer from jitter. That didn’t work. I have tried linking the parallax layer’s cameras to my player character’s movement. The layers come to a smooth stop when I do that. Great! But, of course, having the parallax cameras based on the player character’s position means the sprite objects on those layers don’t stay in the places I need them to; they run away with the player.

I was able to reproduce these issues with the official platformer example. Without round pixels, the ladder and coins jitter/wobble on the base layer, as expected, as the camera slows to a stop. Enabling round pixels fixes that, but the moon (sprite object) on a parallax layer wobbles instead - just like in my game. You have to enlarge, make faster than the tile, and reposition the moon to see the effect clearly, but it’s there.

I have realised that my options are:

(1) Jittering base layer objects with smooth parallax layers
(2) Stable base layer objects with jittering parallax
(3) Use a linear camera

I’ve gone with option 3, but it’s a big blow for the project. I am also concerned that any kind of smooth zoom or camera tween I might want to do will have similar issues. I love GDevelop and have been using it for over two years now, but I won’t deny I was thinking “I wish I was clever enough for Unity” this past weekend when trying to resolve this issue.

I have not been able to get any help on the forum or Discord, and I’m assuming that’s because (a) nobody has encountered this because tiles, not sprite objects, are generally used for parallax, and (b) there is no fix.

From this post, I’m hoping for either:

(1) You need to do [insert solution here] to solve your issue, silly person!
or
(2) It’s an engine thing. Tough luck. Use another engine and learn C# if you want smooth parallax.

If 2, this post can be considered pure feedback from a frustrated user who is compromising way more than he’d like on something he thinks should be simple, or at least doable.

Thank you for reading.

Edit: early experiments with camera zoom tweening cause my player sprite object to jitter where his feet meet the ground, and some other artwork (the dreaded green book!) to jitter too, unless I enable ‘Round pixels’. But doing that makes several objects jitter and wobble while zoom is taking place.

maybe try “disable antialiasing for 3d.”