Learning Hub/Scratch/Session 5

Session 5 of 5 · 60 minutes

Game Design: Cave Surfing

Finish with an action game: obstacles, lives and a game over. Then test it, improve it and show it.

Goals

By the end of this session you can:

  • Build the parts of an action game: a player, obstacles and a score
  • Use lives and game over to end a game
  • Test a game, find a problem and fix it
  • Remix the Cave Surfing Game or the Launcher Game and make it your own

Words to know

obstacle
Something the player must avoid, like a rock in a cave.
lives
A variable that counts how many chances the player has left.
playtest
Playing your own game, and letting others play it, to find problems.

The lesson

Step 1: Cave Surfing Game

Today’s main project is Game Design - Cave Surfing Game. Open the starter, play it, and use See inside to look at how the player and the obstacles work.

Step 2: The parts of an action game

Look inside the game and find each of these:

  • A player sprite that you control.
  • Obstacles that move toward the player.
  • A variable for the score or the lives.
  • A script that decides when the game is over.

Step 3: Lives and game over

A lives variable counts the player’s chances. When the player touches an obstacle, change lives by -1. A second check, if lives = 0 then stop all, ends the game.

Step 4: Test and improve

Professional game designers playtest. Play your own game, then ask someone else to play without any help from you. Watch where they get stuck. Fix one thing at a time and test again.

Step 5: Project to remix

If your class finishes the main project early, try this one.

Exercise

Lives and game over

  1. Make a variable called lives and use set lives to 3 under when green flag clicked.
  2. On an obstacle sprite: forever, then if touching Player then, change lives by -1, and go to its start position.
  3. Add a second if inside the loop: if lives = 0 then, stop all.
  4. Play it. Do you lose after three hits? Change 3 to a different number and try again.
Need a hint?

The = block is in Operators. Drag the lives variable into its left side and type 0 on the right.

Small project

My finished game

Remix the Cave Surfing Game and make it yours. Then playtest it and improve it before you show it.

  1. Open Cave Surfing Game and click Remix.
  2. Play it once. Find the player, the obstacles and how the game ends.
  3. Change the look and feel: new sprites, backdrops and colors.
  4. Change one rule: how fast things move, how many lives you have, or how points are scored.
  5. Playtest: ask a classmate to play without your help, and write down one thing that confused them.
  6. Fix that one thing, and show your finished game.

Stretch it: Remix the Launcher Game instead, or add a second level.

Quiz

Check your understanding

Pick one answer for each question. Your score appears right in the page; nothing is sent anywhere.

  1. Question 1What is a playtest?
  2. Question 2Which variable would you use to count how many chances the player has?
  3. Question 3How can a game end when lives reach zero?
  4. Question 4A friend plays your game and says the rules were not clear. What do you do?
  5. Question 5In the cave game, the player must avoid the rocks. What is a rock called in game design?