Quick answer: GameMaker camera following the player jittering on slow movement? Round the camera position to integer coordinates each step — sub-pixel camera positions sample tiles off-grid.
A pixel-art game shows tile shimmer as the player walks slowly. The camera tracks at sub-pixel precision, exposing rasterization artifacts.
Round Camera Pos
var cx = floor(target.x - view_w/2);
var cy = floor(target.y - view_h/2);
camera_set_view_pos(cam, cx, cy);Integer view position avoids sub-pixel sampling — tiles and sprites land on screen pixels cleanly.
Smooth via Easing
For smooth follow, lerp the target then floor. cam_x = floor(lerp(cam_x, target.x, 0.1)) — smooth motion, integer rendering.
Application Surface Size
If the application surface scales to the window, fractional view positions amplify into multi-pixel artifacts. Use an integer-scaled application surface for pure pixel art.
Verifying
Slow walk in any direction: no shimmer, no jitter. Tile and sprite edges align with screen pixels constantly.
“Pixel-art cameras must round to integers. Smooth then floor.”
Test on a 4K monitor with integer scaling enabled — that’s where sub-pixel jitter shows up most aggressively.