← Back to Projects

Escape AI

Escape AI is a browser-first co-op multiplayer game for up to 20 players, built in 72 hours for the TINS 2026 game jam. You are animals that have broken out of your enclosures in a megazoo patrolled by humaniform positronic keeper-robots, and you must reach the perimeter gate together. The robots obey Asimov's Three Laws, so the laws themselves are the stealth system: look human enough and the First Law forbids them from touching you, issue orders they must obey (Second Law), and bait them away from hazards (Third Law). A zoo-wide panic meter climbs with every order; let it overflow and the zoo slams into lockdown. It runs on a Socket.IO authoritative server with a fixed 20 Hz tick, a Phaser 3 renderer behind a swappable interface, and an Android build via Capacitor.

Escape AI screenshot
Tech Stack

Client

TypeScript (strict)VitePhaser 3Babylon.js (3D fallback)

Server

Node 22Socket.IOauthoritative 20 Hz tickpm2

Shared Core

single @shared moduledeterministic step()seed-based world gennet contract

Assets & Audio

vector SVG → packed atlas8-directional spritesSuno audio pipeline

Platform & Deploy

Capacitor (Android)nginx single-originenv-driven provisioning

Testing

VitestBATS shell testsdeterminism + parity gates
Architecture Overview
  • Authoritative Socket.IO server at a fixed 20 Hz tick with delta/full snapshot broadcast; the client predicts locally and reconciles to server positions
  • Single @shared TypeScript module holds everything both sides must agree on: the net contract, movement integration, and the deterministic step(), imported once by client (prediction) and server (authority)
  • Three-Laws stealth: server-owned robot FSM reads each animal's human-likeness, order state, and hazard proximity to decide whether the laws permit contact
  • Seed-based deterministic world generation: the map ships once as a seed and the client regenerates the identical tilemap, so no per-tile bandwidth
  • Renderer sits behind a common IRenderer interface (PhaserRenderer default, Babylon.js 3D fallback) so a genre rule is a renderer swap, not a rewrite
  • Global panic meter as a catastrophic-overflow world state: overflow flips the whole zoo into lockdown on the server tick
  • Zero-dependency asset pipeline: each of 15 species declares geometry against a shared body archetype, codegen emits 8-directional SVG frames packed into a committed atlas, with a verify gate over every frame key
  • Single-origin production deploy: nginx serves the static bundle and proxies only /socket.io and /health to a loopback-bound node process run by a nologin user; no CORS surface, app port never opened in the firewall
Claude Code Usage
7 agents 2 skills

Agents

shared-contract-architectauthoritative-server-engineerclient-netcode-engineerasset-pipeline-engineermultiplayer-security-auditormultiplayer-debug-testerrelease-and-deploy-engineer

Skills

plan-validation-and-reviewshell-testing-workflow

Highlights

  • Agents are split by trust boundary, not just feature: the shared-contract-architect owns cross-side determinism, and any net-event or math change must start there before the server and client agents touch their sides
  • The read-only multiplayer-security-auditor enforces 'never trust the client', auditing every socket handler for client-trusted state (positions, human-likeness, quest) and tuning the per-socket token-bucket rate limiter
  • The multiplayer-debug-tester runs headless multi-client load tests to reproduce desync and prediction drift, then routes the root cause to the owning agent rather than patching game code itself
  • A zoo-overhaul orchestration workflow fanned out parallel agents across the tile contract, SVG art, and world-gen in one coordinated pass, then serialized rebuild + verify
  • Agents carry model tiers matched to the job: opus for the authoritative server and security auditor, sonnet for the client and deploy, haiku for the deterministic asset pipeline
Key Accomplishments
  • Shipped a complete co-op multiplayer game in a 72-hour jam: 218 commits, ~22k lines across client (TS), server (Node), and a shared deterministic core
  • Asimov's Three Laws implemented as a real stealth mechanic: human-likeness, Second-Law orders, and Third-Law hazard-baiting drive a server-side keeper-robot FSM
  • Authoritative 20 Hz netcode with client prediction and server reconciliation, adapted and generalized from the author's Galaxy Miner engine
  • Seed-deterministic world generation guarded by parity-hash tests, so client and server regenerate byte-identical maps from a single seed
  • Zero-dependency programmatic sprite pipeline: 15 species as 8-directional animated atlases generated from vector SVG against shared body archetypes, with a clean-clone verify gate
  • Single-origin hardened deploy: nginx + loopback-bound node under a nologin user, no CORS surface, app port never firewalled open, provisioned idempotently over SSH
  • Cross-platform from one web build: browser-first with an Android APK via Capacitor, served from the same origin