https://github.com/rsync25/pinpong-game
PingPong Game by GTP-5
https://github.com/rsync25/pinpong-game
Last synced: 10 months ago
JSON representation
PingPong Game by GTP-5
- Host: GitHub
- URL: https://github.com/rsync25/pinpong-game
- Owner: Rsync25
- License: mit
- Created: 2025-08-08T16:02:02.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-08T16:27:35.000Z (11 months ago)
- Last Synced: 2025-08-08T18:21:29.625Z (11 months ago)
- Language: HTML
- Homepage: https://rsync25.github.io/Pinpong-game/
- Size: 10.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ping Pong PWA Game
A responsive, mobile-friendly **Ping Pong** game built with HTML5 Canvas and JavaScript, now enhanced with **Progressive Web App (PWA)** support for offline play.
## Features
- Classic Pong gameplay
- Responsive layout for desktop and mobile
- Mouse/touch controls for the player paddle
- AI opponent paddle
- Offline capability via Service Worker
- Installable as a PWA with an **Install App** button
- Precache of assets for full offline functionality
## Files
- `index.html` – The main game and UI logic
- `manifest.json` – PWA manifest configuration
- `sw.js` – Service Worker for caching and offline use
## How to Run Locally
1. **Clone or download** this repository.
2. Serve files via a local HTTP server (PWA requires `http` or `https`). You can use Python’s built-in server:
```bash
python3 -m http.server 8000
```
or Node’s `http-server`:
```bash
npx http-server .
```
3. Open your browser and navigate to:
```
http://localhost:8000
```
4. Play the game! You’ll see the **Install App** button when eligible.
## PWA Installation
- On supported browsers, click the **Install App** button or use the browser’s install prompt.
- The game will be installed as a standalone app and will work offline.
## Offline Mode
- When installed or after the first visit, assets are precached by `sw.js`.
- The game remains playable without an internet connection.
## License
This project is licensed under the MIT License.