This tutorial makes a platformer game from start to finish with the Platformer game template: a level with a pit to jump, spikes, a key to find, a lift, an enemy and a locked exit, played in your browser. It takes about ten minutes and there is no code anywhere in it.
Open the editor in another tab and follow along:
The editor does not start empty: it opens on an example game with two levels, Green Hills and Sky Steps. Every part of a game has its own section here - the player, the levels, the platforms, the items, the enemies, the sounds and the title screen - and you will visit most of them below.
Press Play game before changing anything. A minute with the example tells you more about what the pieces do than any description of them. Press any key on the title screen, pick a level with the arrow keys and press Enter.
| Key | What it does |
|---|---|
| Left / Right arrow, or A / D | Run |
| Space, Up arrow or W | Jump - hold it for a higher jump, tap it for a short hop |
| Down arrow or S | Drop down through a ledge |
| R | Start the level again |
| Escape | Back to the level select |
| M | Sound on and off |
When you have had enough, press Edit game under the game to come back to the editor.
Open Player. Do this before building anything, because the player's jump decides the size of everything else: a gap wider than a jump can never be crossed, and a ledge higher than one can never be reached.
Two numbers matter most. Movement speed (on the Movement tab) is how fast the player runs, and Jump speed (on the Jumping tab) is how hard they leave the ground. They work together: a jump's height comes from the jump speed alone, but its length is the run speed multiplied by the time in the air, so a faster runner jumps further. The box at the top of the screen does that sum for you - with the defaults, a jump clears about 114 pixels up and 228 across. Keep those two numbers in mind for the rest of the tutorial.
The Jumping tab also holds what makes a platformer feel fair rather than strict. Coyote time lets a jump still work for a moment after running off a ledge, and the jump buffer remembers a jump pressed just before landing. Players never notice either; they only notice when they are missing. Set Number of jumps to 2 for a double jump. Leave everything as it is for now and press Save.
Back in the editor, open Levels and press Add level. Call it My First Level, leave the gravity at 1800 and press Save. The new level joins the list after the two example levels, and the list counts what is in each one.
Press Level editor on the new level's row.
A new level holds nothing but the player start (the blue figure) and the goal (a castle, like the one at the end of the level before it), and the panel on the right says what to do first: build the ground.
The toolbar has the three tools - Select, Add and Delete (keys S, A and D) - and next to them what to add: Platform, Item, Enemy, Player start and Goal (keys 1 to 5). The editor opens on Add and Platform, with the platform types of the game in the side panel. Pick Ground.
Now hold the left mouse button down and drag along where the ground should run. Dragging lays a whole run of platforms in one go; a single click lays one. Start under the player, drag to the right and let go just before the goal. Leave a gap a little narrower than a jump - about 120 pixels, half of the 228 the Player screen promised - and drag out a second run on the other side, a little longer than the first.
Is the gap really jumpable? Move the cursor to the edge of the first run. The dashed arcs at the cursor are the player's jump, worked out from the Player screen and this level's gravity: anything inside them can be reached from where the cursor is. If the far side is inside the arc, the player can make it.
A few things make the editor easier to get around. The status bar at the bottom shows the position under the cursor and says what a click will do. Drag with the right mouse button to move around the level and turn the mouse wheel to zoom; the button at the right end of the toolbar fits the whole level in view. Things snap to the grid as they are placed (the magnet button turns that off), G hides the grid and J the jump arcs. A misplaced platform is fixed with the Select tool: click it and drag it, or press Delete to remove it. A paint stroke stops at the edge of the canvas, so zoom out first if a run is longer than the view.
Flat ground is a corridor, not a level. Over the middle of the second run, pick Block in the side panel and click a block into place a little above the ground. Then pick Ledge and put a ledge above and to the right of the block. Use the jump arcs again: hover over the block and check the ledge is inside them.
A block is solid from every side. A ledge is one-way: the player jumps up through it from underneath, lands on top, and drops back down through it by holding Down. Ledges are what make a climb quick to build, because the player can never bang their head on one.
Now press Item in the toolbar (or 2), pick Key and click just above the ledge. While you are here, pick Coin and put a row of coins along the first run of ground - they are worth 10 points each.
Press Platform again, pick Spikes and click them onto the second run, between the pit and the climb. Spikes are a deadly platform: touching them costs a life. Put them where the player has to jump over them and can see them coming, with room to land on the far side.
A lift is an ordinary platform that has been told to move. Past the end of the second run, leave a gap far too wide to jump - about 400 pixels - and drag out a third run of ground on the other side of it. Then pick the Lift platform and click one in just past the end of the second run, at the same height as the ground.
Now press Select (or S) and click the lift. The side panel shows its Movement: set Move X to 240 and Move speed to 80. The lift now travels 240 pixels to the right and back again, over and over, carrying whoever stands on it, and a dashed line in the editor shows where it goes. Use Move Y instead for a lift that goes up and down.
The player waits at the end of the second run for the lift, steps on, rides it across and hops off onto the third run.
A key does nothing until a goal asks for it. Press Add, then Goal in the toolbar (or 5), and click near the far end of the third run to move the goal there - every level has exactly one goal and one player start, so they are moved rather than added. Then press Size, keys needed and look in the side panel and set Keys needed to 1.
The player now has to make the climb before they can finish. If the goal ever asks for more keys than the level holds, the side panel warns you about it. A padlock now hangs on the goal, counting the keys found so far. Change look, under the keys, makes the goal a flagpole, a finish line, a door, a portal, a cave, a teleporter, a treasure chest, a trophy or a rocket instead, in the colours you choose.
Press Add, then Enemy (or 3), and pick Walker. Before clicking, the side panel asks which way it starts walking and its patrol distance - how far either side of where it is placed it walks back and forth. Set it walking left with a patrol distance of 40 and click it onto the third run, between the lift and the goal.
Jumping on a walker defeats it and bounces the player back up; touching it from the side costs a life. A short patrol keeps it where a single jump clears it. The example game has three other kinds: a Chaser that runs at the player once it sees them, a Bat that flies, and a Spiky that cannot be jumped on at all.
Fit the whole level in view (the button at the right end of the toolbar) to see what you have built.
Press Back to return to the level list and press Edit properties on your level. This is where the settings of the level as a whole live.
Leave them as they are and press Save. The types themselves - how wide a ground piece is, what a coin is worth, how fast a walker walks - are in the Platforms, Items and Enemies sections of the editor. Changing a type changes every one of them in every level at once, and Add platform, Add item and Add enemy make new ones: icy ground is a solid platform with a friction below 1, a bonus gem is a Score item with a bigger amount. How the player looks is under Player, on its Look tab, and each enemy type has a look of its own: a knight, a robot, a slime, a bat and more, in the colours you pick. So does each item type: a coin, a gem, a star, a key, a potion, a mushroom and more, spinning, bobbing or swaying, popping as it is picked up.
Press Back once more and then Play game. Press a key on the title screen, go down to My First Level on the level select and press Enter.
Play it through: over the pit and the spikes, up the block and the ledge to the key, across on the lift, over the walker and into the goal. If a jump turns out harder than you meant, press Edit game, open the level editor, move the platform and play again - building a level is mostly this loop. Lives and the score carry on from one level to the next, and the game keeps its high score.
Two sections finish a game off. Sounds holds every sound effect - jumping, coins, keys, stomping an enemy, losing a life, finishing a level and more. They are made up as the game is played, so there is nothing to upload: choose the style, the volume and the pitch, and switch off the ones you do not want. Each one has a button to hear it.
Title screen is the first thing a player sees: give the game its name, a subtitle, colours, a background picture or a logo, and watch the preview change as you go. Set the game's own name, and the size of its canvas, under Game properties.
Press Export, next to Play game, and choose how you want your game:
index.html with everything the game needs: open it in any web browser and it plays, with no internet connection and nothing to install. Put the files on any website to share your game with other people.