Tutorial: Build a Platformer Game

Build a Platformer Game

You are going to build a platformer: a game where you run and jump across a level. Start to finish, it takes about an hour.

Along the way you will meet the five ideas that every melonJS game is made of:

  1. The application, which creates the game and the screen it draws on
  2. Stages, the screens your game moves between, like a title screen and the game itself
  3. Assets, the images and levels your game loads before it starts
  4. Renderables, anything that appears on screen, like your character
  5. Bodies, which give a renderable gravity, speed, and walls it cannot pass through

Learn those and you can build anything else melonJS does. No game development experience is needed. You should be comfortable using a terminal and have seen some JavaScript before.

The four parts

  1. Prerequisites: the three tools to install
  2. Setting up: create the project and run it
  3. Building the game: the level, the art and the code
  4. Going beyond: where to go next

This tutorial covers the technical side of making a game. For the creative side, designing something people want to play, see our game design resources.