Chess Arena
Play 1v1 chess against a friend directly in VS Code — peer-to-peer, no server, no account.

One player creates a lobby and sends an invite code, the other joins with it. The game then runs directly between the two VS Code instances over an encrypted WebRTC connection. There is no game server, no matchmaking service and no account.
Features
- Full chess rules: castling, en passant, promotion, check, checkmate, stalemate, 50-move rule, threefold repetition, insufficient material, resignation, draw offers, flag fall.
- A board that feels like a game: drag & drop or click-to-move, smooth piece animations, legal-move and capture highlights, last-move highlight, pulsing king in check, promotion picker, board flip, dark and light board themes, synthesized sound effects.
- Clocks: Bullet 1+0, Blitz 3+2, Rapid 10+0 or a custom time control with Fischer increment.
- Online play without a server: invite code → answer code → connected. Ready check, host starts the game, rematch with swapped colors, reconnect window for short network hiccups.
- Fair and cheat-resistant: both sides validate every move with the same deterministic engine and compare state hashes after each move. Manipulated or out-of-sync games are aborted.
- Local games: two players on one computer.
- Keyboard and screen reader friendly: arrow keys move over the board, Enter/Space selects and moves, moves are announced.
| Lobby |
Online game |
 |
 |
Getting started
- Run Chess Arena: Open from the Command Palette (
Ctrl+Shift+P / Cmd+Shift+P).
- To play a friend:
- You: click Create Lobby, choose your color and time control, then copy the invite code and send it to your friend (chat, e-mail, …).
- Your friend: clicks Join Lobby, pastes the invite code and sends back the answer code that appears.
- You: paste the answer code and click Connect.
- Both click Ready, then the host clicks Start Game.
- Or click Local Game to play on one computer.
Invite codes expire after 10 minutes and work only once.
Settings
| Setting |
Description |
| In-app Settings |
Name, preferred color, default time control, board theme, sound. Stored locally in VS Code. |
chessArena.iceServers |
STUN/TURN servers used to establish the connection. Default: public STUN servers from Google and Cloudflare. Add a TURN server if both players are behind very strict firewalls (symmetric NAT). |
Privacy
- No telemetry, no analytics, no accounts.
- Game data travels only between the two players over an encrypted WebRTC data channel (DTLS).
- The STUN servers only see connection metadata (IP addresses and ports), never game data.
- Only your local preferences are stored. Opponent names, connection data, invite codes and games are not persisted.
Known limitations
- Invite and answer codes are long (about 600 characters) because they contain the complete connection description. A short-code signaling service is a possible future addition.
- Without a TURN server, two players behind symmetric NATs cannot connect.
- No spectators, no engine/AI and no take-backs in this version.
Development
Requirements: Node.js 20+, VS Code 1.95+.
npm install
npm run build # extension (esbuild) + webview (Vite)
npm run check # typecheck, lint, format check, tests with coverage, build
npm run package # build a .vsix
Press F5 in VS Code to start an Extension Development Host, then run Chess Arena: Open.
| Path |
Contents |
src/core/ |
Chess engine, clock, move validation, state hash (no UI, no VS Code) |
src/session/ |
Game session, online match rules, controller |
src/p2p/ |
Lobby state machine, peer protocol, signaling codes |
src/webview/ |
Webview panel, CSP, message bridge |
webview-ui/ |
React UI and the WebRTC transport |
docs/ |
Specification, design decisions, publishing guide |
Technical decisions are documented in docs/decisions.md, publishing in docs/publishing.md.
Credits
Piece set “Chessnut” by Alexis Luengas (Apache-2.0). Chess rules by chess.js (BSD-2-Clause). See THIRD_PARTY_NOTICES.md.
License
MIT
| |