Side project · Multiplayer game
A multiplayer game hub I specified, tested and shipped to the web
I wanted a free way to play card games with friends in the browser: no downloads, no accounts, no ads. I scoped it hard. An early idea included more games; I launched with Uno and all its variants plus Dobble, and set one constraint above everything else: it had to be free to host and free to play. Once that held up, I added a fifth game, a different kind: Bear With Me, a draw-and-guess game.
The rules had to be exact. The engine covers regular Uno, No Mercy (the 168-card deck, draw stacking and elimination), Flip’s two-sided deck, and real-time Dobble matching. After play testing on my laptop and phone together, I added the 0 and 7 swap rules to No Mercy. The game server is authoritative: each player receives a filtered view, so nobody can see another player’s hand in network traffic.
Hosting changed twice, both times to protect the free constraint. I first planned Cloudflare Durable Objects, switched to PartyKit when I was not sure Durable Objects were free, then moved back to Cloudflare with PartyServer once I confirmed they are on the free tier. The result runs at zero cost.
The engine is a TypeScript package with one interface for every game: init, apply, view and winner. The room server does not care which game it runs, so a new game is one engine module and one table component. 122 automated tests cover deck composition, rule enforcement, edge cases, state transitions and the room server.
Bear With Me was the real test of that design, because it runs on a clock. One player draws a secret word while the others guess in chat, and faster guesses score more. The engine stays pure: it gained a few optional hooks, and the room supplies the clock and wakes the game with a Durable Object alarm, so timers, hint letters and turn changes still run on the free tier and can be tested without waiting. Drawing strokes are validated and relayed outside the saved game state, so the server is not writing to storage on every pen movement. The word stays hidden from guessers, and chat from the drawer and from players who already guessed is private so nobody can give it away. A rules screen shows before every game and starts it once everyone taps ready.
I made the product calls from testing. Google sign-in blocked my own guests, so I switched to guest names: the host creates a room and shares a four-character code or link, and players type a name to join. A side review caught that “play again” could not reset a finished game, so the server gained a restart. I sent the card designs back several times until they looked close to the real cards with an original twist, and added a rules panel to the lobby so new players can read the rules before a match.
Built with an AI coding agent working from my specs. I owned scope, rules, acceptance criteria, design reviews, testing and release.