Scratch Tutorial for Kids: Build Your First Chase Game

Must read

BRAINYBLOOMCLUB
BRAINYBLOOMCLUBhttps://brainybloomclub.com
Helping Adults Raise Tomorrow’s Innovators. Practical STEM projects, learning roadmaps, product reviews and AI safety guidance for parents, guardians and educators.

This Scratch tutorial for kids walks parents, teachers and young beginners through a simple chase game. You will move a character with arrow keys, chase a moving target and count one point per catch. No previous coding experience is needed. Work in short stages and test after each change; allow roughly an hour, with more time for experimenting.

Scratch Tutorial for Kids: What You Will Build

A chase game where the player controls a character using arrow keys to catch a target that moves randomly around the screen. Each new catch earns one point. An optional extension adds a faster second level. It is designed as a manageable first project, but teaches concepts you will use in every future Scratch project.

Step 1: Set Up Your Project

  1. Go to scratch.mit.edu and click “Create” to open a new project.
  2. Delete the default cat sprite by right-clicking it and selecting “Delete.”
  3. Click the “Choose a Sprite” button (cat icon with a plus sign) and pick a character for the player. A simple character like “Cat 2” or “Avery” works well.
  4. Add a second sprite for the target — something the player will chase. Try “Apple,” “Star” or “Ball.”
  5. Click the “Choose a Backdrop” button and select a colourful background for your game.

Step 2: Make the Player Move

Click on your player sprite and build this code:

  • Use a “when green flag clicked” block to start the game.
  • Add a “forever” loop so the code runs continuously.
  • Inside the loop, add four “if <> then” Control blocks, each containing a “key [arrow] pressed?” Sensing block — one for each arrow key (up, down, left, right).
  • For each key, use a “change x by” or “change y by” block to move the sprite. Use 10 for right/up and -10 for left/down.

Click the green flag and test — your character should move in all four directions using the arrow keys.

Step 3: Make the Target Move Randomly

Click on your target sprite and build this code:

  • “When green flag clicked” — start the game.
  • “Forever” loop.
  • Inside the loop: “glide 1 secs to random position.” This makes the target smoothly move to a new random spot every second.

Test it — the target should glide around the screen on its own.

Step 4: Add Scoring Without Counting the Same Catch Twice

Create a variable called Score for all sprites. On the player sprite, create a separate script from the movement script:

  1. Start with when green flag clicked, then set Score to 0.
  2. Add a forever loop. Inside it, put wait until <touching [target]?>.
  3. Next put change Score by 1. You may add a sound from the sprite’s Sounds tab.
  4. Finally, inside the same loop, add wait until <not <touching [target]?>>. The green not block is in Operators.

That final wait means a continuous overlap earns only one point. Once the sprites separate, the next touch can score. Keep scoring separate from movement: otherwise waiting for a collision could stop the arrow keys from responding.

Step 5: Add an Optional Faster Level

First make sure the one-second target movement works. To add difficulty, replace the target’s glide inside its forever loop with an if <Score > 9> then / else block. In the first branch, glide 0.6 seconds to a random position. In the else branch, glide 1 second to a random position.

This keeps both glide times positive, even after many catches. Test at scores 9 and 10. If the faster level feels frustrating, increase its glide time: a longer duration means slower movement. Game design includes making difficulty suitable for the player.

Step 6: Add Polish

Make your game feel finished with these touches:

  • Add a start screen with instructions using a “when green flag clicked” broadcast.
  • Make the target change costume or colour when caught.
  • Add a timer — challenge players to reach the highest score in 30 seconds.
  • Add a “Game Over” message when time runs out.
  • Add background music using Scratch’s built-in sound library.

What You Learned

By building this game, you practiced these essential coding concepts:

  • Events: Starting code with the green flag.
  • Loops: Using “forever” to run code continuously.
  • Conditionals: Using “if” blocks to check for key presses and collisions.
  • Variables: Creating and updating a score counter.
  • Movement: Controlling sprites with coordinates and glide blocks.
  • Randomness: Making the target move unpredictably.

What to Build Next

Now that you have built your first game, try these challenges:

  • Add obstacles that the player must avoid.
  • Create multiple levels with different backdrops and speeds.
  • Add a second player so two people can compete.
  • Build a completely different game type — a platformer, a quiz or a drawing app.

Save, Test and Share Safely

You can create a project without sharing it publicly. Use the editor’s File menu to save a copy to your computer, then reopen it to check that it works. An adult should review account requirements and privacy settings before a child creates an online account or shares a project. Use made-up character names, not a child’s full name, school or contact details.

  • Click the green flag twice: does Score reset to zero?
  • Hold two arrow keys: does diagonal movement behave as expected?
  • Stay touching the target: does the score increase only once until you separate?
  • Catch it again: does a second point appear?
  • Ask someone else to play without instructions from you. What would make the goal clearer?

If movement fails, check that the code belongs to the player, not the target. If scoring fails, check the sprite selected in the touching block. Rename your sprites clearly before assembling the scripts. A saved working version makes it easier to undo an experiment that goes wrong.

The official Scratch Ideas page offers further project prompts. Find more beginner-friendly learning on our Coding hub.

- Advertisement -spot_img

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest article