Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

arrow_back Speed Up the Chase

Transcript

Up for a challenge? In this screencast, you’ll learn how to make this game become more difficult the longer the player plays, then you’ll get to try the programming on your own.

To begin, select one of the chaser sprites.

Remember when you programmed a timer to keep score in this game? The timer is a variable.

When the game starts, the timer is set to to 0. Each second the player plays the game, the value of the timer goes up by one. So, after playing the game for 10 seconds, the value of the timer equals 10.

You can also create programming that makes the timer control the chaser sprite’s speed.

Place the timer inside the “move 10 steps” block.

The "move" block now controls the value of the timer.

When the timer equals 0, the sprite moves 0 steps each time the loop is run.

When the timer equals 5, the sprite moves 5 steps each time the loop is run.

If you put the timer variable inside each chaser’s “move” block, you can see that the game starts slowly, and increases in speed as play continues.

Once the time reaches 10 seconds, and the sprites are moving 10 steps each time the loop runs, the game gets really hard.

If you want to extend the game play, you can use a division operator with the timer, which will only move the sprites a fraction of the time.

For example, if you use “timer / 2,” after ten seconds, the sprite will only move 10 divided by 2, or 5 steps, each time the loop is run.

Your turn!

Ask a neighbor to play your game and see if they think it’s too easy or too hard--or just right!

Choose an Add-On
Play a Sound if Caught
Add a sound to your game and program your project to play that sound.
Play Your Game with a Friend
Program one sprite to be controlled by another player.
Change Up the Player
Change up your player's costume whenever it touches another sprite.
Speed Up the Chase
Make the game harder by making the chasers faster.
High Score!
Create a new variable that stores the game's current high score.
arrow_backward Back
Next arrow_forward
Instructions
  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!