There is something self-rewarding about winning a game that packs a mean challenge - it reminds us that claiming a victory isn’t a walk in the park. From a player’s perspective, conquering difficulties and getting through tough quests is exciting, and legendary creators of today’s most popular games know that.

From Super Mario to Minecraft, we are drawn to games that allow us to explore virtual worlds, but only if we overcome its’ obstacles of many sorts. Those ‘obstacles’ are often referred to as ‘levels’, and we can’t seem to get enough of them.

So today, we'll walk you and your child through a few simple yet powerful concepts to teach you how to make a game with levels on Scratch. Together we'll create a fun Balloon-Pop challenge using Scratch coding. Once you've conquered this tutorial, you'll be equipped with the skills to make even more level games such as Tetris, Super Mario 64, and more!

Learn more coding by joining our fun award-winning Accelerated Scratch class, designed by professionals from Google, Stanford, and MIT, to make cool games with an expert live online. There's no risk in trying with our free intro session!

What’s a game level in Scratch?

A game level in Scratch represents a new challenge and a new space for a player to explore with its own goals. It can also be thought of as a game within a game, but with a slightly greater hitch. Those who get past a challenge get to move on to the next level, and so on and so forth until the very last level is met.

Why should I add game levels in Scratch?

You should add game levels in Scratch because game levels keep us going. The higher the level the more power we feel. The levels remind us of our endurance, persistence, and the experience gained with each new challenge. The higher the level, the greater the adrenaline, and that inspires us to push ourselves to overcome more.

How to Make a Game with Levels on Scratch

In this Scratch tutorial for kids, we will show you just how easy it is to add levels to a game. We’ll start off with a simple Balloon-Pop challenge. You can view the finished project here.

balloon level game in Scratch

The goal for this game is to pop at least 10 fast moving balloons. If the player accomplishes the goal, then the player will move on to the next level which will make it the balloons a bit harder to ‘pop’.

1. Score and Move Up

Let’s get a Balloon Sprite and program it to move at a challenging speed towards the top of the screen. Because of its unpredictable start point, a player must pay close attention and act quickly in order to meet the challenge.

Code to move your Sprite

2. Count Points and Move Up

For every click on the Balloon Sprite, the player will score 1 point. Remember, all it takes is 5 points and the player will be granted to play on to the next level.

Code your game to count points

3. Change The Backdrop

Our if/then control block will check the score and based on the logic, it will switch the backdrop to announce the next level.

Code to change your backdrop

4. Next Level

In the next level, the game gets a tad bit challenging. However, from a programming perspective, all there is to do is add a timeLeft variable and check against two things: time and clicks.

We’ll speed up the way the balloon moves up to the top to make it more challenging if the player is still under 10 seconds in the game and above 4 points, otherwise, we’ll have the balloons move at a slower pace. We’ll also add a Sprite Robot to announce the levels as well as when the game is over:

Code the next level

5. Control The Backdrop Display

Next, we’ll use the backdrop blocks to control the display of the two backdrops. The first level will have the Rays backdrop, but the second level will switch to Circles:

Control the backdrop

6. Put The Sprite To Work

And finally, we’ll put our Sprite Robot to work. It’s only job is to keep track of the time left as well as the clicks to announce one of the three: game has ended; you [player] ran out of time/lost; next level.

Put the Sprite to work


You did it!

Run Into Trouble? Here Are a Few Tips for our Scratch Level Tutorial

  1. Score Not Updating Properly:
    • Issue: The player's score does not increase when clicking the balloon.
    • Solution: Ensure the change score by 1 block is correctly attached to the when this sprite clicked event block. Double-check that the score variable is properly initialized.
  2. Backdrop Not Changing for New Levels:
    • Issue: The backdrop does not switch to indicate a new level.
    • Solution: Verify that the if/then block condition correctly checks the score variable and that the switch backdrop to block names the correct backdrop.
  3. Timer Not Working Correctly:
    • Issue: The countdown timer does not decrease or stops unexpectedly.
    • Solution: Ensure the change timeLeft by -1 block is inside a loop, such as a forever or repeat loop, and is controlled by an event like when green flag clicked.
  4. Game Not Progressing to Next Level:
    • Issue: The game does not move to the next level after reaching the required score.
    • Solution: Check that the logic in the if/then control block accurately assesses the score. Ensure the code for advancing levels, such as changing backdrops or increasing difficulty, is correctly implemented.
  5. Sprites Overlapping or Not Moving Smoothly:
    • Issue: Sprites overlap or do not move as expected.
    • Solution: Adjust the initial positions and movement logic for each sprite using go to x: y: and glide blocks for accurate positioning.
  6. Robot Sprite Not Announcing Levels Correctly:
    • Issue: The Robot sprite does not correctly announce levels or game end.
    • Solution: Ensure the Robot sprite's code includes conditions to check timeLeft and score, and uses the say block to make announcements based on these conditions.
  7. Balloon Speed Issues:
    • Issue: The balloon sprite does not move at the desired speed or direction.
    • Solution: Verify the move and glide blocks used for the balloon's movement. Adjust the speed parameters to ensure the balloon moves as intended.

Key Programming Concepts

You've learned so many important coding concepts today. Here's a quick review:

  • Sprites: In Scratch, sprites are the objects that perform actions in the game. In our game, the Balloon Sprite and Robot Sprite each have specific roles and actions.
  • Variables: Variables store information that can change as the game progresses. In this tutorial, we use variables like score and timeLeft to keep track of the player's progress and remaining time.
  • Control Blocks: Control blocks manage the flow of the game. The if/then control block checks conditions (like the score) to determine what happens next, such as moving to the next level or changing the backdrop.
  • Events: Events trigger actions in Scratch. The when this sprite clicked event detects when the player clicks the balloon, incrementing the score and triggering other actions.
  • Backdrop: The backdrop sets the scene for the game. Changing the backdrop with switch backdrop to gives visual feedback to indicate new levels or game states.

Types of Scratch Games That Have Levels

One of the most popular games with levels on Scratch is The Maze Game. The Maze Game is fairly easy to program as well as to play, and the maze seems to get more challenging with each new level.

Apart from the Maze Game, Super Mario 64 also offers levels as a Scratch built game. Tetris is another fun game with levels that’s often played on Scratch followed up by its runner up game, Snake.

Make a Game with Levels in Scratch

As the time goes by, the gaming world changes as video games evolve and we grow out of old and into new virtual realities. However, one thing stays the same: game levels providing a fun challenge. We simply can’t get enough of them!

And now that you know how to make a simple game a little more challenging, check out our live virtual advanced Scratch course, where you can create games with levels and have fun while learning how to code. Up next, learn how to make a maze in Scratch to apply your new level skills.

Written by Sandra Dizdarevic, a Create & Learn instructor with 6 years of experience teaching STEM to children in the 3rd through 11th grade. She has an Undergraduate as well as a Masters Degree in Management Information Systems from UNO.