Citadel
Citadel is the second game on the shared engine: grow a town's economy through settlement tiers, keep villagers fed and happy. It began as a settlement/light-RTS with sharp raids and sieges — then took a cozy pivot that became the design of record.
The cozy contract
A cozy placement puzzle you read by watching the town live.
The rule of record — nothing you built is taken from you. Threats don't destroy; they dent local happiness, which taxes productivity down to a ~60–70% floor (never zero), so recovery is always guaranteed and there's no death spiral.
Fire
Disease
Raids
Cold-open grace
The old destructive behaviour isn't gone — it's frozen byte-identical behind
cozyThreats: false and re-pointed to autonomous sharp-mode systems, powering a
solo-only Challenge mode.
The two-way service loop
The economy hangs on one curve, bufferServiceFactor, sampled on an EWMA of
service:
0.6 ─────────▶ 1.0 ─────────▶ 1.25
stockpile-pressure neutral service-bonus
throttle (floor) (a building clearing
the 0.75 service band)
Producers are single-slot; happiness alone tops out at 0.9, and service carries the last 0.1 of the immigration roll — so a well-served town measurably out-produces a starved one (~2.08×) without anything ever hitting zero.
The sim only takes flat, independent options (cozyThreats, enableArmy,
seedTown, chargeBuildCost, …). "Cozy" and "Challenge" are just bundles of
those — and every mode-affecting option must be persisted in the save, or a
replay runs under the wrong rules.
Rendering: meshes, not sprites
WebGL2 true 2:1 dimetric
Terrain is drawn flat on a 32×16 dimetric grid with x+y painter's depth;
relief is a hillshade over a heightfield + fBm. Buildings, though, are in-code
3D meshes (2026-07-14) — indexed triangle primitives fed to a deterministic
software rasterizer with back-face culling, a per-pixel z-buffer, and
flat-shading onto three adjacent Apollo palette steps. The result is packed into
the sprite atlas once at client boot (byte-identical every run, so no PNG needs
committing), and the GPU still only ever draws quads — the meshes are an asset
pipeline, not a runtime 3D path. Deleting the old 2D ASCII-recipe path
removed 1,964 lines. Night adds emissive window glow via the same day
factory, so lit and unlit frames can't drift.
Since 2026-08-18 the only render backend is WebGL2, for Citadel as for every other game here — Canvas2D and both WebGPU backends were deleted. Hollow is the one game with a genuine runtime 3D layer.
How it runs
Unlike Farm Valley, Citadel runs its sim in an in-browser Web Worker, posting
snapshots to the main thread over postMessage — same transport-agnostic
bootstrapSim(), different pipe. (Multiplayer was deprecated, not deleted, in
2026-07-10 — kept compiling as a revival target; solo is the product.)
Citadel moved from EDG32 to Apollo-46: EDG32's gamut had no desaturated olive-grey midtones for muted medieval naturals. Because every colour already routed through named role constants with zero raw hex, the migration was an import redirect across ~200 sites, not a rewrite. See Citadel decisions and Citadel rendering.