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 Never Ending Game


This add-on video will show you how to make your project run forever! In the core project, the receivers hid and never came back. In this add-on, the sprite will show up again after it catches the ball. To make the sprite wait before continuing, from the “control” menu, place a “wait” block after the “hide” block. Then, from the “looks” menu, place a “show” block after the “wait” block.

To make testing the code easier, delete the other receiver sprites so that only the modified sprite shows up.

Click the flag to test the code. When you pass the ball to the receiver sprite, it catches the ball, waits, hides, waits, then reappears. That’s cool, but the costume should switch back to the “Moving” costume when it re-appears. Fix this by adding a “switch costume to Moving” block right before the “show” block.

It might be more fun if the receiver shows up at a random place on the screen rather than in the same place where it received the ball.

To make that happen, from the “motion” menu, place a “go to x y” block above the “show” block. Then, from the “operators” menu, place one“pick random” block in the x section of the “go to” block and another “pick random” in the y section.

Negative 240 is the farthest left x location on the screen, and positive 240 is the farthest right. Place those numbers in the first “pick random” block. Similarly, negative 180 is the lowest y spot on the screen, and 180 is the highest. Place those numbers in the second “pick random” block. Test the code by clicking on the flag. Now, when the receiver catches the ball, it hides, waits a little, and reappears in a random place on the screen. Good. Now, duplicate this sprite so you have multiple receivers. Test your code often! Computer scientists like you test their code often so when something doesn’t work, they have a better idea of what caused it.

Here's the gameplan: Add a “wait” block after the receiver sprite hides. Make the sprite go to a random spot on the screen. Then, make it reappear.

Choose an Add-On
Never Ending Game
Make the receivers disappear and regenerate each time you pass to them.
Passing Back
The ball will always bounce back to the starting position.
Power/Receiver Speed
Add realistic variables with sliders that control the speed of the ball and the receiver sprites.
Keep Score
Count how many passes you complete.
Point & Pass
Change the appearance of the ball sprite.
Add some dialogue to the receivers.
arrow_backward Back
Next arrow_forward
  1. Watch the introductory video.
  2. Scroll down to see the add-on choices.
  3. Select an add-on and start creating!
  4. Choose another add-on, and continue building.