Skip to content

About

3D Chess Arena — WebGL Three.js Chess with procedural Web Worker AI, PeerJS P2P multiplayer, and offline PWA

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Chess Arena 3D

Live Demo Three.js PWA Ready PeerJS License Powered By

Live Demo: https://razeltech.github.io/chessarena/
Repository: https://github.com/razeltech/chessarena
Distribution Mirror: https://github.com/r2dapps/chessarena

Created and maintained by Razel Tech


Overview

Chess Arena 3D is an open-source, zero-backend 3D chess simulator built with Three.js WebGL graphics, procedural AI Web Worker engine, and PeerJS WebRTC peer-to-peer multiplayer. Designed for browser performance, the application functions offline as an installable Progressive Web Application (PWA).


Key Features

  • 3D & 2D Top-Down Modes: Toggle between cinematic 3D perspective with smooth camera orbit controls and a responsive 2D orthographic tournament view.
  • 6 High-Contrast Board Themes:
    • Walnut & Maple: Traditional warm acoustic woodgrain with dark walnut and honey maple.
    • Tournament Emerald & Buff: FIDE World Championship standard forest green and parchment cream.
    • Royal Navy & Ice: Midnight cobalt navy with luminous ice pearl.
    • Obsidian & Carrara Marble: High-specular Belgian black marble and pure white Italian Carrara marble.
    • Crimson Rosewood & Ivory: Rich antique wine rosewood and soft antique ivory.
    • Slate & Zinc: Minimalist industrial neutral slate.
  • Web Worker AI Engine:
    • Zero UI thread blocking using a dedicated ai-worker.js.
    • Minimax algorithm with Alpha-Beta pruning, MVV-LVA move ordering, and Quiescence search.
    • 5 configurable difficulty profiles ranging from Casual Beginner to Deep Master search.
  • P2P Multiplayer: Real-time room-code based matchmaking over WebRTC data channels via PeerJS with zero game server requirement.
  • Progressive Web Application (PWA):
    • Two-tier Service Worker caching: fast shell caching with persistent offline storage for large 3D models (ChessBoard.glb and HDR lighting).
    • Installable on desktop (Chrome, Edge) and mobile (Android, iOS Home Screen).

Technical Stack

Layer Technologies
3D Rendering Three.js (r186), WebGL, GLTFLoader, RGBELoader
Physics / Move Engine Pure JavaScript 64-element Int8Array bitwise coordinate engine (engine.js)
AI Computation Web Workers, Minimax, Alpha-Beta Pruning, Quiescence Search
Networking PeerJS (WebRTC DataChannels)
Build & Bundle esbuild
Storage / Offline Cache API, Service Worker, Web App Manifest

Local Development

  1. Clone repository:

    git clone https://github.com/razeltech/chessarena.git
    cd chessarena
  2. Install dependencies:

    npm install
  3. Build production bundle:

    npm run build
  4. Serve locally:

    npx serve .

License & Attribution

Copyright (c) 2026 Razel Tech. All rights reserved.

Licensed under the MIT License with Mandatory Author Attribution. Any public deployment, mirror, or distribution must attribute the author as Razel Tech and include an active hyperlink to https://razeltech.github.io.

About

3D Chess Arena — WebGL Three.js Chess with procedural Web Worker AI, PeerJS P2P multiplayer, and offline PWA

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages