Blendchess is a chess game where the information is intentionally limited in a Kriegspiel style.
- The rules are classical chess; with a subtle difference: you can only see your own pieces, and nothing else!
- An umpire announces what both players would hear in Kriegspiel: someone moved, a piece was captured (and where), someone tried an illegal move.
- Check is announced only to the player in check, together with where it comes from (file, rank, diagonal or knight).
- Once the game ends the fog lifts: replay every move and export the PGN.
Well, blindchess is taken, and blind+chess is too long, and the game is literally fun blendy mess.
Local Duel: pass-and-play on one device. The board flips to the side to move and shows only their pieces; a banner on top says whose turn it is and what the opponent just did.Play Online: pick Blitz 5+3 or Rapid 10+0, then either Find game to get paired by rating, or Invite a friend to get a link, a QR code and a short code. Your friend opens the link (or types the code under Join) and the game starts. Every online game has the same server clock, rating, watchers and replays; reconnects resume your seat automatically.- Friend games have four toggles: Ranked (on by default; counts for both ratings), Party mode (on: watchers see the whole board; off: they see the fog), Hard mode (an illegal try costs your turn) and No clock (take your time; never ranked).
Watch: every online game is listed under Live now for anyone to watch.Profiles: every player has a public page with their rating, record and recent games. Each game opens as a full replay with a shareable link (?game=...); profiles are at?p=name.Archive: finished games are saved on your device for replay and PGN export.
- Start as a guest. The lobby makes you an account on your first visit, with nothing to fill in. It lives in this browser only. Your nickname is unique and can be changed in the lobby.
- Secure it to keep it. In
ACCOUNT, add a passkey (your phone or computer's face, fingerprint or PIN; it syncs through your password manager) or get an account key (BLND-XXXX-..., a code you save somewhere safe; it works on any device). Either one lets you sign in on another device and keeps your rating if you clear the browser. Having both is a backup. - Devices. Each browser you sign in on gets its own session.
SIGN OUT OTHER DEVICESends all of them but the one you're on, including any ranked game they are sitting in (their clock keeps running). - Leaderboard. Guests are rated like everyone else, but only secured accounts are listed.
- Passkeys are offered on
blendchess.pages.dev,blendchess.com(includingwww) andlocalhostfor development. A passkey belongs to the domain it was made on. To move the same account between Pages and the custom domain, sign in with an account key and add a passkey on the new domain. - Normal deployments preserve accounts and games. An intentional full reset is controlled by
DATA_VERSIONinshared/protocol.js; see release resets. The initial value1preserves all existing data.
- Elo. Start at 1200. K=40 for your first 10 games, then 24. A win against a stronger player is worth more, and the rating is only ever changed by the server when a game it arranged ends.
- Clocks. Blitz 5+3 and Rapid 10+0. The clock runs on the server: time is charged on every move and the flag falls even if both tabs are closed. Disconnecting does not stop your clock.
- Leaving. Leaving a ranked game keeps the seat reserved, but the clock keeps running. If it runs out, the game is lost on time.
- Matches. The matchmaker pairs players with nearby ratings, widening the window the longer you wait, and avoids immediate rematches.
The server is the authority for everything that decides a rating:
- Online rooms are created only by the lobby, for exactly two players. Each seat is locked by a random ticket handed to that player; without it nobody can take a seat.
- Anyone can watch a lobby game and sees the whole board live. Players are trusted not to watch their own games.
- Results are reported by the room itself, once per game, and the lobby only accepts results for games it arranged. Duplicate reports change nothing.
- Two accounts on the same network that meet through Find game get an unrated practice game instead. Friend invites ignore networks: you chose who you play.
- Rating changes are clamped, new identities are rate limited per network, and the queue, room creation, socket count, message size and message rate are all capped.
- Options (hard mode, party mode) are fixed in lobby-arranged games.
What it cannot stop: someone running an engine locally, two accounts on different networks colluding, or a player watching their own game, since live boards are public. Ranked is for fun and players are trusted; the same-network rule, the rating clamp and rematch avoidance only make boosting take effort.
- Legal moves, check, checkmate, stalemate, castling, promotion, and en passant follow standard chess logic (I won against a friend using en-passant by mistake once!)
- Draw logic includes threefold/fivefold repetition, 50/75-move rule, and insufficient material.
- Online mode is authoritative: the backend validates moves and clocks, and each player only ever receives their own view of the game. Ranked ratings are computed and stored on the server.
- Hard mode is optional: illegal moves forfeit the turn (recorded as
--in the PGN), except when the mover is in check. - Rules options lock once the first move is played. A draw offer stands until the opponent moves. Rematches swap colours.
- Open the game in your browser and press start.
- Pick
Play Onlineto find an opponent or invite a friend, orLocal Duelfor pass-and-play on one device. - Click or drag your pieces. Dots mark squares that might be legal; dashed corners are pawn captures worth a try. Keyboard works too: arrows, Enter, Esc.
- Offer a draw or resign when needed. After the game: replay, PGN, rematch.
Retro extras: four palettes (the colour dots in the top bar), CRT scanlines, chiptune sound effects and optional music. Motion effects respect prefers-reduced-motion.
Blendchess is inspired by Kriegspiel, a historical chess variant built around incomplete information and an umpire (Wikipedia). This project keeps core chess structure but adds selective hidden information to create a similar tension in online play.
This project initially started as a benchmark to test the latest Codex-Spark model (OpenAI announcement).
The first results were not great, so I decided to keep building it a few minutes a day, step by step, while playing with friends. The goal is to make it stable enough to have fun in real places and parties.
I regularly used 5.3-Codex-Xhigh for core game logic, Opus 4.6 for frontend work, and some Gemini 3.0 Pro along the way.
- Kriegspiel pawn-try announcements ("any captures?") as an optional rule.
- Tournament and club rooms.
python3 -m http.server 8080Then open http://localhost:8080.
cd server
npm install
npm startUse ws://localhost:3000 in the app.
Deploy Worker backend:
cd ws-worker
npx wrangler login
npx wrangler deployDeploy frontend to Pages:
npx wrangler pages project create blendchess
npx wrangler pages deploy . --project-name=blendchessUse wss://<worker-subdomain>.workers.dev as the server URL in the app (OPTIONS > ADVANCED). Each room runs in its own Durable Object, and one LobbyHub Durable Object holds the ranked queue and ratings. The worker also serves GET /leaderboard?limit=20.
To set a default server URL, define before loading app.js:
<script>
window.BLENDCHESS_SERVER_URL = 'wss://blendchess-ws.<subdomain>.workers.dev';
</script>- The server redacts every message per viewer, so the dev console shows only your own pieces and moves. Spectators of a private room see the fog too (unless party mode is on); lobby games are public and watchers see the whole board.
- Stale online snapshots are rejected by version checks.
- PGN export is enabled only after the game ends.
- Spectator roster is shown as count, not spectator name list.
cd server && npm ci && npm test # engine perft, room logic, session, Node end-to-end
cd ws-worker && npm ci && npm test # Durable Object (mocked hibernation API)
# same end-to-end suite against the real Worker runtime:
cd ws-worker && npx wrangler dev --port 8787 &
cd server && E2E_URL=ws://127.0.0.1:8787 node --test tests/server-e2e.test.mjsARCHITECTURE.md— system design, component boundaries, scaling direction.multiplayer-schema.md— WebSocket protocol envelope and message schema.server/README.md— Node backend specifics.ws-worker/README.md— Cloudflare Worker backend specifics.
Licensed under the Apache License, Version 2.0. See LICENSE.
