A cinematic, neon-cyberpunk two-player chess game available as both a desktop OpenGL app and a browser WebGPU/WebGL app, with a future Unreal Engine 5 integration in progress.
- Shader-driven 3D rendering — PBR materials, bloom, fog, shadow maps, and a neon skybox
- Automatic turn camera — camera transitions side-to-side each turn; no manual controls needed
- Full chess rule set — legal move validation, check/checkmate/stalemate, en passant, castling, and auto-promotion
- Live material score — piece advantage evaluation displayed in the HUD (P=1, N=3, B=3, R=5, Q=9)
- Safe 2D fallback — browser renderer degrades to a canvas 2D board when WebGPU/WebGL are unavailable
- WebGPU-first browser build — targets WebGPU where supported, falls back to WebGL 2 then WebGL 1
| Layer | Desktop | Browser |
|---|---|---|
| Language | Python 3.9+ | TypeScript |
| Renderer | ModernGL (OpenGL 3.3 Core) | Babylon.js (WebGPU / WebGL) |
| Chess logic | python-chess | chess.js |
| Window / input | GLFW | Browser DOM |
| Build tool | — | Vite |
| Math | NumPy + Pyrr | Babylon.js built-ins |
Requirements: Node.js 20+
cd web-chess
npm install
npm run devOpen the printed local URL (default http://localhost:5173). To create a production build:
npm run build # outputs to web-chess/dist/Requirements: Python 3.9+ and an OpenGL 3.3+ compatible GPU/driver
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
python main.pyOr use the convenience script: ./first_launch.sh
Headless / CI environments — The desktop build requires a display. Set
NEON_CHESS_SKIP_GLFW_PROBE=1to bypass the startup preflight, or use the browser build instead.
| Action | Desktop | Browser |
|---|---|---|
| Select a piece | Left click | Left click |
| Move to a highlighted square | Left click | Left click |
| Reset board | R |
R or Reset button |
| Start new game | — | N or New Game button |
| Toggle fullscreen | — | F |
| Quit | Esc |
— |
Chess-Game/
├── engine/ # Python rendering systems (camera, lighting, fog, post FX, GLSL shaders)
├── game_core/ # Python chess game state and piece scoring
├── web-chess/ # Browser client — TypeScript + Babylon.js
│ ├── src/ # Application source (scene, controllers, coordinates)
│ ├── public/ # Static assets (textures, HDR environment maps)
│ └── scripts/ # Development / automation scripts
├── unreal/ # Unreal Engine 5 integration and handoff files
├── docs/ # Supplementary technical documentation
├── main.py # Desktop Python entry point
└── requirements.txt # Python dependencies
- The camera is game-directed and side-aware to keep each player oriented
- Desktop runs in windowed mode by default; resize freely
- Browser build targets WebGPU when available and falls back to WebGL 2, then WebGL 1
- Quality CI runs on every push and pull request
- Dependabot is configured for GitHub Actions, Python dependencies, and npm packages
See ROADMAP.md for planned features including an AI opponent, online multiplayer, move history panel, and Unreal Engine 5 playable build.
See CONTRIBUTING.md.
MIT License — see LICENSE.
Built with Python, TypeScript, ModernGL, and Babylon.js.