Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ramazancetinkaya/ping-pong-game

A classic Ping Pong game built using HTML5, CSS, and JavaScript. This simple, interactive game lets you play against the computer or a friend in a two-player mode.
https://github.com/ramazancetinkaya/ping-pong-game

css html5 javascript ping-pong ping-pong-game pingpong pingpong-game

Last synced: 1 day ago
JSON representation

A classic Ping Pong game built using HTML5, CSS, and JavaScript. This simple, interactive game lets you play against the computer or a friend in a two-player mode.

Awesome Lists containing this project

README

        

Ping Pong Game


A modern and visually appealing ping pong game implemented using HTML5, CSS, and JavaScript. This project offers an engaging experience with realistic physics, customizable gameplay options, and a sleek user interface.


Ping Pong Game Logo


⭐️ If you find this project useful, consider giving it a star to show your support. ⭐

---

## Demo

[![Demo](https://img.shields.io/badge/Demo-View%20Demo-blue)](https://ramazancetinkaya.github.io/ping-pong-game/)

## Features

### Game Modes
- **Human vs AI**: Play against an AI opponent with dynamic behavior for a challenging experience.
- **Player vs Player**: Compete with another player using keyboard controls.

### Gameplay Settings
- Choose from three match types: `First of 1`, `First of 3`, and `First of 5`.
- Realistic physics engine that adapts ball speed dynamically based on paddle interactions.

### Controls
- **Human vs AI**:
- Human: Move the paddle using the mouse.
- **Player vs Player**:
- Player 1: Use `W` and `S` keys to move up and down.
- Player 2: Use `Arrow Up` and `Arrow Down` keys to move up and down.

## Installation

1. Clone this repository:
```bash
git clone https://github.com/ramazancetinkaya/ping-pong-game.git
```
2. Navigate to the project directory:
```bash
cd ping-pong-game
```
3. Open `index.html` in your preferred browser.

## Usage

1. Launch the game by opening `index.html`.
2. Select a game mode (`Human vs AI` or `Player vs Player`).
3. Choose a match type (`First of 1`, `First of 3`, `First of 5`).
4. Start playing and enjoy!

## File Structure

```
ping-pong-game/
├── index.html # Main HTML file
├── style.css # Game styles
├── script.js # Game logic and physics engine
└── README.md # Project documentation
```

## Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.