



OK start. Depending on the game, one pixel per frame might feel a bit too slow.
A simple trick applicable here, since you have CPU to spare, is to use _update60() instead of _update().
The speed is still 1 pixel per frame (root 2 or around 1.4 pixels per frame when going diagonally), but at 60FPS instead of 30FPS, the speed is doubled.
About the camera, player centered is the simplest, and a good start. You can expand from it with map border limits, center dead zone to reduce scrolling, camera delay to make things feel more organic...
About the collision there's an edge case (or maybe a corner case ?) that let's you enter a wall :
when you move diagonally, you should also test the tile in the diagonal direction, as you may succeed both orthogonal checks and still hit a corner.
Alternatively, you can implement the diagonal moves as two orthogonal moves.
In that last case, to facilitate navigation around 1 cell corridors, you should retry previously failed movements :
for example, when moving north east, try north fail try east success, try north again, success, for example.
[Please log in to post a comment]