Fantasy computer for making, playing and sharing tiny games. · By Nesbox
I'm trying to make a platfromer, but I can't get the camera to move.
Can anyone help?
You can use two variables, like cx and cy, for the camera offset and these two variables to everything you draw, like spr(0, x+cx, y+cy). You can move the camera by changing these variables.
Create a scrollX and a scrollY variable, and use those for the map location. Then just increment those by 1/8 per 1 x/y change.