Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shamikaredkar/ping-pong-game
This interactive game leverages fundamental web technologies to simulate a classic Ping Pong match against a sophisticated AI opponent. It features collision detection algorithms, event-driven user input handling for paddle control, and utilizes audio elements for enhanced gameplay feedback.
https://github.com/shamikaredkar/ping-pong-game
aigame arcade-game canvas canvas-game html5-game html5canvas interactive-game javascript javascript-game
Last synced: about 2 months ago
JSON representation
This interactive game leverages fundamental web technologies to simulate a classic Ping Pong match against a sophisticated AI opponent. It features collision detection algorithms, event-driven user input handling for paddle control, and utilizes audio elements for enhanced gameplay feedback.
- Host: GitHub
- URL: https://github.com/shamikaredkar/ping-pong-game
- Owner: shamikaredkar
- Created: 2021-11-11T15:17:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-15T20:18:50.000Z (9 months ago)
- Last Synced: 2024-04-16T01:02:35.997Z (9 months ago)
- Topics: aigame, arcade-game, canvas, canvas-game, html5-game, html5canvas, interactive-game, javascript, javascript-game
- Language: JavaScript
- Homepage:
- Size: 307 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Gameplay Demo](https://github.com/shamikaredkar/Ping-Pong-Game/blob/main/Preview.gif)
# Ping Pong Game
Welcome to the Ping Pong Game! This project is a simple yet engaging game built with HTML5 Canvas and JavaScript, allowing players to enjoy a classic game of ping pong right from their web browsers.
## Features
- **Realistic gameplay:** Simulates a real ping pong game with responsive paddles controlled by keyboard input.
- **Sound effects:** Includes sounds for the ball hitting a paddle, scoring a point, and hitting the game walls.
- **Score tracking:** Keeps track of the player's and AI's scores, displaying them on the canvas.
- **Dynamic AI opponent:** The AI paddle moves based on the ball's position, providing a challenging gameplay experience.## How to Play
- **Start the game:** Open the `game.html` file in a web browser to start the game.
- **Player control:**
- Use the `Up Arrow` key to move the paddle up.
- Use the `Down Arrow` key to move the paddle down.
- **Winning the game:** The game continues until either the player or the AI scores 20 points. An alert will be shown for the winner, and the game window will close.## Technologies Used
- **HTML5**
- **CSS3**
- **JavaScript**
- Canvas for drawing the game elements.
- Event listeners for paddle control.## Setup
To run this project locally:
1. Clone or download the project to your local machine.
2. Open the `game.html` file in a browser to start playing.