I need to fix a persistent background (is a tiled sprite) jitter/vibration that occurs only on mobile devices during camera movement.
While the movement is perfectly smooth on Desktop/PC, it jitters on mobile apk. The background seems to “shake” or “jump”. It looks like a sub-pixel rendering issue where the texture doesn’t align correctly with the screen grid during interpolation.
I am using lerp for the camera position.
I have already tried wrapping the position in a round() function.
The background I’m using is a Tiled Sprite with no movement logic at all; it isn’t referenced in any events. The only thing moving in the scene is the main character (a Sprite named ‘Lexi’ ) and its camera.
Strange… how large is the tiled sprite? If it spans your entire game, I wonder if breaking it up into smaller pieces would help.
You are currently changing the zoom every frame, which is not necessary. You can move the zoom action to an event with “at the beginning of the scene” condition (or some other condition that only fires when the zoom changes). I don’t particularly suspect this is causing jitter but I would still try moving the action just to be sure.
Also the camera positioning is a little convoluted - why are you adding those offsets to the position? The actions change the center of the camera, so you don’t have to calculate the center manually.
You’re right about the zoom; I’ll move that action to an 'At the beginning of the scene’event right away to avoid unnecessary processing every frame.
Regarding the Tiled Sprite, it is currently 3000x3000px. I’ll try breaking it down into smaller segments to see if that improves the rendering performance on the device.
I already tried setting the zoom to 1. The jittering gets slightly better/more relaxed, but the issue still persists. It seems like changing the zoom reduces some of the scaling artifact stress, but there is still an underlying stutter when Lexi moves.
To give you a bit more context: I’m a teacher creating this educational game for my students, so my GDevelop events might not be 100% optimized or fully ‘correct’ from a programmer’s perspective.
Anyway something is not right here cause
IF your BG would be small i would understand jiter but its not
Then your events are correct
So i don’t get it
Paste here image of your background SAME EXACT image you use in your game
And one frame of your player animation
I gonna try to do it myself and see if i get same result
I checked all of Lexi’s animation frames and they are perfectly identical in size, so no issues there.
I’ve been testing the camera settings, and it looks perfect when I completely remove the Lerp (camera smoothing). The jittering is gone! I will leave it disabled for now, even though I really liked the smooth effect it gave to the game.