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 Dangerous Cave Walls

Choose an Add-On
play_circle_filled
Make Your Own Music
Add a drum beat and background music to your game.
arrow_forward
play_circle_filled
Add Another Cave Section
Design a new cave sprite with black edges and add it to your game.
arrow_forward
play_circle_filled
Make the Game Harder
Make the player press the spacebar over and over to keep the sprite in flight.
arrow_forward
play_circle_filled
Dangerous Cave Walls
Make the player sprite explode when it touches the walls of the cave.
arrow_forward
play_circle_filled
Add Another Level
Create additional game levels that get faster and harder as the player progresses.
arrow_forward
play_circle_filled
Dive!
Make the sprite dive, or move down faster than it falls.
arrow_forward
  • 1. Side Scrolling Games and If-Else Statements
  • 2. Create a Scrolling Backdrop
  • 3. Making the Parrot Rise and Fall
  • 4. Winning and Losing at Cave Surfing
  • 5. Add-Ons
  • 6. Reflection
  • 7. Wrap-up: Cave Surfing Game
  • 8. Wrap-up: Share Your Project
  • 9. Wrap-up: Show Your Project
arrow_backward Back Next arrow_forward
Transcript

When the bird runs into the walls of this game, the player loses. In this add-on, you’ll make it so the player sprite explodes when touching the walls of the cave.

One way to make a sprite explode is through costume changes. For example, there is already an explosion costume for the parrot in the starter project you remixed.

This “switch costume to” block switches to a specific costume.

If explosion is not the costume in the “switch costume to” block, click the drop-down menu, and change it to “explosion.”

The parrot should explode if it touches the edges of the cave. Cave edges are colored black, so, the “switch costume to explosion” block belongs inside an “if touching color black” block.

Now, this part of the program reads: Test your code.

Great! The sprite explodes when touching the cave walls. You may want to add a sound that will play when this happens, or use a “repeat” block with a “change size” block to make the sprite get bigger when it explodes. Exploring fun customizations like this is one of the best parts of computer science, and it’s a great way to make your game more interesting and fun to play.

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!