Add Dukedom: the 1980 Creative Computing city-state sim
Add Dukedom: the 1980 Creative Computing city-state sim
#5 in Riparion/riparion-retro — merged 2026-06-09
Ports Dukedom (Kaapke, Creative Computing Feb 1980; lineage Hammurabi → Kingdom → Dukedom) to a mobile-first, fully client-side WASM Dioxus game, following NOTES.md with oregon-trail as the structural reference.
Engine (pure Rust, host-testable)
- Faithful port of every formula and the original's C integer-truncation semantics, cross-checked against
imports/dukedom.c. - Dukedom's procedural BASIC yearly loop adapted to a resumable single-
Signalstate machine: a serializedPhasecursor walked byrun_phases(), full-screen inputs asModes, in-stride decisions on aVecDeque<Interaction>queue, and aWarCtxsub-cursor so a refresh mid-war restores cleanly. - Per-game gauss event "climate" means (
R[1..8]) and the BASIC RNG idioms (rnd1/fnr/fnx/gauss) rebuilt onretro_kit::rng::GameRng. - 15 tests: spec-anchored unit checks + multi-seed full-reign smoke + mid-war serde roundtrip.
Faithfulness decisions (confirmed)
- Faithful, fix clear bugs: the Land screen lets you freely buy OR sell each year (original only offered sell if you bought 0); dead debug
printfs dropped. Everything else (locust halving, plague immunity window, King/war math) stays exact. - Onboarding: a How-to-Rule help screen + one-line per-screen hints.
- Scoring: tiered outcome ≫ years ≫ estate with a Serf→High King rank ladder.
UI / platform
Green-phosphor CRT aesthetic, localStorage auto-save + RESUME, local high-score table, installable per-game icons.
Shared work
- New retro-kit components
DecisionandNotice; taipan refactored onto them. - Per the new
NOTES.mdversion-bump convention:retro-kitandtaipan→ 0.1.1 (dukedom starts at 0.1.0). gen-icons.mjsgains a dukedom crown glyph; game + root READMEs updated.
Verification
cargo test -p dukedom— 15/15 green.- Browser-driven (390×844) save/resume incl. mid-war, error-banner, and RESUME-survives-NEW-REIGN paths.
🤖 Generated with Claude Code
Last updated 2026-06-09
Links to this note
Credits
Merged pull requests, newest first.