Scratch Lesson 7: The Pong Game
Scratch Lesson 7: The Pong Game
Scratch Lesson 7: The Pong Game
In this lesson, we will explore a sample game named “Pong”. This game is
simple so it's a good place to start learning how to create a game. To open
the “Pong” game, click “Open” and browse to Projects->Games, and then
select “Pong”. Click OK to open the Pong project.
There are two sprites: ball and paddle. The ball sprite moves randomly by
its own, whereas the paddle sprite is moved by user moving the mouse.
ShallWeLearn | shallwelearn.com
Click the green flag to try the game. Use the paddle to hit the ball as it falls
down. You should soon find that if the ball hits the bottom of the Stage, the
game would end.
ShallWeLearn | shallwelearn.com
The image below shows how a sprite moves in the Scratch stage which is
based on the X-Y coordinate system.
ShallWeLearn | shallwelearn.com
The Combo block shown is activated The combo block shown is activated
when the ball hits Stage’s red bottom. when the ball hits the edges of the
Stage.
The combo block shown is activated when the ball hits the paddle.
ShallWeLearn | shallwelearn.com
TRY THIS: Try changing the randomness by changing the value in “pick
random ? to ?” block. To make it more random and the game more difficult,
increase the range of the degree change.
Also, you can make the ball leave trace of its movement by using the Pen
Tool Kit.
ShallWeLearn | shallwelearn.com