Skip to main content

The bug that started it

Changing a volume on the title page used to freeze the loading animation for a moment. Nothing about a volume should touch an animation, but every option change was announced to every system as “settings changed”, and some of them reacted by rebuilding themselves. The fix was a rule the whole project now follows: changing one option must never disturb an unrelated system.

Seven domains

Every setting belongs to exactly one domain. When something changes, the game announces only the set of domains whose values actually changed, as bit flags, and each system listens only to its own.
A volume never re-resolves the quality tier. A tier change never touches the audio buses or your keys. And the loader on the title page lives in its own sandbox, driven from one shared clock, so no option can restart it.
The settings file itself is plain key=value lines and is read tolerantly: unknown keys are ignored, damaged values fall back to defaults, and every number is clamped. A broken settings file cannot break the game.

One controls ledger, two menus

You can rebind keys on the title page before the engine has loaded, or in the pause menu while you play. Both are the same ledger.
The interesting decision is in how bindings are stored. Unity can save input overrides as JSON keyed by its internal action IDs, but for actions created in code those IDs are regenerated every run, so a saved binding would not survive a restart or cross from the page to the engine. Ochrebound stores its own map keyed by stable, readable slot names (left, right, jump, climb, descend, interact, stitch, rest, beckon, hour, viewfinder, ledger, postcard), which both the page’s JavaScript and the game’s C# read and write. Rules both menus enforce:
  • Atomic swaps. Binding a key that another action owns swaps the two in one step.
  • Secondary keys yield. The arrow keys and Tab are default alternates; if you claim one as a primary key for another action, the alternate quietly steps aside.
  • Reserved keys are refused. Shift, Caps Lock, Num Lock, the Windows, Command and menu keys, Print Screen and Pause are never bound, and Escape always pauses.
  • Physical keys, local labels. Bindings are stored by key position and shown with your layout’s letters.
  • Blur cancels. Losing window focus mid-rebind cancels it.
ControlsRebindTests covers this with 21 EditMode tests. The PlayMode test RebindingStitchKeyMovesStitchAndUpdatesGlyphs rebinds the stitch live and checks that the street’s glyphs follow, and EachSettingTouchesOnlyItsOwnDomain proves the domain rule end to end.