← Back to games
3D Chess
FeaturedServer-validated online & local 3D chess with a minimax AI opponent
Unity 2022.3 LTSC#Netcode for GameObjectsURPMinimax AIClient-ServerState Sync

A full 3D chess game supporting online multiplayer and local play on one device, with a computer opponent for solo matches. Click-and-drag piece movement, an orbitable camera, and complete standard rules — castling, en passant, promotion, check, checkmate, stalemate and draws.
Tech stack
Unity 2022.3 LTS · C# · Netcode for GameObjects for online play · Universal Render Pipeline for the 3D board and pieces · TextMeshPro · uGUI
Architecture & design patterns
- Authoritative server model — moves are validated server-side rather than trusted from the client, so an edited client can't push an illegal move into a ranked match
- State synchronisation over Netcode — board state replicates to both peers through networked variables and RPCs, with match state persisted so a dropped player can rejoin and resume rather than forfeit
- Minimax search for the AI opponent — the computer player scores the move tree to a bounded depth against a material and position heuristic, with difficulty exposed as search depth
- Lobby-driven matchmaking — a create-or-join lobby flow that kept matchmaking latency under ~100 ms in testing by keeping the handshake lightweight before handing off to the game session
- Turn-based state machine — an explicit turn/phase model (select → validate → move → promote → end-turn) keeps rule checks such as check detection and promotion out of the input code
- Command-style move history — representing each move as a discrete, reversible action is what makes undo/redo and post-disconnect replay possible in local matches
Shared rule evaluation runs in both local and online modes, so the same validation code decides legality whether the opponent is a human across the table, a human across the internet, or the AI.