I’ve been thinking about Pong lately; specifically: How can I write a game that retains the spirit of Pong but changes the gameplay a bit? Enter Crazy Tennis!
Crazy Tennis! pits two players against each other, or one player against the computer.
- Every time a ball hits a paddle, the ball gets faster.
- Every time a human player returns a ball, their paddle gets slower.
- Every time the computer returns a ball, its paddle gets faster.
- When a ball passes a human player, the speed of that player’s paddle resets to the original speed. Also, if that player is playing against the computer, then the computer’s paddle resets to the original speed, too.
- An extra ball is added to the playfield every 30 seconds.
This game gets challenging quickly. Feel free to change the constants in the
initGame function to change the parameters of the game.