Pong Game

You can use the Tutorial or just follow the instructions below...


Background & Sprite

  • Add 'Neon Tunnel' Backdrop (under 'Space')
  • Add a Ball Sprite ( & delete the cat sprite)

Bounce around

  • when Flag clicked, have it point/start moving at 45 degrees
  • in a Forever loop, have it move and then bounce in on the edge of the stage

Add paddle

  • Add another Sprite - a paddle

Move the paddle

  • have it match the horizontal position where the mouse/cursor is (mouse x)
    • Set x to >> replace the number with mouse x

The mouse x is under Sensing...

make ball bounce off paddle

  • Select the ball sprite
  • add another Flag event with code to bounce the ball off the paddle
    • add IF/THEN block  (Sensing> test if touching paddle)
    • wait .5 seconds after moving 

Add a score

first add/make a new variable...

name it 'score'...

  • choose 'Score' from the menu in the change action
  • Insert the Change Score block - if ball is touching the paddle, then score goes up

Reset score

  • reset Score - add another new Flag event for the ball

Red line sprite

  • add red Line sprite and move it to the bottom of the stage

Game Over

  • in the Line sprite, add a Flag event
  • use the Sensing action to test if the ball is touching the red line, then stop everything