
Code Your Own SuperHero Jump Game
In this fun project, you’ll learn how to create gravity to make your superhero fall onto platforms - then program the game so they can jump up to the next one. If the superhero falls to the bottom, it’s “Game Over”!
Let’s get started…
1. Visit the Scratch website.
2. If you already have a Scratch account, click ‘Sign in’ and enter your login details, otherwise click ‘Join Scratch’ and create your free Scratch account.
3. Once you’re logged in, open our Superhero Jump! - Starter File
4. Click the green ‘Remix’ button.
Let’s get coding…
5. First we need some code so that our Superhero Sprite will fall if they are not on the Platform sprite. Let’s try it this way:
6. Now test it out - when you press the Green Flag, does the Superhero wait 3 seconds, then fall and land on the Platform?
7. We also want our Superhero to bounce back up when they hit the platform. Give this code a try, and don’t forget to press the Green Flag and test it out when you’ve finished!
8. Let’s also add a way for our Superhero to move right and left. Use this code, and practice moving your Superhero while bouncing on the Platform.
10. Now, let’s code the Platform and turn this into a fun game! We’ll start by coding the Platform to go to the top of the screen and make a copy of itself once every second.
11. Then, we can code the copies of the Platform to appear in a random place and fall down on the screen. The Platforms will disappear when they hit the bottom of the screen. Can you use the arrow keys to help the Superhero stay on the Platforms?
12. To finish up your game, you’ll need some code to make the game end if the Superhero falls all the way to the bottom. We can add this code on the Superhero sprite:
13. All done! Let’s save your project. Click the ‘File’ menu at the top of the screen and then click ‘Save now’.
Share it…
14. Now it’s time to share your creation. Click the orange ‘Share’ button at the top of the screen.
The ‘Share’ button will only be visible if you have verified your email with Scratch. If you can’t see the button, click on your profile name in the top right corner, select ‘Profile’ and follow the instructions in the orange banner at the top of the screen to verify your email.
15. Click the ‘Copy Link’ button.
You can share that link with friends and family by email or text message and they’ll be able to play your awesome superhero game.