Browser mouse-based ping pong game developed using JavaScript's canvas.
To play the game you will need to download the .html (game itself) and the .png (background of the game) files on your machine and save them on the same folder.
Once downloaded, you just need to open the .html file using any internet browser.
Every time the ball reaches the left or the right side of the screen, the player playing on the opposite side scores 1 point. The first to reach 5 points wins the game.
The player is supposed to defeat the computer AI by making the ball reach the right side of the screen.
Like in any common pong game, you are supposed to hit the ball whenever it comes close to your side of the screen. Avoid the ball reaching your side of the block.
Use the mouse movement to control your pad. Pushing the mouse forward makes the pad go up and pulling the mouse backwards makes the pad go down.
- Hitting the ball with the center of the pad reduces its speed and sends it in a more straight direction than it came;
- Hitting the ball with the corner of the pad increases its speed and sends it in a zig-zag direction;
- Hitting the ball with a faster, or slower, movement does not change its speed;
- The ball does not accumulate speed, its speed gets reset once hit by a pad;
- The ball can bounce on the upper and lower sides of the block, without losing nor gaining speed.