PERSONAL PROJECT · 2026
Bida 8 Bi
Online 8-ball pool I vibe coded so my friends and I could finally play together, without lag, bugs, or ads.
- JavaScript
- Three.js
- MQTT
- WebSockets
- PWA
- Service Worker
- GitHub Pages

Why I built it
I just wanted to play pool with my friends. Every pool app I tried was laggy, buggy, full of ads, or didn’t let us play together.
So I built my own to fix my own pain point. I vibe coded it with AI: I described what I wanted, played it, found what felt wrong, and kept iterating until it felt like a real game.
What it does
Play with friends
Create a room, send the 4-digit code or link, and you’re playing. No account, no install. Reload the page and the match continues.
Play against the bot
Three levels: Easy, Medium, Hard. The bot picks shots, places the cue ball after fouls, and sometimes teases you with emotes.
Built for phones
Touch controls for aiming, fine-tuning, power, and cue tip position (follow, draw, side spin). Mouse and keyboard work too.
Install as an app
A PWA that opens full screen in landscape and still lets you play the bot offline.
Make it yours
Name, avatar (upload a photo or pick one), 4 table colors, 6 cues with a 3D preview.
Real match feel
Turn timer from 15 seconds to 5 minutes, match history, emotes, and real recorded ball sounds.
How it works
- 3D renderingThree.js draws the table, balls, and cue, with a live 3D preview for cue and table picks.
- Billiards physicsHand-written physics with sub-stepped simulation per frame, ball–ball and ball–cushion collisions, and top, back, and side spin.
- Real-time multiplayerTwo devices sync through a public MQTT broker over secure WebSockets. Room state is kept on the broker so players can reload and rejoin. Only the player whose turn it is can shoot; re-racking needs both players to agree.
- Bot AIShot search using ghost-ball aiming, cut angles, and clear-path checks, tuned into three difficulty levels.
- PWA & offlineWeb app manifest and a service worker that always fetches the latest version, with an offline fallback.
- AudioCC0 recordings converted to mono 16-bit, trimmed, and embedded as base64 so the game needs no extra downloads.
- DeliveryOne static HTML file on GitHub Pages. No backend, no build step, no ads.
Screenshots


Want to play?
Open it on your phone and send the room code to a friend.