A simple Pong game built using JavaScript, where Player 1 is controlled by an AI opponent and Player 2 is controlled by the user.
- AI-controlled Player 1 with basic movement logic
- Player 2 controlled using
ArrowUp
andArrowDown
keys - Collision detection for ball and paddles
- Score tracking for both players
- Game resets when the ball goes out of bounds
- Dotted center line for aesthetics
- Player 2:
- Move up:
ArrowUp
- Move down:
ArrowDown
- Move up:
- Player 1 (AI): Moves automatically based on the ball's position
- Clone the repository:
git clone <repository-url>
- Open
index.html
in a browser. - Use the arrow keys to move Player 2's paddle and try to score against the AI opponent.
- The game ends when a player reaches the score limit.
- HTML5 Canvas
- JavaScript
- Improve AI difficulty levels
- Add sound effects
- Mobile responsiveness
- Enhanced UI/UX
This project is licensed under the MIT License.