Page 1 of 1

Platformer Skeleton in LOVE

Posted: Sat Jan 04, 2014 8:56 am
by andrew.207
Hey guys, I made a fairly simple platformer skeleton.

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.

Image

Controls:
  1. 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)

Re: Platformer Skeleton in LOVE

Posted: Sat Jan 04, 2014 11:15 am
by micha
Looks very solid. Good work.

When I hold down the jump button, the player keeps bouncing. I would expect the player to jump only once, when the jump button is pressed. You can change that by using the love.keypressed callback instead of love.keyboard.isDown.