How stephen-t-2023/dreambound works
DreamBound is a browser-based interactive story game. The player starts from the menu, enters a branching narrative, and can review recorded choices or return to the menu; a separate end scene is routed by the app. Shared audio playback and volume controls are available through settings. The sampled code establishes the router, choice-history handoff, and audio-control wiring. The story-data module is indexed as a dependency but was not excerpted, so its internal branches are not expanded here.
Main entry points: App.jsx Route shell · choice_screen.jsx Choice story · main_menu.jsx Main menu · settings.jsx Settings modal
Components 12
Game screens
- Main menu
src/main_menu.jsx - Choice story
src/choice_screen.jsx - Story content
src/assets/textData.jsx - Choice reflection
src/reflect_choices.jsx - End scene
src/end_scene.jsx
Audio controls
- Settings modal
src/components/settings.jsx - Audio player
src/components/AudioPlayer.jsx - Shared audio state
src/components/AudioContext.jsx - Background track
src/assets/background_loop.mp3
App runtime
- React entry
src/main.jsx - Route shell
src/App.jsx
Other components
- Player
Connections 15
- Player → React entry: opens game
- React entry → Route shell: renders
src/main.jsx - Route shell → Main menu: routes home
src/App.jsx - Route shell → Choice story: routes choices
src/App.jsx - Route shell → Choice reflection: routes reflection
src/App.jsx - Route shell → End scene: routes ending
src/App.jsx - Main menu → Choice story: navigates to
src/main_menu.jsx - Choice story → Story content: reads story
src/choice_screen.jsx - Choice story → Choice reflection: passes history
src/choice_screen.jsx - Main menu → Settings modal: opens
src/main_menu.jsx - Choice story → Settings modal: opens
src/choice_screen.jsx - Settings modal → Audio player: renders
src/components/settings.jsx - Audio player → Shared audio state: uses controls
src/components/AudioPlayer.jsx - Main menu → Shared audio state: starts audio
src/main_menu.jsx - Shared audio state → Background track: plays track
src/components/AudioContext.jsx