Hey team, let's get started on Activity Seven of Google CS First Sports.

In this activity, you'll build an extreme sports game in which a racer navigates an obstacle course for as long as possible.

You will also learn about the Computer Science concept called Loops.

Loops are commands that make something happen over and over again.

You've already used Loops in previous projects.

You used the forever loop in the Net sports game to make the ball bounce around over and over again forever.

You used a repeat loop in the batter up game to determine how many pitches to throw.

In this activity, you'll learn a few different ways the forever loop can be used in a game and you will also learn about different kind of loop called a repeat until loop.

A repeat until loop can be read in a sentence like this.

Repeat these actions until something specific happens.

For example, when running track, you repeat the run actions until you touch the finish line.

When you're at lunch, you repeat the action eat your food until you are out of food.

Computer scientists like you use loops and programs that make programs better.

One example is Hyperlapse Videos.

When you take video with your camera, it often comes out shaky.

Hyperlapse uses built-in stabilization technology to create moving timelapse videos with a handheld camera that don't look shaky.

Using Instagram's Hyperlapse app, a user can turn a video into a hyperlapse with the click of a button.

It may seem simple but there's a lot of computer science that happens behind the scenes.

First, the app speeds up the video.

This is done by removing frames from the video using a loop.

For example, to make a video play twice as fast, the app removes every other frame from the video.

Then the app lines up the frame so that the video is smooth.

Finally, it crops the video.

The result is a smooth, enjoyable hyperlapse.

Check out this sweet video of a biker's adventure.

Thanks to Computer Science, anyone can create highlight reels of their adventures with the touch of a button.

In this activity, you will use the repeat until loop as you program your extreme sports game.

Now you'll remix the starter project and sign in to Scratch.

Choose the racer you like best then delete the extra racer sprites from the project.

It's time to start.

Click the starter project link next to the video, sign in then click remix and delete the extra racer sprites.

When you're done, come back to this page and click the green arrow to watch the next video.


Open the starter project.
  • Cinema for Video on Instagram by Instagram ( licensed under CC BY-NC 3.0 (
  • "Hyperlapse car drive" by Peter L. ( -- Licensed by Creative Commons Attribution 3.0 Unported ( -- Video trimmed to needed length, audio removed
  • "Stabilization for Hyperlapse from Instagram" by Instagram ( -- Licensed by Creative Commons Attribution 3.0 Unported (