Pong

Pong Control the paddle using the mouse.  1 life – if the ball touches the floor, you lose.
delete RIGHT mouse click on the cat and select ‘delete’
NewSprite Click on the ‘new sprite’ button
DrawEllipse Select the Ellipse toolMake sure the ‘solid’ fill is selected below
 Ellipse Draw a very small ellipse (holding down SHIFT) will make sure it’s a perfect circle.Click OK.
 NameBall With the sprite selected, rename it to ‘ball’
 NewSprite Now for the paddle… click ‘Paint new sprite’.
 Rectangle Draw a small paddle using the rectangle tool, in a colour of your choice.
 BallandPaddle Click and drag the paddle towards the bottom of the stage.
 image018 Rename the paddle sprite to ‘paddle’.
 NewSprite Now for the dead zone …click ‘Paint new sprite’.
 DeadZone Draw a red rectangle using the rectangle tool which is the fully width of the screen.
 DeadZoneName Rename the dead zone sprite to ‘dead_zone.
 ClickBall Click on the ‘ball’ sprite
 BallCode Add the code as shown.When the flag is clicked, the ball will ALWAYS shoot upwards in a random direction.Those physicists amongst you will realise that we’re not using the proper laws of physics!Press the green flag to test it so far…

 

 

What happens??

 ClickPaddle Click on the paddle.
 PaddleCode Add the script as shown.The paddle will be controlled by the mouse.
 SaveAs Save your projectClick:  Save > Save as
 SaveFolder Select the folder you want to save you project in.Set the New Filename as “Easy Pong”Click: OK

 

Finished this? 

Try the following:

  • make the ball go slower.
  • make the ball go faster.
  • change the noise when the ball hits the paddle.
  • add your own sound when the ball hits the dead_zone.

If you can change the paddle to be controlled by the left and right arrow keys.