Pong is a classic arcade game that simulates table tennis. This project provides a simple implementation of Pong using HTML5 canvas and JavaScript.
- Open the Game: Open the
index.html
file in your web browser. - Controls:
- Player 1 (Left Paddle):
- Move Up: Press 'W' key
- Move Down: Press 'S' key
- Player 2 (Right Paddle):
- Move Up: Press the up arrow key (↑)
- Move Down: Press the down arrow key (↓)
- Player 1 (Left Paddle):
- Objective: The objective of the game is to score points by hitting the ball past your opponent's paddle.
- Scoring:
- Each time the ball passes the opponent's paddle and hits the wall behind, the opponent loses a point.
- The first player to reach 10 points wins the game.
- Game Over: When one player reaches 10 points, the game ends and a winner is declared.
- HTML5: Used for structuring the web page.
- CSS: Used for styling the elements.
- JavaScript: Used for game logic and interactivity.
- Canvas API: Used for drawing graphics and animations.
This project is licensed under the MIT License, allowing for modification and distribution under certain conditions. Feel free to use and modify the code according to your needs.