All work
Pool
A 2D pool game for the browser, with online 1v1 multiplayer and a physics engine written for it.
- Status
- Live
- Since
- June 2026
- Stack
- JavaScript, PixiJS, PeerJS, Vite
- Languages
- English, Spanish
- License
- MIT

Two ways to play
Singleplayer is free practice. Multiplayer is a 1v1 match: one player creates a game and shares a four-letter code, the other joins with it. Turns follow standard 8-ball rules.
To shoot, drag from the cue ball and release. The further you pull, the more power.
No server in the middle
The two players connect to each other peer-to-peer through PeerJS. There are no game servers to run and nothing to set up on the router.
What is inside
The code is split by responsibility. The physics are not a library: collisions, friction and pockets are handled by a billiards engine written for this game, and there is a self-test for it.
src/physics.jsBilliards engine: collisions, friction, pocketssrc/scene.jsRendering with PixiJSsrc/net.jsPeer-to-peer multiplayer with PeerJSsrc/main.jsGame loop, input and turnssrc/ui.jsMenu, HUD and dialogssrc/audio.jsSound effectssrc/i18n.jsEnglish and Spanish textsrc/config.jsTable, ball and physics constants