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

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.

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.)*

image

---

## ๐Ÿงญ 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! ๐Ÿ†**