Skip to content

Tutorials

The starter game with the tutorials' coins, crate tower and stepping stones

Each tutorial builds on the game you made in Make your own game, and ends with something working you can keep. Code blocks are complete: paste them into a new file in your game's scripts/ folder and save while the game runs.

  1. Walk around: how the player works, tuning how it moves, and shaping the level.
  2. Break things: throw balls, knock towers over, and shatter glass.
  3. Script a pickup: coins to collect, a score on screen, and your own Lua binding in C++.
  4. Add sound: materials, impact sounds and a pickup chime.

Coming next: invite a friend, playing your game together over the network, once player replication for script games lands (#28).

Want more after these? The cookbook has recipes for everything from your own controls and cameras to pathfinding, flocking and inverse kinematics. games/first_lua_game/ is a whole small game (break the targets, with a timer and a results screen) in one Lua file, with its own walkthrough.