Pong (Bounce Count)

 image017   Control the paddle using the mouse. A variable count the number of bounces. 1 life – if the ball touches the floor, you lose. 

How many bounces can you do?

 image003 Open the ‘Easy Pong’ project that you completed earlier. 

Click: File > Open

 image009 Navigate to the folder where you saved the “Easy Pong” project. 

Select “Easy Pong” project and click ‘OK’

 image007 Save the project with a new name 

Click: File > Save As..

image009 Set the New Filename as ” Pong with Bounce Count ” 

Click: ‘OK’

Keeping track of the number of ‘lives’…

 

 image011 Click on ‘Variables’. 

A variable stores the value of something.  We might have variables to store the number of ‘lives’, ‘score’ or someone’s name.

 image013 Click ‘Make a variable’
 image015 Type in ‘Count  and click ‘OK’.
 image017  Notice a display for ‘Count’ is on the top left hand corner of the stage.
 image019 Click on the ‘stage’
 image021
Add blocks as shown.
 

image023

Change the blocks on the ball sprite to as follows:
Save.Try it out!

 

Challenge the person beside.  Who can get the most bounces?????