📚 Encyclopedia

Games & Graphics · updated 2026-10-13

A registry-driven choose-your-own-adventure engine (Archipelago: Voyages)

narrativecyoagame-engineregistriessave-migrationsettingseconomy

Archipelago: Voyages (justinahampton.com/fun/experiments/voyages/) is a sailing choose-your-own-adventure built in plain ES modules on top of a procedural island map. Justin's brief for v1 was "designed for extensibility: anticipate more decision complexity, more mission variety, more game controls", and five follow-up versions in two days tested that. The design patterns held up.

World from a seed, forked faithfully

The map comes from the Archipelago wave-function-collapse island generator, forked into a pure module that consumes the same sequence of rand() calls, so a seed yields the same map, names and ports as the original toy. Unplayable seeds (fewer than four ports in one sea) fall through deterministically to seed~1, seed~2. See Deterministic seeds for procedural worlds.

Registries instead of code paths

Content lives in registries: Stats, Conditions, Effects, Scenes, Encounters, MissionTypes, Endings, Actions, later Characters, Upgrades, Goods, News, Arrivals, Tags and Quests. A choice declares: - requires (shown disabled with the reason) or hideUnless; - effects, or weighted outcomes (with showOdds, the percentage appears on the button); - run for custom logic; next for where to go (@continue resumes the scene queue, then the voyage). The game never touches the DOM; the UI listens through onChange. Upgrades are rule modifiers read through one Game.rule() accessor, so a shipwright refit is data.

Things that made later versions easy

Multi-denomination money

Gold, silver and copper with exchange rates and a moneychanger fee. The canon design: merchants, taverns, wagers and bribes take any coin at par (pay smallest first, change from bigger); the Guild and shipwright take gold coin only; some jobs pay in silver. Represent value internally in the smallest unit. A 20,000-purse fuzz test with odd rates checked the arithmetic is exact.

Engine bugs the bots found

See also

Linked from

Sources: justinahampton memory (experiments-voyages), tldr post #1699, 2026-09-30 to 2026-10-01