A while back I saw a video[0] of people playing chess but using action cards to modify the rules mid-game (skip turns, reverse, draw 2, etc.). It looked incredibly chaotic and really fun to play, so I decided to actually build it as a playable online game. A small difference in Monochess is there's no need to call out a phrase if you just have one piece. I noticed while testing with the mrs. it became really annoying to keep doing this every move.
That also gave me a really good reason to build on Cloudflare using their entire stack, something I've been meaning to get my hands dirty with for quite some time. The app is built using SvelteKit and hosted on Pages, there's a Durable Object worker-backed game server, and D1 as the database layer for accounts/games.
This project included:
- A Custom Engine: Standard chess engines panic when forced into illegal board states. The engine wraps standard chess logic to allow for mid-turn state changes—handling concepts like rolling back a completed move, processing skip turns, etc.
- Custom State Serialization: Standard PGN breaks the moment an action card is played. Monochess uses a custom JSON-based serialization schema that deterministically records both the chess moves and the card actions. This allows the game state to be completely reproducible for history, replays, and validation.
- Durable Objects Game Server: Real-time multiplayer is handled entirely on the Edge via Cloudflare Durable Objects. The DO acts as the single source of truth, managing WebSocket connections, verifying actions against the ruleset, handling disconnects, and running the turn timers.
- D1 Persistence & Matchmaking: Using Cloudflare D1 to store the serialized game records, manage player authentication, and track ELO via a custom Glicko-2 rating implementation.
It's free to play here: https://monochess.pages.dev
Would love to hear what you think, or if you manage to find any absolutely broken card/move combos. There's also a feedback/bug report form on the site itself (writes to CF KV and a worker runs to email it to me (I swear I'm not sponsored by CF xd)).
LLM aid was minimal, but Gemini 3.5 Flash is pretty good for small UI enhacements, and generally organizing components in Svelte. Was pleasantly surprised.