Part 4: The Engineering Process: Deterministic Engine & Multi-Client Platform
By Mike Hall · Originally published on just3ws.com (Canonical) · Engine v1.6.0
Canonical note: The full practitioner engineering narrative for Part 4 lives canonically on just3ws.com. This companion page summarizes the architecture contracts and links directly to the live videos and codebase surfaces.
Key Engineering Contracts in v1.6.0
- Server-Authoritative Pure Engine (
@phalanxduel/engine): Clients submit move intent over WebSocket (/ws) or REST (POST /api/matches/:id/action). The engine validates, computes the next state plus canonical SHA-256 hashes, and never trusts client state. - Horizontal Scaling (
LocalMatchManager+MatchActor+PostgresLedgerStore): Turn actions append to an immutable Postgres ledger and broadcast overPostgresEventBus, with seamlessrejoinMatchsession recovery. - One Protocol, Four Clients: React Web Client (
client/), native Go CLI (clients/go/duel-cli), native SwiftUI client (game-swiftui), and the MCP Server (@phalanxduel/mcp) for AI agents all share the same OpenAPI + AsyncAPI contracts. - Tiered Bots & Ranked Ladders: Heuristic bots (
Scout,Grunt,Soldier) through specialist and Monte Carlo Tree Search (sp-mcts) bots, tracked across seasonal Glicko-2 / Elo ladders (/api/ladder/:category). - Hard Safety Gates: Non-negotiable Postgres environment isolation (
phalanxduel_developmentvsphalanxduel_test), playability gates (pnpm qa:playthrough:verify) before UI work, and OpenTelemetry flowing to Jaeger + OpenObserve (otel-collector -> [Jaeger, OpenObserve]).
Watch the Platform & Multiplayer Videos
- Phalanx Duel Game Development (Ramblin’ & Amblin’) - Behind-the-scenes engineering walkthrough.
- 1v1 Live PvP: Creating, Joining & Auto-Reconnecting Matches (Ep. 10)
- 1vBot Training Ladder: Scout, Grunt & Soldier (Ep. 11)
- Mastering Specialist Bots & MCTS (Ep. 12)
- Understanding Your Ranking, Elo Categories & Seasonal Ladders (Ep. 13)
- Playing from the Terminal with Go
duel-cli(Ep. 19) - Hosting & Directing a Local Tournament (Admin Portal & Runbook) (Ep. 18)
Canonical Sources & Attribution
- Full Essay: Read Part 4 on just3ws.com →
- Developer Docs: Build With Phalanx · Gameplay Assurance · Contribute
Series Navigation: ← Part 3: Living Architecture & Diagrams · Part 4 (Current) · Next: Part 5 - Video Curriculum & Media Pipeline →