maybe this isn't the right way to do this, but I'm trying to get the 'camera' to follow my character. while it seems to work, I am seeing it jitter a pixel or so frequently.
basic idea here is that hero is a sprite, each frame I'm telling it to move a little bit. meanwhile, I keep a cameraPos that is moving in the opposite direction, which gets passed to setDrawOffset.
hero:moveBy(moveX, moveY) cameraPosX -= moveX; cameraPosY -= moveY; playdate.graphics.setDrawOffset(cameraPosX, cameraPosY)
is there a more reliable way to do this? if I switch the order of this it doesn't make any difference. i.e. if I call setDrawOffset first then move the hero.
in unity what I would do here is have the camera follow the target in a late update, so I would think moving the hero first then adjusting the offset ought to be enough to take care of things but maybe not. does moving the sprite not happening instantly? like is it on some redraw delay or something?