Every Last City

An original turn-based strategy game in the tradition of Empire — you begin with one city on a fogged map, cities produce units, units explore and fight and take more cities, and nobody can talk their way out of it.

It is not a reproduction of any existing game. Mechanics and ideas are not anybody's property; specific expression is, and none is taken. Every value in this specification was designed for a stated reason rather than inherited, and where the genre has a known weakness the design is obliged to attack it rather than reproduce it.

Specification

Fifteen documents in docs/spec/, 2,761 numbered requirements. Start with the overview, then the turn model — it is the spine everything else hangs from.

Doc Prefix Reqs Scope
00-overview.md OV 12 Pillars, document map, cross-document discipline, 47-term glossary
01-game-rules.md GR 198 Map, terrain, movement, fog, the Intelligence Picture, Regions and Landmarks, setup
02-units-and-industry.md US 223 Unit schema, the Industry ladder, the roster, production
03-architecture.md AR 123 Deterministic core, fixed-point arithmetic, event sourcing, saves, testing
04-ui-ux.md UX 209 Orders authoring, Cascade playback, the Dispatch, accessibility, mobile
05-multiplayer.md MP 159 Correspondence, real-time, hot seat, lobbies, fog enforcement, self-hosting
06-ai.md AI 218 The Staff — four layers, six Ranks, honest fairness, the self-play farm
07-modding-content.md MOD 138 Content formats, WASM plugin ABI, editors, workshop
08-services-platform.md SVC 126 Guest-first accounts, sync, notifications, privacy, operations
09-roadmap.md Phased delivery plan and risk register (non-normative)
10-turn-model.md TM 275 Orders, the Cascade, the Reckoning — Initiative, Stance, reactions, orders-as-data
11-combat.md CB 283 The Clash, strength and disorder, retreat and rout, emergent encirclement
12-economy.md EC 235 Works and Manpower, Integration, the six visible brakes on growth
13-command.md CM 221 Postures, Sanctions, the order stack, Reflexes, the Dispatch
14-victory.md VC 341 Tracks, the Vigil, Standing and Tenure, the endgame and the comeback path

Design record

docs/design/ holds the reasoning behind the specification — twelve papers covering the binding direction, the turn-model decision, six subsystem proposals, and four angles on the AI including a red team whose only job was predicting how the AI will fail.

These carry what usually evaporates: what was rejected, and why. 00-direction.md and 01-decision-turn-model.md are binding; the rest are the arguments that produced the specifications.

Code

Phase 0 of the roadmap — the determinism foundation, built before any rules code because it cannot be retrofitted.

corepack pnpm install
corepack pnpm run verify

That runs typecheck, the determinism lint gate, the test suite, and the specification cross-reference checker. Other useful scripts:

Script What it does
pnpm test:browser Runs the determinism suite inside a real browser engine (Chromium by default; set ELC_BROWSER for firefox or webkit)
pnpm golden-hash Prints the reference log hash
pnpm check-spec Proves every requirement citation in the specification resolves
pnpm build-site Renders the documents to static HTML in site/
pnpm publish Publishes the whole project to the server and verifies the live site
Package What it is
packages/core/src/numeric Int and Fixed (signed Q16.16) exact arithmetic. Overflow throws; never wraps, saturates, or yields NaN.
packages/core/src/rng Seeded PCG32 with SplitMix64-derived named streams. Hi/lo 32-bit math, no BigInt on the draw path.
packages/core/src/hash Strict canonical encoder and 64-bit hashing — how two states are proven identical.
packages/core/src/harness Replay-and-compare over a toy fixture. Not the game; the proof that the machinery works.
packages/eslint-plugin-determinism Lint rules banning float arithmetic, ambient clocks and entropy, locale-sensitive comparison, and unordered iteration.
scripts/check-spec-refs.mjs Proves every requirement citation in the specification resolves to something real.
packages/core/test/reference-hash.ts The committed reference hash every supported platform must reproduce — the cross-platform gate.

The CI job in .github/workflows/determinism.yml runs the suite under Node on Linux, macOS and Windows and inside Chromium, Firefox and WebKit — the browser is the primary delivery target, so a determinism guarantee proved only on server runtimes would have a hole exactly where the players are. Agreement is asserted inside the suite against a committed constant rather than by diffing CI artifacts: comparing a freshly computed hash to itself proves only that an engine is self-consistent, which every non-deterministic engine also manages.

Contributing

The server is the only shared state — there is no other remote, and nothing local is visible to anyone else. Clone and push there:

git clone everylastcity@195.26.247.75:git/everylastcity.git

A push to main deploys: a hook checks the tree out to the served directory, removes files deleted in the commit, and restarts the site service. Pushing is publishing — there is no second step to forget.

Run pnpm build-site before committing if you changed anything under docs/. The rendered site is committed deliberately (see .gitignore) so the server needs no toolchain; review the markdown in docs/ and ignore site/ diffs as generated noise.

Status

Phase 0 is complete except the rights decision, which is an owner's call rather than an engineer's. The fixed-point representation is chosen and implemented, the determinism harness and lint gate exist and are verified to actually fire, cross-platform CI covers three operating systems and three browser engines, and the specification carries no claim to reproduce another game. The design is complete on paper across seven interlocking systems.

Nothing has been played. Every number — combat odds, Integration rates, Industry costs, Initiative bands — is a first estimate by a designer who has never seen the system in motion. That is the project's real risk, and playtesting is a roadmap phase rather than an assumption.


Historical context only: Empire Deluxe Combined Edition (Walter Bright's Empire Empire Deluxe 1993 → EDIE/EDEE 2002 → EDCE) is the ancestor this game learns from. No asset, value, name, or table is taken from it.