Lesson 8 V3
Lesson 8 V3
Lesson 8 V3
Game Over!
These lesson plans are available for free download for personal and educational use thanks to a generous grant by ICS Skills. It is distributed under
a Creative Commons Attribution-Non Commercial-NoDerivs licence, which means that you are free to copy, distribute, and display the lesson
plans provided you make no changes to the content (including the attribution to the authors and these license terms); you may not use these lesson
plans for commercial purposes, and you may not alter, transform, or build upon this work. We encourage the use of this material in educational
settings, and you are welcome to print your own copy of the lesson plans. We welcome enquiries and suggestions, which should be directed to the
authors (see www.lero.ie/educationoutreach).
Broadcasting
You may have noticed in the last lesson that if you lose all 5 lives in the game nothing happens.
Similarly if you get to the end of the maze, nothing happens. We will use broadcasting to create
suitable endings for the game, if you win or if you lose.
• Click on scripts.
Lesson 8 | 3
• When we send out a broadcast, it sends a message to another part of the program.
We need to create a program to receive this message and to act upon it.
• Click on the stage.
• Now we need three different pieces of code.
1. To show the Maze background when we start the game.
2. To show the Game Over background if we lose.
3. To show the You Win background if we get to the end of the maze.
• Click on the stage.
• Click on scripts.
Challenge Time 1!
1. Create a maze background.
2. Choose a sprite.
3. Use if statements and broadcasts to create a maze game.
4. Add Lives to your game. What happens if you lose all your lives?
What happens if you win the game? Add sounds e.g. cheering when you win.
5. Use a broadcast called “Level 2” to extend your game. You may need more
backgrounds for this.
6. Allow your classmates to play your game. See who plays the best!
Notes