The fastest way to start a game: clone something that already runs, then make it yours.

Clone and run (2 min)

git clone https://github.com/findingfocus/love2d-starter.git my-game
cd my-game
love .

You get three screens and a loop: title → play → win → play again.

ActionKey
Start / Play againEnter
Win (from play)W
QuitEsc

Anatomy

my-game/
  main.lua         -- Love2D callbacks + state machine wiring (78 lines)
  conf.lua         -- game title + window size (9 lines)
  class.lua        -- tiny OOP helper, read it once
  StateMachine.lua -- title <-> play <-> win switching
  push.lua         -- resolution scaling for any window size
  states/
    BaseState.lua         -- empty interface (6 lines)
    TitleScreenState.lua  -- press enter to start (16 lines)
    PlayState.lua         -- your gameplay goes here (16 lines)
    WinState.lua          -- press enter to replay (16 lines)

NOTE

push.lua, class.lua, and StateMachine.lua are helpers — you don’t need to understand them fully to use them. Read them once, treat them as black boxes, and build in states/.

How to make it yours (10 min)

  1. Change the title + window size in conf.lua
  2. Put your gameplay in states/PlayState.lua (update moves things, render draws them)
  3. Reskin states/TitleScreenState.lua and states/WinState.lua
  4. Ship it: Distribution

Full guidance lives in the repo’s README.md.

Study the full example (BTTF)

The BTTF demo was built on this exact pattern, extended with a speedometer, obstacles, crash audio, and touch zones. Browse it annotated here:

Full file tree + download: BTTF project page.

Next step

Don’t know where to start? Grab a recipe from the Cookbook or dig into the code of the Demos for some ideas.