andrew1431/capture-the-king — explained in plain English
Analysis updated 2026-05-18
Play a fast, simplified chess variant against another person in real time on your phone.
Study a Socket.IO based monorepo pattern for building a real time multiplayer web game.
Learn how to structure a game engine as a pure, dependency free package shared by server and client.
| andrew1431/capture-the-king | 0xradioac7iv/tempfs | 7vignesh/pgpulse | |
|---|---|---|---|
| Stars | 0 | 0 | 0 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 4/5 | 3/5 | 4/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires pnpm and building the engine and protocol packages before the server or web app will typecheck.
Capture the King is a mobile first online chess variant with one big twist: instead of winning by checkmate, you win by literally capturing the opponent's king. There is no check, no checkmate, and moves follow simplified pseudo legal rules rather than full chess legality. It also includes a signature rule called king echo castling, which punishes a certain castling move in a special way, all detailed in the project's separate plan document. The codebase is organized as a monorepo with several packages built using pnpm workspaces. A pure engine package holds the game logic and shared types with no outside dependencies, and both the server and the web client import it directly. A protocol package defines the shared event and message types for real time communication over Socket.IO, so the client and server always agree on the same contract. The server package is the authoritative Node.js game server built with Socket.IO, designed to scale down to zero when nobody is playing, and the web package is a mobile first single page app built with Vite, React, and Tailwind. To develop locally, you install dependencies with pnpm, then build the engine and protocol packages before the server or web app, since those consumers import compiled output rather than raw source. From there you can run the test suite, type checking, and linting, or start the server and web app locally. Opening two browser tabs and pressing play in each lets you match yourself against a second player for local testing. According to the project's own status notes, a lot of the game is already working: the core rule engine and its test suite are complete, local two player matches with move validation and reconnect handling work, and there is Firebase based authentication supporting Google login, email and password, and anonymous guest play. Public matchmaking with a waiting queue, plus private invite codes and shareable join links, are also finished, and finished games and player stats are saved to Firestore. Mobile polish such as tap to move, board flipping, and a move history panel is done as well. The final milestone, shipping the game live on Cloud Run and Cloudflare Pages with locked down database rules and automated deployment, is in progress, though the plan to switch from an in memory store to Redis and add spending guardrails is still deferred.
A mobile first online chess variant where you win by literally capturing the opponent's king instead of checkmate, built as a real time multiplayer web app.
Mainly TypeScript. The stack also includes TypeScript, React, Node.js.
No license information is stated in the README.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.