Back to Portfolio

LazrChess

Multiplayer Laser Strategy Game — browser & Android, free, no ads

Live — playable at lazrchess.com and on Google Play
Play at lazrchess.com Google Play
lazrchess.com
LazrChess board game homepage screenshot

Overview

LazrChess is a laser-strategy board game for the browser and Android. Two players move and rotate mirrored pieces on an 8×10 grid; at the end of every turn a laser fires automatically, reflecting across the board until it strikes something — win by steering the beam into the opposing king while shielding your own.

It plays in any modern browser at lazrchess.com and ships on Google Play as a Trusted Web Activity, so the installed app renders the live site: one deploy updates web and Android simultaneously with no store resubmission. The game offers single player against four AI difficulty tiers (including an unlockable boss-level opponent), real-time online multiplayer with shareable four-character session codes, and pass-and-play on a single device. It is free, with no ads, accounts, or tracking.

3
Board Setups
4+
AI Difficulty Tiers
Free
No Ads, No Accounts
TWA
Web + Android

LazrChess is an original implementation of the laser-chess concept popularized by Khet® 2.0. It is not affiliated with or endorsed by the Khet trademark holders. Built by Howarth Tech Solutions.

Tech Stack

A full-stack JavaScript build — one shared rules engine, one codebase, two platforms.

React 18 + Vite
SPA client, dependency-free router
JavaScript (ESM)
Shared rule engine — client and server
Node 20 / Express
Server-authoritative game host
Socket.IO
Real-time move sync with reconnect
Docker + Caddy
Containerized deploy, automatic TLS
GitHub Actions CI/CD
Push-to-production pipeline
Trusted Web Activity
Android app wrapping the live site
Jest (108 tests)
Rules engine + fairness audit suite
Architecture Highlight

The Node 20 server imports the same ESM move, laser, and game-state modules the React client uses (require(esm)), making one codebase the single source of truth for game physics on both sides of the wire. Server-side move validation means clients can never cheat — the server re-runs every move through the shared engine before accepting it.

Key Features

Three ways to play, four ways to lose to the AI, and one set of rules enforced on both sides of the wire.

Three Board Setups

  • Classic, Refraction, and Spectrum layouts
  • Plus a random-picker option
  • Each opens distinct beam corridors and tactics
  • Board select screen before every game
🤖

Four AI Difficulty Tiers

  • Easy through Hard — minimax with alpha-beta pruning
  • BRADFORDai: unlockable boss opponent, earned by beating Hard
  • Depth-tuned per difficulty level
  • 108-test Jest suite verifies no opening-move win exists
🌐

Real-Time Online Multiplayer

  • Create a game, share a 4-character code
  • Socket.IO with server-authoritative move validation
  • Automatic reconnect — dropped connections rejoin the session
  • Per-player rejoin tokens; no database needed
📱

Pass-and-Play Local Mode

  • Two players, one device
  • Handheld-friendly layout
  • No network required
  • Full rule enforcement on-device

Accessibility as a Feature

  • WCAG 2.1 Level A complete; most of AA
  • Full keyboard play — every action reachable without a mouse
  • Color-blind piece badges
  • Reduced-motion support and screen-reader turn announcements
🚀

Android App via TWA

  • Installs from Google Play
  • Runs full-screen, inherits every web deploy instantly
  • Single-player works offline after first visit
  • Digital Asset Links verified against Play App Signing

Screenshots

From main menu to multiplayer lobby — phone and tablet.

LazrChess main menu on phone LazrChess board selection screen LazrChess coin flip for first move LazrChess laser gameplay in progress on phone LazrChess multiplayer lobby screen
LazrChess laser gameplay in landscape on tablet

Technical Highlights

The engineering decisions that make the game reliable, fair, and maintainable.

🔁

Shared Rule Engine

The Node 20 server imports the same ESM move, laser, and game-state modules the React client uses (require(esm)). One codebase is the single source of truth for game physics on both sides of the wire — the AI, the server validator, and the client renderer all execute identical logic, which eliminates a whole class of desync bugs.

📡

Server-Authoritative Multiplayer

Socket.IO sessions with server-side move validation mean every move is re-run through the shared engine before it's accepted — clients cannot submit illegal moves. Per-player rejoin tokens stored in-memory let both players reconnect and resume a game after a dropped connection or tab close, with no database and nothing persisted beyond the session lifetime.

🤖

Minimax AI with Alpha-Beta Pruning

Each difficulty tier uses minimax search with alpha-beta pruning, depth-tuned so Easy plays shallow and Hard searches deep. An exhaustive first-move fairness audit in the Jest suite — 108 tests — verifies that no board configuration allows a win on the opening move, proving the starting positions are balanced for all three setups.

📱

Stale-Proof PWA/TWA Packaging

A network-first service worker guarantees the installed Android app can never pin an old build — every deploy to the web is the deploy to Android, with no Play Store submission. Digital Asset Links are verified against both the upload certificate and the Play App Signing certificate so the TWA association survives signing changes.

🚀

Push-to-Production Pipeline

GitHub Actions builds a Docker image on every push to main and deploys it to the DigitalOcean VPS behind Caddy (automatic TLS). The footer displays the live commit hash so it's always clear which build is serving traffic. The whole pipeline — build, push to GHCR, SSH deploy — completes without manual steps.

📄

Dependency-Free SPA Router

A ~50-line custom router renders real anchor elements for all navigable views, keeping URLs crawlable without a routing library. The hero background was optimized from a 728 KB PNG to a 105 KB AVIF. The overall bundle stays small — no router package, no animation library, just the game logic and the UI.

What This Demonstrates

End-to-end product delivery from a rules engine to two app platforms.

🔁
Shared Game-Logic Architecture
Server and client executing identical ESM modules — one codebase, zero desync risk
📡
Real-Time Networked State
WebSocket-based multiplayer with server-side validation and mid-game reconnect handling
🤖
Adversarial-Search AI
Minimax with alpha-beta pruning, depth-tuned per tier, fairness-verified by test suite
Accessibility Engineering
WCAG 2.1 to a published standard — keyboard, color-blind, reduced-motion, screen-reader
📱
Web-to-Android Packaging
PWA → TWA → Google Play, approved same-day — one deploy updates both platforms
🚀
Continuous Deployment
GitHub Actions → Docker → DigitalOcean, every push to main live without manual steps

Want a real-time or multiplayer app built?

LazrChess demonstrates what it looks like when a game engine, networked state, AI, and a cross-platform deploy are all built right — shared logic, server-authoritative, continuously deployed. If you have a real-time web app or Android project that needs the same rigour, let's talk.

Get In Touch Play LazrChess

Frequently asked questions

What tech stack powers LazrChess?

A full-stack JavaScript build — React on the front end, Node.js with Socket.IO for real-time multiplayer, and a shared deterministic rules engine so single-player and online play behave identically.

How does the real-time multiplayer work?

Moves sync over WebSockets via Socket.IO with server-authoritative state and session persistence, so a dropped connection never loses a game.

Can Howarth Tech build a real-time or multiplayer web app for me?

Yes — real-time systems are a core strength. See our software development service to start a project.

Related services & work

Want something like this built?

Tell us what you have in mind and we'll come back with an approach and a flat quote — no obligation.

Get a free quote See more work