https://github.com/tharindu714/pongai.com
Welcome to Pong AI โ a modern, crisp take on the classic Pong game with responsive visuals, smooth controls, and a cheeky AI opponent that loves a good rematch.
https://github.com/tharindu714/pongai.com
github javascript pong-game
Last synced: about 1 month ago
JSON representation
Welcome to Pong AI โ a modern, crisp take on the classic Pong game with responsive visuals, smooth controls, and a cheeky AI opponent that loves a good rematch.
- Host: GitHub
- URL: https://github.com/tharindu714/pongai.com
- Owner: Tharindu714
- License: mit
- Created: 2025-08-09T02:29:31.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-09T02:37:44.000Z (11 months ago)
- Last Synced: 2025-08-09T04:15:50.380Z (11 months ago)
- Topics: github, javascript, pong-game
- Language: JavaScript
- Homepage: https://tharindu714.github.io/pongai.com/
- Size: 131 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Pong AI ๐ โ Play & Challenge the Bot
**Dev by Tharindu** ([github.com/Tharindu714](https://github.com/Tharindu714))
> Play directly: ๐ **[https://tharindu714.github.io/pongai.com/](https://tharindu714.github.io/pongai.com/)**
---
Welcome to **Pong AI** โ a modern, crisp take on the classic Pong game with responsive visuals, smooth controls, and a cheeky AI opponent that loves a good rematch. This repo is perfect for anyone who wants a quick browser game, a demo for frontend skills, or a fun time-waster. ๐
## ๐ฏ Highlights
* โ
**Play in your browser** โ no install required (GitHub Pages live demo)
* ๐ฎ **Controls:** mouse, touch, keyboard (W / S / โ / โ)
* ๐ฑ **Mobile friendly** โ touch controls supported
* ๐ฅ๏ธ **HiDPI / responsive canvas** for crisp graphics on all screens
* ๐ Tiny built-in sound effects using WebAudio (no assets)
* โ๏ธ Clean, well-commented code โ comes in both a user-friendly JS file and a TypeScript source
## โถ๏ธ Play Now
**Live demo:** [https://tharindu714.github.io/pongai.com/](https://tharindu714.github.io/pongai.com/)
Click **Start โถ** and show that bot who's the boss! ๐
## ๐ก Why play this one?
This version of Pong adds subtle modern touches: a glowing center, rounded paddles, improved collision physics (so your hits feel *real*), a smarter but fair AI, and keyboard/touch support so you can challenge it anywhere.
---
## ๐ ๏ธ Run Locally
Want to tinker? Here's how:
```bash
# Clone the repo
git clone https://github.com/Tharindu714/pongai.com.git
cd pongai.com
# Option A โ quick open (works in most browsers):
# open index.html in your browser
# Option B โ run a simple HTTP server (recommended for audio & modules):
# Python 3
python -m http.server 8000
# then visit http://localhost:8000
```
If you prefer TypeScript development, `game.ts` is provided โ compile with `tsc game.ts --outFile game.js` or use your preferred bundler (Vite/Parcel/webpack).
---
## ๐ฎ Controls
* **Mouse / Touch:** Move left paddle up & down
* **Keyboard:** `W` / `S` or `โ` / `โ`
* **Start:** Click **Start โถ** or press spacebar to serve
* **Pause / Restart:** Use the HUD buttons
---
## ๐ธ Screenshots / GIF
*(Paste your GIF or screenshots below โ they look great on the repo front page.)*

---
## ๐งญ Architecture / Notes
* Single-canvas rendering with logical resolution (800ร440) scaled for device pixel ratio
* Simple AI that predicts ball position with adjustable speed โ easy to tweak
* Sound generated with WebAudio โ no file dependencies
**UML / Diagram**
*(Paste UML diagram or architecture sketch here)*
---
## ๐ค Contribute
Love the game and want to help? Pull requests are very welcome!
* Add difficulty levels
* Add high-score persistence (`localStorage` or server backend)
* Improve visuals, particle effects, or add multiplayer
---
## ๐คฉ About the Dev
**Tharindu Chanaka** โ Frontend tinkerer & indie game fan.
GitHub: [https://github.com/Tharindu714](https://github.com/Tharindu714)
Website / Demo: [https://tharindu714.github.io/pongai.com/](https://tharindu714.github.io/pongai.com/)
If you enjoyed the game, star โญ the repo and drop a message โ I love seeing people play! If you want a custom version (branding, difficulty, or integration into your site), DM me on GitHub.
---
## ๐ License
This project is released under the **MIT License** โ feel free to use, fork, and remix.
---
**Have fun slamming that little blue ball โ and donโt forget to brag when you beat the AI! ๐**