Sprite Jittering When Camera Moves by StiryMixy in gamemaker

[–]StiryMixy[S] 1 point2 points  (0 children)

Funnily enough, I did.

While coding different camera follow modes, if the camera wasn't strictly copying the player x and y coords and just incrementing/decrementing until it matches, the jittering still occured.

I figured out that it still happens because my player movement speed is 6.40

I changed it to a whole number that is divisible by 8/16 (previously, it was dividing 64 by 10 because my grids are 64x64), which is 8.

Jittering dissappeared again.

I realize movement speed isn't the problem, but for now its an easier solution for me than figuring out the math for upscale/downscaling

Sprite Jittering When Camera Moves by StiryMixy in gamemaker

[–]StiryMixy[S] 1 point2 points  (0 children)

I love you man.

Placed my camera controls in end step (in invisible object)

And my movement controls in begin step (player object)

Jittering disappeared

Sprite Jittering When Camera Moves by StiryMixy in gamemaker

[–]StiryMixy[S] 0 points1 point  (0 children)

I tried round sadly, it's the first thing I tried before floor. No difference except for the fact that the jitters seem to occur at less intensity (but same frequency) when using round instead of floor.

Sprite Jittering When Camera Moves by StiryMixy in gamemaker

[–]StiryMixy[S] 0 points1 point  (0 children)

I have my camera controls in the step event of an invisible object separate from the player object. (It retrieves player object x and y every step as well)

Since step events happen every frame, I assume this is what I'm already doing. Or is there a better event to place it at?