I did this tutorial a while when I was learning love, this is based loosely on that code (that's why the colours are the same).
I rewrote most of it, now it handles collisions, has a nice smooth camera and plays and feels nicer.
It's basic, but it is a good skeleton for anyone who wants to whip up a very quick 2D platformer who might not want to use ATL.
There's one bug I've seen in the state machine, but it doesn't affect gameplay AT ALL so ceebs.
Controls:
- ARROW KEYS to move
X to jump
` to toggle debug mode
TAB to toggle gravity
(once debug is on)
WASD to force-movements (will go through walls, funny stuff might happen)
HOLD Z + WASD (will force-move you ONE unit upon key release)