Basic Platform Jump Game

  1. Make our character Sprite run left and right with Arrow keys

  2. Make our character Sprite jump on platforms with the Space key

  3. Let character Sprite fall if NOT touching a platform

  4. Add a moving platform and a Lava Pit obstacle

  5. Let our character Sprite reach the Portal to advance to the next Level

  6. Use a Variable and Broadcast message to manage Levels and know when the player wins by getting past the last level

  7. See a list of Challenges to improve the game on your own

Sign in at Scratch

Go To:


CoderDojo Indigo Studio

Go To: and click Platform Game (Starter)

CoderDojo Indigo

Click the "See inside" button

Notice the sections: Title, Instructions and Notes and Credits


Click the "Remix" button

This will make a copy of the project under your name


Rename the Project

It's a good practice to name your project something unique


Sprite Control with Keys

Code your sprite to move left and right with arrow keys


Fix Sprite Orientation

Set left/right orientation and add "point in direction" code blocks


Simple Sprite Animation

Add "wait" and "next costume" code blocks


Sprite Jump Control

Code blocks to set start location, "space" key press, sound and upward motion


Sprite should Respect Gravity!

Your Sprite should fall if NOT on a platform; use a "not" Operator


Jump only from a Surface

Add this new rule for your Sprite with an "and" Operator


Add a Moving Platform

Add a starting point, "show" block and a "forever" loop


Add a Variable for "Level"

Click back on "Giga" Sprite; Data -> Make a Variable; name it "Level"


Set your "Level" Variable

You can move your variable on stage; Add "set variable" block to a start block


Get to the Portal!

This code block checks for Sprite touching "Portal", then increments the "Level" variable and moves Sprite back to start location


A more Interesting Portal

Select the "Portal" Sprite; Add code block to change color forever


Broadcast Message

Select "Giga" Sprite; Add a "Broadcast message block"; Select "new message..."


Broadcast Message

Name the message "NewLevel" and click "OK"; You will tell other sprites to listen for this message...


Stage Backdrops

Peek at Backdrops tab, then add code blocks to switch backdrops at start and when it hears the "Newlevel" message


"Platforms" Sprite Costumes

Select the "Platforms" Sprite; Look at the Costumes tab
(Note: the "Levels" could have been drawn right on Stage backdrops)


"Platforms" Costume Updates

Set the "Platforms" Sprite to listen for the "NewLevel" message and switch costumes depending on the Level


"Moving Platform" Locations

Set the "Moving Platform" Sprite to listen for the "NewLevel" message and change its location depending on the Level


Hide the "Portal" at the End

Set the "Portal" Sprite to listen for the "NewLevel" message and hide itself at the end; This is why we added a "show" block upon start


The Lava Pit Sprite was Hiding

Select "Danger1" Sprite; Click the "Info" icon and check the "show: " box


The Lava Pit Sprite Animation

Add code blocks to animate costumes and "show" on Level 2 only (if-then-else)


What Happens if Character hits Lava Pit?

Right now, nothing! We need to code that back on the "Giga" Sprite!


Finishing the Game

We only created 3 Levels; so the last backdrop is "You Won" and all Sprites are hidden with our "NextLevel" message and Level = 4 code logic (except for "Giga").



You built a platform game! Now, here are a few Challenges:

  1. Build more levels (backgrounds, platforms, obstacles)

  2. Add special platforms (like springs or transporters)

  3. Create a variable to track number of lives and end of game

  4. Add items to pick up for points or more lives

  5. Add music or more sound effects

  6. Add velocity for more realistic Sprite movement

  7. Add a "Start Over" button

If you got stuck anywhere, see the completed project with comments here:!