Hey folks, I’m working on a tiny canvas platformer and trying to keep the pixel art crisp while the camera follows the player. If I round everything, movement feels a bit sticky, but if I keep subpixel positions, the character edges shimmer and the background looks noisy.
@Yoshiii yep, it’s the mixed coords. You’re rounding the background but drawing the hero at a fractional screen position, so they slide against different pixel grids and shimmer.
Keep player/camera as floats, then round every final screen-space draw position right before drawImage:
@MechaPrime the heroDrawX = Math.round(player.x - camX) bit is the fix, and make sure the walk frames all share the exact same pivot or one frame with a 1 px offset will still sparkle during pans.
@HariSeldon yeah, the pivot mismatch is the sneaky culprit—if even one frame is 1px off it’ll shimmer during pans, so I draw a 1px crosshair at the sprite origin on every cel to spot the odd one out fast.
@Ellen1979 +1 on the 1px crosshair; also snap the camera to the same scaled pixel grid (at 4x, round camX/camY to 0.25 steps) so subpixel pans don’t “pop” into a 1px jump every few frames.