
Obsidian Chess | 3D HTML5 Multiplayer Sport
Model 1.0 | Three.js r128 | AI Minimax with Alpha-Beta Pruning | On-line PVP through Firebase
Sport Modes
- VS AI – Three problem tiers (Straightforward / Medium / Onerous)
- Two Gamers – Native play on one gadget
- On-line PVP – Actual-time multiplayer through Firebase Realtime Database. Fast Match auto-pairs gamers. Create or be a part of personal rooms utilizing a 6-character code. In-game chat included.
AI Problem
- Straightforward – Shallow depth + randomized transfer ordering
- Medium – Balanced depth + full heuristic analysis
- Onerous – Most depth + tight alpha-beta cutoffs
Board Themes (8 + Customized Builder)
- Obsidian (free) / Traditional (free) / Forest / Ocean / Royal / Ember / Arctic / Night time
- Customized Theme Builder – Stay preview, 5 shade pickers (mild squares, darkish squares, background, panels, accent)
- Themes above Traditional are unlocked with in-game cash earned via gameplay or reward advertisements
Coin & Economic system System
- Earn cash by profitable video games vs AI or On-line PVP – saved domestically, no account wanted
- Every day bonus of 15 cash awarded robotically on first session every day
- Win reward: 50 cash per victory. Watch a voluntary reward advert for +10 cash immediately.
- Trace Button – Prices 5 cash. Highlights the very best accessible transfer on the 3D board for two.2 seconds. Obtainable in VS AI mode solely.
- Spend cash to unlock premium board themes from the in-lobby or in-game theme retailer
On-line PVP Options
- Fast Match – Atomic Firebase transaction matchmaking. Works even when each gamers join at the very same second.
- Create Room – Generate a 6-character code and share with a pal
- Be part of Room – Enter a pal’s code to attach immediately
- In-Sport Chat – Actual-time messaging panel through the match
- Flip Timer – 10-second countdown per flip. Auto-moves if time runs out. Solely the lively participant’s consumer runs the timer to forestall desync.
- Disconnect Detection – Opponent going offline is detected through Firebase presence and dealt with gracefully
- Show Names – Random or customized participant names proven within the HUD through the match
- Coin Rewards – On-line wins award 50 cash on the winner’s gadget solely
Chess Guidelines
- Full legal-move validation: pins, checks, found assaults
- Castling (kingside & queenside) with appropriate invalidation guidelines
- En passant seize
- Pawn promotion – interactive modal (Queen / Rook / Bishop / Knight)
- Verify, Checkmate, and Stalemate detection
- 50-Transfer Rule and Threefold Repetition attracts
- Inadequate Materials detection (Okay vs Okay, Okay+N vs Okay, Okay+B vs Okay)
- Algebraic notation transfer log (e.g. Nf3, O-O, exd5+) displayed within the sidebar
- Captured items displayed per aspect within the sidebar
- Undo – steps again one half-move (or two in AI mode, to revive the participant’s flip)
Controls
- Click on / Faucet – Choose piece, then click on highlighted sq. to maneuver
- Drag – Orbit the 3D board freely
- Scroll / Pinch – Zoom out and in
- Escape – Pause / Resume (additionally closes Settings overlay)
- Trace Button – Flash greatest transfer on board (prices 5 cash, VS AI solely)
Overlay & UI System
- Pause, Resign Affirm, Pawn Promotion, Sport Over, Unlock Theme, Pre-game Countdown
- Zero native browser popups – all customized HTML overlays all through
- Animated foyer display transitions with page-enter / page-exit results
- Mild Mode toggle – switches to a heat parchment foyer aesthetic
- Asset pre-load display with dwell progress bar and standing messages
Commercial System
- Pre-game advert – Proven robotically earlier than each match begins (VS AI, Native PVP, and On-line PVP). Participant watches 5 seconds and earns +2 cash, then a 3-second countdown begins the sport.
- Voluntary reward advert – Triggered manually from the foyer coin badge or Earn Extra button. Participant watches 5 seconds and earns +10 cash.
- Each advert overlays use matching heat foyer chrome – absolutely constant visible design
- Placeholder sized to Google AdSense 300×250 Medium Rectangle customary – prepared for integration
Tech Stack
- Three.js r128 (3D rendering, WebGL, PCF tender shadow maps)
- OrbitControls for drag-to-orbit and pinch-to-zoom
- Internet Audio API – all sounds synthesized in-browser, no audio information required
- CSS Customized Properties (theme tokens for dwell board shade switching)
- ES2015+ JavaScript (IIFE-scoped modules, no international leaks)
- Firebase Realtime Database (loaded on demand for On-line PVP solely, not on web page load)
- requestAnimationFrame render loop with damped OrbitControls
- LocalStorage for cash, unlocked themes, participant identify, and preferences
Necessities
- Chrome / Firefox / Safari / Edge / Opera (Newest)
- Web connection required for On-line PVP and Firebase
- No construct step – open index.html immediately or deploy to any static host
- WebGL help required for 3D board rendering

