Lesson 2.6.E: Break Out Game demonstration
Microsoft Philanthropies TEALS Program
Introduction to Computer Science
Let's look at the starter code.
How do we know when the ball goes out of bounds?
The first option is easy enough. So let’s look at how to do the second.
Use the sprite paint tool to create a simple black band.
Position it at the very bottom edge of our game area.
Auto adjust the size to fit perfectly.
Always the back most layer. You don’t want it to show in front of the ball.
When the ball touches out of bounds stop the game.
Remember to broadcast show score whenever something changes.
You lose a life every time the ball goes out of bounds.
Putting stop game into all of our loops makes it easy now.
Design: Why make an extra sprite for out of bounds?
Should I make the ball motion script easier to understand? Yes! In unit 3 we will learn how to do that.
2.6.E: Debrief