Catch Me If You Can

In this challenge we will create a three-player game using Scratch.

One player (the yellow ball) will be chased by two other players the red player and the blue player.

  • The red player will use the arrow keys to control their sprite.
  • The blue player will use the “WASD” keys to control their sprite.
  • The yellow player will use the mouse pointer to control their sprite.

The game will use two score variables one for the red player, one for the blue player. At the start of the game both scores will be initialized to 0. Every time a player collides with the ball their score will be incremented by 1. The ball will then be randomly moved on screen by resetting its x and y coordinates.

Scracth Code


To implement this game you will have to create three sprites and use the code provided below:

Red SpriteBlue SpriteYellow Sprite
The Red Sprite, called Red Dot, will be controlled using the arrow keys:

The Blue Sprite, called Blue Dot, will be controlled using the WASD keys:
The Yellow Sprite, called the Ball, will be controlled using the mouse pointer. it will also have a collision detection algorithm to detect if the ball has been caught by either the red sprite or the blue sprite.

Extension Task: Adding Walls/Platforms


To make this game more interesting we will add walls/obstacles that the red player, the blue player and the yellow ball will have to avoid when moving around.

Step 1: The StageRed SpriteBlue SpriteYellow Ball
Using a plain colour create a background for the stage by adding walls:

Adapt the script of your red sprite so that it cannot go through the walls:
Adapt the script of your red sprite so that it cannot go through the walls:
Adapt the script of your yellow sprite so that it cannot go through the walls:

Did you like this challenge?

Click on a star to rate it!

Average rating 3.1 / 5. Vote count: 44

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: ,