CodeCanU
← Back to products
HTML5 / Games

Reversi Stone & Shadow | HTML5 Game With AI and PVP

Stone & Shadow – Reversi Version 2.0 | HTML5 Canvas | AI Minimax with Alpha-Beta Pruning | Online PvP via Firebase Game Modes VS AI – Three difficulty tiers (Easy / Medium / Hard) Two Players – Local play on one device Online PvP – Real-time multiplayer via Firebase Realtime Database. Quick Match auto-pairs players. Create or join private rooms using a 6-character code. In-game chat included. AI Difficulty Easy – Shallow depth + randomized moves Medium – Balanced depth + ful…

18.00 USDT
Version
2.0

All source code listed on this site is collected from the internet. If any listing infringes your rights, please contact us and we will remove it immediately.

Description

Stone & Shadow – Reversi

Version 2.0 | HTML5 Canvas | AI Minimax with Alpha-Beta Pruning | Online PvP via Firebase

Game Modes

  • VS AI – Three difficulty tiers (Easy / Medium / Hard)
  • Two Players – Local play on one device
  • Online PvP – Real-time multiplayer via Firebase Realtime Database. Quick Match auto-pairs players. Create or join private rooms using a 6-character code. In-game chat included.

AI Difficulty

  • Easy – Shallow depth + randomized moves
  • Medium – Balanced depth + full heuristic scoring
  • Hard – Maximum depth + corner-prioritized opening + tight alpha-beta cutoffs

Themes (8 + Custom Builder)

  • Obsidian (free) / Crimson (free) / Arctic / Amber / Violet / Neon / Sakura / Marble
  • Custom Theme Builder – Live preview, 6 color pickers, preset themes (Forest, Ocean, Rose Gold, Slate, Sand, Jade)
  • Themes above Crimson are unlocked with in-game coins earned through gameplay

Coin & Economy System

  • Earn coins by winning games vs AI or Online PvP – stored locally, no account needed
  • Spend coins to unlock themes or buy in-game power-ups from the store
  • Power-Ups: Hint Pack, Undo Pack, XP Boost, Board Flip, Champion Title
  • Hint Button – Uses a Hint Pack to flash the best move on the board. Works in all game modes.
  • Watch a voluntary reward ad to earn +25 coins instantly

Online PvP Features

  • Quick Match – Atomic Firebase transaction matchmaking. Works even when both players click at the exact same moment.
  • Create Room – Generate a 6-character code and share with a friend
  • Join Room – Enter a friend’s code to connect directly
  • In-Game Chat – Real-time messaging during the match
  • Turn Timer – 10-second countdown per turn. Auto-passes if time runs out.
  • Disconnect Detection – Opponent going offline is detected and handled gracefully
  • Display Names – Random or custom names shown in the HUD during the match

Controls

  • Click / Tap – Place disc
  • Hint Button – Flash best move (requires Hint Pack)
  • Lobby – Return to main screen
  • Resign / Exit – Leave online match (notifies opponent)

Overlay System

  • Game Over / Pause / Assign Opponent / Quit Confirm / Resign Confirm
  • Zero native popups – custom HTML overlays throughout

Advertisement System

  • Reward ad, match start, then pop-up ads show, and while quitting it
  • User watches 15 seconds and earns +25 coins
  • Placeholder sized to Google AdSense 300×250 Medium Rectangle standard – ready for integration

Tech Stack

  • HTML5 Canvas 2D
  • CSS Custom Properties (theme tokens)
  • Web Audio API (optional)
  • requestAnimationFrame (60fps, offscreen board cache)
  • ES2015+ JavaScript (IIFE-scoped, no global leaks)
  • Firebase Realtime Database (loaded on demand, not on page load)
  • Google Fonts – Cinzel, Crimson Pro – loaded via Google Fonts CDN at runtime; requires an internet connection for optimal typography

Requirements

  • Chrome / Firefox / Safari / Edge / Opera (Latest)
  • Internet connection required for Online PvP and Google Fonts
  • No build step – open index.html directly or deploy to any static host

Contact

saadielab@gmail.com

================================================================ REVERSI: STONE & SHADOW CHANGELOG ================================================================ ---------------------------------------------------------------- VERSION 2.0 ---------------------------------------------------------------- ONLINE PVP Added real-time multiplayer via Firebase Realtime Database. Quick Match auto-pairs two players instantly. Create Room generates a 6-character private room code. Join Room lets a friend connect using that code. 10-second turn timer with auto-pass on timeout. Resign and Exit flows with opponent notification. Disconnect detection and graceful recovery. IN-GAME CHAT Real-time chat panel during Online PvP matches. Unread message badge on the chat button. COIN & ECONOMY SYSTEM Earn coins by winning games vs AI or Online PvP. Spend coins to unlock themes or buy power-ups. All data stored locally, no account required. STORE New in-game store with Themes and Power-Ups tabs. Theme previews rendered from real board colors. Free Coins tab to earn coins by watching a reward ad. POWER-UPS Hint Pack, Undo Pack, XP Boost, Board Flip, Champion Title. HINT BUTTON New in-game hint button uses a Hint Pack to show best move. Works in VS AI, Local PvP, and Online PvP. ADVERTISEMENT SYSTEM Reward ad, match start, then pop-up ads show, and while quitting it. User watches 15 seconds and earns +25 coins. PERFORMANCE Offscreen board cache, board drawn once per theme change. Mouse move rendering is capped with requestAnimationFrame. Removed expensive per-frame canvas shadow operations. ---------------------------------------------------------------- VERSION 1.0 ---------------------------------------------------------------- Initial release. VS AI with Easy, Medium, Hard difficulty. Two players local mode. 8 board themes plus the Custom Theme Builder. Premium canvas renderer with animations. Web Audio API sound effects. Game Over, Pause, Assign Opponent, Quit overlays. Browser compatibility detection. ================================================================

Reversi Stone & Shadow | HTML5 Game With AI and PVP

18.00 USDT
Buy now

After successful payment, you will receive a download link for the source code