Last Updated: November 2, 2025 Status: ⏳ Implementation Guide Purpose: Subtask breakdown for implementing in-game Settings UI See Also: UI/UX Architecture - UI/UX patterns and design system
This document outlines the implementation tasks for the in-game Settings UI. Each subtask (031.x) covers a distinct piece of functionality.
💡 Architecture Context: This is an implementation guide focusing on specific tasks. For UI/UX patterns, design system, and best practices, see UI/UX Architecture.
Recommended: Use DesignTokens for all styling instead of hardcoded values.
- Create
src/scenes/SettingsScene.jsextendingPhaser.Scenewith: • constructor (scene key:'Settings') • emptycreate()andupdate()methods • scene registration insrc/main.jsafterPauseScene
Acceptance Criteria:
SettingsScenecan be launched without errors.- Scene key
'Settings'appears in the game config.
- In
PauseScene(src/scenes/PauseScene.js), add a third button labeled Settings: • Position it below the existing “Main Menu” button • Match style:UIConfig.menuButton, hover/click SFX • On pointerdown, callthis.scene.launch('Settings')and keepPauseScenepaused
Acceptance Criteria:
- “Settings” button appears in the pause overlay
- Clicking it opens
SettingsScenewithout closingPauseScene
- In
SettingsScene.create(): • Draw full-screen semi-transparent overlay • Render centered panel rectangle usingUIConfig.panel• Add title text “Settings” withUIConfig.text.title• Add a Back button to return toPauseScene
Acceptance Criteria:
- Overlay and panel display correctly
- Back button returns to pause overlay
- Three controls: Master, Music, SFX
• Each with label, current percentage (0–100%), and “−”/“+” buttons in 5% increments
• Hook events to call:
AudioManager.getInstance().setMasterVolume(value)AudioManager.getInstance().setMusicVolume(value)AudioManager.getInstance().setSFXVolume(value)• Default values: Master 80%, Music 70%, SFX 90% • Persist values viaGameStateManager.saveSettings({ volumes })
Acceptance Criteria:
- Adjusting controls immediately changes audio levels
- Settings persist after scene exit and page reload
- For actions: Jump, Move Left, Move Right, Pause
• Display current key (e.g. “SPACE”, “A”, “D”, “ESC”)
• On click, enter “listening” mode and capture next key/code
• Update
InputManagermapping dynamically • Persist viaGameStateManager.saveSettings({ keybindings })• Reject duplicate assignments
Acceptance Criteria:
- New key assignments take effect immediately
- Cannot bind the same key to multiple actions
- Persisted on reload
- Control with three options: Low, Medium, High
• A left/right arrow or dropdown selector
• On change, call:
ParticleManager.setQuality(level)(affects particle count)CameraManager.setQuality(level)(affects bloom/intensity) • Persist viaGameStateManager.saveSettings({ graphicsQuality })
Acceptance Criteria:
- Switching quality updates effects in real time
- Setting stored and reapplied on scene entry
- Three toggles: • Color-blind palette (options: Off, Deuteranopia, Protanopia, Tritanopia) • High-contrast UI mode (boolean) • Subtitle captions for SFX events (boolean)
- On change, apply immediately:
•
ColorManager.applyPalette(type)•UIManager.applyHighContrast()•UIManager.showSubtitles(enable) - Persist via
GameStateManager.saveSettings({ accessibility })
Acceptance Criteria:
- Toggling options visually updates game/UI
- Subtitles overlay for sound events if enabled
- Ensure UI is navigable via: • Mouse/touch (pointer interactions) • Keyboard (Tab to focus, Arrow keys/Enter to change values) • Gamepad (D-pad/A button navigation)
- Implement focus highlight using
.setInteractive()andscene.input.keyboard.on('keydown')
Acceptance Criteria:
- All controls reachable without mouse
- Visual focus indicator present
-
Extend
GameStateManager: •saveSettings(settings: object)•loadSettings(): object• Default schema:{ "volumes": { "master": 0.8, "music": 0.7, "sfx": 0.9 }, "keybindings": { "jump": "SPACE", "left": "A", "right": "D", "pause": "ESC" }, "graphicsQuality": "Medium", "accessibility": { "palette": "Off", "highContrast": false, "subtitles": false } } -
Load and apply these settings in
Preloader.create()or at game start
Acceptance Criteria:
- Settings automatically applied on new sessions
- “Back” button in
SettingsScene: • On click or ESC key, play SFX, stopSettingsScene, resumePauseScene - Ensure no duplicate scenes running
Acceptance Criteria:
- Consistent return flow to pause overlay
- Write unit/integration tests for:
• Volume adjustments
• Key remapping logic
• Dropdown/toggle behavior
• Persistence layer (
GameStateManager) – Manual test plan: walkthrough on desktop/tablet + gamepad
End of Task 031 subtask breakdown.