Skip to content

SettingsManager

The SettingsManager defines which categories appear in your game’s settings menu. Pick the ones you need; the menu auto-renders with the right controls; the choices persist via localStorage and write through to the relevant systems immediately.

Open it from Inspector → Systems → SettingsManager → Open.

The system ships with six known categories. You can also add custom category ids; they render with empty content until you wire them up.

IdWhat it surfaces
audioMaster / Music / SFX / Dialog volumes, Mute. Writes through to AudioManager.
videoResolution, Fullscreen, VSync, Framerate cap. Engine-specific.
controlsMouse sensitivity, Invert Y, key rebinding (reads InputManager).
gameplayDifficulty, Speedrun timer, Skip cutscenes. Up to you to wire.
accessibilityHigh contrast, Screen shake, Subtitles. Some categories also affect AudioManager and ThemeManager.
languageLocale dropdown (uses the bundled language list).

The editor lets you check or uncheck categories from a list. Each row shows the category id and a human-readable label.

In the bundled bundles, the settings scene calls settingsManager.renderInto(domNode) and the manager produces the right controls based on the active categories.

Audio renders four sliders (Master, Music, SFX, Dialog) plus a Mute checkbox. Pulling a slider calls audio.setBusGainDb(...) immediately so the change is audible without saving. Closing the menu writes the persisted state.

Video renders engine-appropriate controls. Web bundles get a fullscreen toggle and a framerate cap (via requestAnimationFrame throttling). Unity / Godot bundles get resolution dropdowns and the engine’s vsync setting.

Accessibility’s Screen Shake toggle drives a screenShake.enabled flag on the EventBus; anything that wants to listen subscribes.

To add a category the bundled types don’t cover (e.g. cheats), put its id into the active list. The menu will render an empty section labeled “Cheats”. Then hook in your own DOM (or use the bundled menu helpers) to populate the panel.

This is the right shape for jam games and prototypes where you want to expose dev toggles without writing a real settings UI.

Settings are stored in localStorage at <bundle-id>:settings:v1. The SettingsManager writes on every change and reads on boot. Changes are applied to dependent systems immediately:

  • Volume sliders → AudioManager bus gains.
  • High contrast → ThemeManager palette.
  • Locale → your localization layer (the bundles don’t ship one, but the wire is there).
[systems.SettingsManager.config]
categories = [
"audio",
"video",
"controls",
"gameplay",
"accessibility",
"language",
]

Validation: category ids are unique and match ^[a-z][a-z0-9_-]*$. You can add custom ids without registering them anywhere else; they render as empty panels.