Each folder of this project contains a different method to move a sprite.
-
The tile by tile method : the animated sprite jump from one tile to another, as if it was teleporting (TRVE 8-bit retro effect)
-
The tile by pixel method : more elaborate than the previous method, the movement of the sprite is continuous between the tiles, but the sprite position is always at the center of a tile
-
The pixel by pixel method : the sprite can be controlled and therefore positionned by one pixel precision. Collision tests get more complicated.
I added an intertia/grip effect, just to show how it works, a bit exagerated and unrealistic (grip is zero as long as you don’t release keys).
Demos uses Löve2D.
Tile by tile method :
make TxT
Tile by pixel method :
make TxP
Pixel by pixel method :
make PxP
Animated sprite generated with Universal LPC spritesheet generator