← All projects

Published by KnownBetter Studios → This page is the engineering case study.

Evocatio

In development

A deterministic Rust city simulation with crate-enforced ownership, testable lints, and a 33,000-line design.

SimulationStrategyRustSystems

At a glance

  • Outcome: Simulates one or more seasons in an occupied city after a conqueror god outbids its incumbent deity. KnownBetter Studios plans Steam Early Access in 2027; this page covers implementation.
  • Status: As of September 11, 2026, it draws a god, founds a city, runs one year and displays results. It remains unplayable: the eleven-line command crate is one placeholder comment, leaving no player commands or campaign. Code stopped August 17; all 67 later commits changed design on September 3.
  • Role: Solo. Created the design, simulation contract and method.
  • Stack & libraries: Uses eleven Rust crates, 16,000 lines in 42 files, and 33,000 design lines. Nix pins the toolchain; eframe uses winit, wgpu and egui. The earlier four-crate implementation had 66,756 lines, four times the rebuild.
  • Validation: Passes 113 cargo test --release tests, including daily determinism, four required lints, a pre-content validator and a document checker. The checker verifies 581 rows with 0 failures in about a second.
  • Limitations: Nothing can die, so strained cities starve indefinitely without shrinking. Canon defines twenty aspects, while the content pack and its test contain sixteen until four more are transcribed.

Design model

Requires city behavior to imply its god and aspects. Players observe, infer and test orders; behavior must be legible but not predictable.

Draws each god from several authored aspects, including one dominant aspect. The generator forces required ritual ground into the land, then founds the city on both; cities receive no ground unused by their god. It never retries invalid results because retries hide the tuning failure rate.

Ownership architecture

Replaced an August 2026 implementation whose binary-based crates left ownership rules in Markdown. Its final forty commits repeatedly fixed derived quantities with multiple owners. The orphan-commit rebuild references but rewrites the old tree.

Stores mutable facts and event history in one crate. A dependent crate reads them through pure functions, preventing derived world fields. Store capacity derives from its ground instead of a drifting second field.

Forwards completed readings through an arithmetic-free presentation crate. One lint blocks frontend compute imports but cannot prohibit computation itself. Four lints cover six simulation crates, presentation and generator: no f32, f64, HashMap, HashSet, clock reads or bare numeric literals without same-line // lit: justification. Only the literal lint exempts tests.

Validation tools

Organizes six numbered design volumes, an enforced simulation contract, derived indexes and a written method. A checker rebuilds R1 through R581, rejecting missing or duplicated rows. It verifies markers, citations and consistent counted nouns before every commit.

Runs six simulation crates beneath a generator, presentation crate and eframe window. Daily world digests catch divergence despite later reconvergence. Refused commands must change nothing, but that contract awaits commands.

A harness writes profiles to a tracked directory. Its founded-city profile runs 25,003 souls in 5,014 households on 8,432 tiles for 360 days at about 46 ms daily in release. On its first authored city, the content validator caught counter staff unable to queue at their own counter.

Requires reading each run’s final day. A hand-authored city’s comment promised a full year, but its fields produced no grain because separate sections owned resting cost, rested yield and daily work tiles. A generated city passed founding checks but starved at its counter: 14,679 of 15,027 final-day refusals came from households outside walking range. Both had a claim in a comment, an adjacent test and gradual exhaustion.

September 2026 design

Added 7,310 design lines in 14 files during one working day after the update, without changing Rust. A checked 29-node graph completed eleven nodes, including ten canon rounds of cited positions and trade-offs, written sequentially. They added hot springs, steam vents, gas seeps, tar pools, the oracle’s form, a mystery-cult definition and location, and four aspects, bringing canon to twenty.

Found “cult aspect” at 41 undefined sites and replaced it with an earlier-row phrase. Code work has not started, leaving the sixteen-item content pack four aspects behind canon.

Long-run limits

Runs a founded city for twenty years without collapse or cycles. One region reaches 5.46 million services per year by year three and stays there through year twenty; all 5,014 households lack fuel on day 7,200. Mortality, inflows and building-condition state are absent, so population cannot change and the planned six-hundred-year horizon remains unverified.