Grab a friend and see how long you can keep the ball in play! First friend to get the ball past their opponent 5 times wins. Red uses W and S, Blue uses O and K.
1) Create a backdrop and two paddles that start in the middle of opposing edges of the screen.
2) Assign keys to each paddle that make it move back and forth so that two people can play.
3) Create a ball that starts in the middle of the screen and moves forever. To begin the game, the ball should head towards a different point on the right wall every time the green flag is clicked.
4) When the ball hits player two’s paddle, the ball should head back towards player one.
5) If the ball makes it to player one’s paddle it should again bounce off the paddle back towards player two’s paddle.
6) If the ball hits the top or bottom edge of the screen, it should bounce off and continue in the same direction.
7) Create two variables. One to keep track of how many times the ball gets past player one, and the other to keep track of when the the ball gets past player two.
8) When the ball gets past either paddle, it should go back to the middle and start again.
9) Decide how many scores it should take to win, and create a celebration for when each player is victorious.