Friday, April 27, 2012

Simple Ping Pong game

Code for the paddle to stay in the same horizontal position, but move left and right with the mouse:











Code for the ball to bounce off all sides, add to the score and change direction when it hits the paddle and change the lives when you miss the ball and it touches the bottom of the stage.  The game stops when you have used all your lives.







No comments:

Post a Comment