JA Joshua Ates
Projects/Grimdark Future Tactics
SOFTWARE · DIGITAL WARGAME

Grimdark Future Tactics

A complete tabletop miniatures ruleset rebuilt as a browser wargame — live online multiplayer, an AI opponent with distinct personalities, and a from-scratch roguelike campaign. ~58,000 lines of vanilla JavaScript, zero build tooling.

STACK  Vanilla JS · Canvas · PHP · MySQL
SCALE  55 files · ~58k LOC · 250+ tests
The tactical battle view — grid movement, terrain, and the action wheel mid-turn.
90+
campaign doctrines & events
300+
named special rules
6
AI personality archetypes
14
imported armies
RULES ENGINE

A full ruleset, faithfully simulated

A Redux-style single-mutation architecture — dispatch() is the only way to change state — drives deployment, BFS grid pathfinding, ranged and melee resolution, morale, and 300+ independently testable special rules and spell effects.

Every attack rolls transparently: hits, saves, and wounds resolve step by step, exactly as they would on the table.

ROGUELIKE CAMPAIGN

A meta-game on top of the battles

A branching node-graph generator produces guaranteed-reachable maps with per-layer difficulty balancing and elite encounters — Monte-Carlo-verified against starvation across thousands of simulated generations.

Wrapped around a shop economy, a 30-entry doctrine system, and a 60-entry random event catalog — all feeding the same battle engine as regular matches.

ARMY BUILDER

Rules parsed into playable data

The list builder parses natural-language upgrade text straight from the source rulebooks — weapon swaps, per-model upgrades, squad-wide options — into structured data at runtime.

A procedural icon generator then renders a distinct badge for every unit purely from its stats — no external art assets.

ENGINEERING HIGHLIGHTS
Zero-dependency architecture

No npm, no bundler, no framework — just disciplined ES-module boundaries across a strict data → rules → engine → UI/AI/multiplayer layering.

Real-time multiplayer on PHP polling

Async and live play over PHP short-polling with full-state snapshots, optimistic-lock conflict handling, and a decision-pause protocol for accept/decline combat choices.

Spectator & replay

Any user can watch a live game or replay a finished one move-by-move — the same state stream that drives play drives playback.

250+ automated tests

Headless unit/integration tests plus a Playwright end-to-end suite covering multiplayer sync, deployment, and spectator flows — on a project with no build step.

PLAY GRIMDARK FUTURE TACTICS →
Built on the One Page Rules ruleset · See also the NCOPR Campaign Map →