I will start by enhancing src/types/game.ts to support our storyline chapter system, dynamic background music (BGM) themes, Daily Workout Quests (the famous 100 push-ups, squats, sit-ups, 10km run), and lore archives.
Now I will update Player in src/types/game.ts to track unlocked story chapters, daily quest completions, and active lore records. Let's inspect where Player is defined and add these fields.
Let's read lines 65-105 of src/types/game.ts to locate the Player interface.
I will now add dailyQuest: DailyQuestProgress, unlockedChapters: number[], and loreUnlocked: string[] to the Player interface.
Now I will create src/utils/music.ts — an advanced 60FPS procedural BGM orchestra & dark fantasy synthwave engine using Web Audio API that dynamically transitions between real musical themes (chilled title harps, spooky exploration cello arpeggios, adrenaline-pumping combat symphonies, ominous heavy boss choir/drums, emotional story pianos, and victory chimes) with a dedicated volume slider and mute toggle that saves in localStorage! Using procedural synthesis ensures zero load times, no broken network links, no copyright issues, and smooth cross-fade audio streaming. Let's create src/utils/music.ts.
Let's quickly remove the unused nextTrack field in src/utils/music.ts before proceeding. I will explain and execute.
I will clean up src/utils/music.ts by removing the unused nextTrack property.
Now I will create src/data/story.ts, defining our multi-chapter solo leveling RPG storyline, dialogue interactions, lore archives, and chapter rewards! This transforms the game from simply moving between rooms into an unfolding adventure with lore and voice. Let's create src/data/story.ts.
I will create src/data/story.ts to supply narrative chapters, NPC dialogue sequences, system revelations, and lore records.
Now let's build the interactive visual-novel style StoryCutscene.tsx component that renders cinematic storyline transitions between gates, plays the emotional/epic BGM tracks, lets players click or press [SPACE] through dialogues, and awards story rewards when completed! I will explain and execute.
I will create src/components/StoryCutscene.tsx to provide visual novel chapter experiences with dialogue progression, character voice styling, and chapter completion bonuses.
Now let's build the interactive Daily Quest Workout Modal (src/components/DailyQuestModal.tsx) so players can complete Sung Jin-Woo's signature daily strength training (100 Push-ups, 100 Sit-ups, 100 Squats, and 10km Run) for free Stat AP and bonus gold! I will explain and execute.
I will create src/components/DailyQuestModal.tsx to implement an interactive strength training workout mini-feature with stat incentives.
Now I will build the Lore Archives & Story Chronicles Modal (src/components/LoreModal.tsx) so players can revisit past story events and study the origins of Rulers, Monarchs, and Legendary weapons! I will explain and execute.
I will create src/components/LoreModal.tsx allowing players to read unlocked lore archives, study enemy descriptions, and review previous story chapters.
Now let's update PlayerHUD.tsx to add quick buttons for the Daily Quest (with an urgent badge if incomplete!) and the Lore Archives, as well as a compact BGM Volume Slider & Theme Tracker directly inside the top HUD! Let's read lines 135-185 of src/components/PlayerHUD.tsx to locate the top right buttons and add them cleanly. I will explain and execute.
I will read src/components/PlayerHUD.tsx around the action buttons so we can insert the Daily Quest workout trigger, Lore archive button, and live BGM volume control.
Let's inspect the top of src/components/PlayerHUD.tsx so we can import bgmMgr, Dumbbell, BookOpen, Volume2, and VolumeX, and add handlers onOpenDailyQuest and onOpenLore. I will explain and execute.
I will read lines 1 to 40 of src/components/PlayerHUD.tsx.
Let's update the imports and Props interface in src/components/PlayerHUD.tsx, and add the Daily Quest button (with pulsing gold badge if incomplete), Lore button, and interactive BGM & SFX audio icon + slider to the top row! I will explain and execute.
I will update src/components/PlayerHUD.tsx to add onOpenDailyQuest, onOpenLore, and integrated audio controls.
Now let's read around line 70 in src/components/PlayerHUD.tsx to update the component destructuring and render the buttons and volume controls. I will explain and execute.
I will read lines 70 to 110 of src/components/PlayerHUD.tsx.
Let's inspect lines 180 to 240 of src/components/PlayerHUD.tsx where the action buttons reside. I will explain and execute.
I will read lines 180 to 240 of src/components/PlayerHUD.tsx.
Now let's update PlayerHUD.tsx to add useState for BGM volume control, insert the Daily Workout and Lore buttons into the top action deck, and display a subtle BGM music icon + mini volume slider right in the top bar! I will explain and execute.
I will edit src/components/PlayerHUD.tsx to integrate the Daily Workout button, Lore archives trigger, and live music volume controls.
Let's update the Action Buttons section in PlayerHUD.tsx to insert our new Daily Workout, Lore, and BGM Volume Slider elements. I will explain and execute.
I will update the buttons row in src/components/PlayerHUD.tsx.
Now let's update StartScreen.tsx and PauseModal.tsx to include both BGM music controls and Volume Sliders, plus update the FAQ rules to explain Story Chronicles, BGM themes, and Daily Strength Workouts! Let's inspect StartScreen.tsx where audio controls are displayed. I will explain and execute.
I will read lines 20 to 60 of src/components/StartScreen.tsx.
Let's read lines 60 to 95 of src/components/StartScreen.tsx. I will explain and execute.
I will read lines 60 to 95 of src/components/StartScreen.tsx.
Let's update StartScreen.tsx to import bgmMgr, start playing the 'title' music track when the title screen opens, provide an adjustable BGM Volume Slider right on the title bar, and add the new FAQ items about Story Chronicles and Daily Quests! I will explain and execute.
I will update src/components/StartScreen.tsx to launch the title music theme, embed the BGM volume slider, and detail the new story and workout rules in the FAQ.
Let's update the header bar in src/components/StartScreen.tsx to include the volume slider and a Lore Archives shortcut button. I will explain and execute.
I will update the header bar in src/components/StartScreen.tsx to display the music slider and Lore archives trigger.
Let's also update the FAQ in StartScreen.tsx to include questions about Story Chronicles, BGM music adaptation, and the Daily Strength Quest! Let's read lines 330 to 385 of StartScreen.tsx where the FAQ items are defined. I will explain and execute.
I will read lines 330 to 385 of src/components/StartScreen.tsx.
Let's add three new FAQ entries at the top of the FAQ list about Story Chronicles, dynamic BGM music adaptation, and Daily Quest strength workouts, and remove the unused Dumbbell import from StartScreen.tsx. I will explain and execute.
I will update the FAQ list and clean up imports in src/components/StartScreen.tsx.
Let's insert the three FAQ questions about the Storyline, BGM music engine, and Daily Quest workout in StartScreen.tsx. I will explain and execute.
I will add the new FAQ items to src/components/StartScreen.tsx.
Now let's update PauseModal.tsx so that players have full volume slider control for both BGM Music and SFX during gameplay pause! Let's read src/components/PauseModal.tsx. I will explain and execute.
I will read src/components/PauseModal.tsx.
Let's update PauseModal.tsx to include bgmMgr, displaying both the mute toggle button and a dedicated BGM volume slider so players can fine-tune audio levels mid-game. I will explain and execute.
I will edit src/components/PauseModal.tsx to integrate BGM volume controls and slider adjustment in the pause menu.
Let's update the volume toggle and slider markup inside src/components/PauseModal.tsx. I will explain and execute.
I will update the volume control section in src/components/PauseModal.tsx.
Now let's orchestrate everything together in src/App.tsx!
Let's review what we need to add to App.tsx:
- Import
bgmMgr from ./utils/music, STORY_CHAPTERS, INITIAL_DAILY_QUEST from ./data/story, StoryCutscene, DailyQuestModal, and LoreModal.
- Update initial player state and
startNewGame to populate dailyQuest, unlockedChapters, and loreUnlocked.
- Track active storyline cutscenes! When a game starts (Chapter I) or when a Gate is conquered (Chapter II, III, IV, V, VI), show
StoryCutscene first! When completed, enter the dungeon raid!
- Automatically change BGM music track according to phase and room:
- When entering normal combat:
bgmMgr.playTrack('combat').
- When reaching a Boss chamber or extracting a boss soul:
bgmMgr.playTrack('boss').
- When exploring peaceful corridors or altars:
bgmMgr.playTrack('explore').
- On victory:
bgmMgr.playTrack('victory').
- Wire up the Daily Workout and Lore Archives modals in the HUD!
- Add workout exercise progression handler (
handleTrainWorkout) and reward claim (handleClaimDailyReward).
Let's read lines 1 to 60 of src/App.tsx to start our clean integrations. I will explain and execute.
I will read lines 1 to 60 of src/App.tsx.
Let's read lines 61 to 110 of src/App.tsx. I will explain and execute.
I will read lines 61 to 110 of src/App.tsx.
Let's check lines 130 to 220 of src/App.tsx where startNewGame resides. I will explain and execute.
I will read lines 130 to 220 of src/App.tsx.
Let's add the imports and update the initial player state & startNewGame to populate dailyQuest, unlockedChapters, loreUnlocked, and add modal states (showDailyQuest, showLore) and active story chapter state (activeChapterId). Let's edit the top of src/App.tsx. I will explain and execute.
I will update imports and initial states in src/App.tsx to include story chapters, daily workout quests, lore records, and dynamic music orchestration.
Let's update the state definitions and initial player data in src/App.tsx. I will explain and execute.
I will update the state definitions and default Player object in src/App.tsx.
Let's update the player initial object and startNewGame player object in src/App.tsx. I will explain and execute.
I will update the default player data and startNewGame generation in src/App.tsx.
Let's update startNewGame around line 180 of src/App.tsx to include dailyQuest, unlockedChapters, and loreUnlocked, and automatically launch Chapter I story cutscene when starting a fresh run! Let's read lines 200 to 250 of src/App.tsx. I will explain and execute.
I will read lines 200 to 250 of src/App.tsx.
Let's update startNewGame to include the missing fields, launch the Chapter I story cutscene, and transition BGM track appropriately when entering combat! I will explain and execute.
I will update startNewGame in src/App.tsx to set initial story parameters and play Chapter 1 on game start.
Now let's examine where we manage BGM music adaptation! Whenever phase, screen, or currentEnemy changes during gameplay, we want BGM to dynamically shift:
- If
screen === 'playing', and phase === 'combat' or 'extracting', if currentEnemy?.isBoss play 'boss', else play 'combat'.
- If
phase === 'exploring' or 'event', play 'explore'.
- On gate transition / level advancement, play Story Cutscene for Chapter II, III, IV, V, VI!
Let's inspect
handleMoveDeeper around line 550 to see where gate transition occurs. I will explain and execute.
I will read lines 560 to 650 of src/App.tsx.
When a Gate is conquered and we advance to nextGate, let's check which Story Chapter matches nextIdx + 1 (e.g., Chapter 2 for Gate 2, Chapter 3 for Gate 3, etc.), unlock it in unlockedChapters, and show the StoryCutscene! Let's update handleMoveDeeper in src/App.tsx. I will explain and execute.
I will update handleMoveDeeper to unlock and trigger story narrative chapters when transitioning between gates.
Now let's implement the Daily Workout Training Handler and Reward Claim in src/App.tsx, as well as dynamic BGM adaptation in a useEffect! Let's check where handleBuyItem ends around line 800 of src/App.tsx. I will explain and execute.
I will read lines 780 to 860 of src/App.tsx.
Let's add handleTrainWorkout, handleClaimDailyReward, handleReplayStoryChapter, and dynamic BGM adaptation in src/App.tsx. Let's read lines 870 to 930 to see where screen rendering begins. I will explain and execute.
I will read lines 870 to 930 of src/App.tsx.
Let's read down to the end of src/App.tsx from line 930 so we can wire all modals and props cleanly. I will explain and execute.
I will read lines 930 to 1018 of src/App.tsx.
Let's add the dynamic BGM synchronization useEffect, workout training logic, story replay logic, and wire up StoryCutscene, DailyQuestModal, and LoreModal into src/App.tsx. I will explain and execute.
I will edit src/App.tsx to insert BGM track transitions, workout logic, story cutscene screens, and archive dialogues.
Let's fix the missing useEffect import at line 1 of src/App.tsx, and connect onOpenDailyQuest, onOpenLore, DailyQuestModal, and LoreModal into the main rendering loop of src/App.tsx. I will explain and execute.
I will add useEffect to imports and connect the Daily Quest workout and Lore modal triggers in src/App.tsx.
Let's wire onOpenDailyQuest, onOpenLore, and their modals around line 1030 in src/App.tsx. I will explain and execute.
I will read lines 1020 to 1080 of src/App.tsx.
Let's read down to line 1111 of src/App.tsx. I will explain and execute.
I will read lines 1080 to 1111 of src/App.tsx.
Let's edit src/App.tsx to pass onOpenDailyQuest={() => setShowDailyQuest(true)} and onOpenLore={() => setShowLore(true)} to PlayerHUD, and render DailyQuestModal and LoreModal inside the Modals layer! I will explain and execute.
I will update PlayerHUD props and insert DailyQuestModal and LoreModal in src/App.tsx.
Let's add DailyQuestModal and LoreModal inside the Modals Layer at the bottom of src/App.tsx. I will explain and execute.
I will add the modal renders to src/App.tsx.
Now let's run build_project to confirm that all TypeScript files compile cleanly, all new audio engine features function properly, and our bundle builds without errors! I will explain and execute.
I will now build the project to verify that the entire codebase is error-free.
I have designed and incorporated a multi-chapter storyline, a dynamic real BGM orchestral engine with adjustable volume sliders, and several additional gameplay features into Shadow Monarch's Ascent.
🌟 New Features & Enhancements
1. 🎬 Epic Episodic Storyline & Chapter Chronicles
- Chapters I through VI: Weaved a rich narrative inspired by Solo Leveling across the dungeon gates:
- Chapter I: The Double Dungeon Awakening (Altar sacrificial trial & System awakening)
- Chapter II: Venom in the Mist (Hunting Kasaka in the swamps)
- Chapter III: The White Frost Crisis (Surviving a Red Gate disaster against Baruka)
- Chapter IV: Knight of the Blood-Red Throne (The Job-Change trial against Commander Igris)
- Chapter V: Hymn of Solar Blistering Fire (The subterranean Orc pyramid & word of Ashborn)
- Chapter VI: Calamity of the Infinite Realm (Challenging Kamish for absolute supremacy)
- Visual-Novel Style Story Cutscenes (
StoryCutscene.tsx): Play before new gates and after boss victories! Includes character voice tags (System, Sung Jin-Woo, Igris, Ashborn, Chairman), keyboard stepping ([SPACE]), and chapter completion bonuses (granting bonus AP points, Gold, and XP).
- Chronicles of Ashborn & Lore Archives (
LoreModal.tsx): Accessible directly from the Title Screen and Top HUD! Re-watch past story chapters anytime or inspect unlocked System lore archives.
2. 🎵 Dynamic 60FPS Orchestral BGM Engine with Live Volume Slider
- Generative Real-Music Synth Engine (
music.ts): Built a zero-latency Web Audio orchestra that procedurally plays dark synthwave chord progressions, cello footstep loops, harp arpeggios, and thunderous war drum fifths with guaranteed reliability (no broken streaming links or CORS issues).
- Context-Sensitive BGM Transitions:
- Main Menu / Title: Ethereal harp arpeggios and deep cello drone (
'title').
- Dungeon Exploration / Safe Rooms: Dark ambient footstep loops and tense minor mode pulses (
'explore').
- Normal Monster Combat: Fast tempo battle lead riffs and punchy drum kicks (
'combat').
- Boss Raids & Soul Extraction: Ominous gothic choir fifths, rapid lead synth sequences, and heavy war drums (
'boss').
- Story Chronicles: Solemn emotional piano & cello melody (
'story').
- Victory: Bright triumphant major fanfare (
'victory').
- Universal BGM & SFX Volume Sliders: Players can smoothly adjust audio intensity (from 0% to 100%) or instantly mute (
[M]) directly from the Main Title Header, the Live Gameplay HUD, or the Pause Menu, with preference persistence via localStorage.
3. 🏋️ Daily Strength Workout Quest (DailyQuestModal.tsx)
- "100 Push-ups, 100 Sit-ups, 100 Squats & 10km Run": Click the glowing Workout badge in the HUD to enter Jin-Woo's daily training deck!
- Tap buttons or press keyboard shortcuts (
[1-4]) to push through reps and miles. Completing the daily targets awards +3 Permanent Stat Attribute Points (AP) and +300 Gold, while unlocking a special system lore record.
4. 📖 Updated Rules & FAQ
- Expanded the start screen System Guide & FAQ with detailed entries explaining the multi-chapter storyline, dynamic BGM music adaptations, volume sliding controls, and how to complete the Daily Strength Workout.
Files built: src/types/game.ts, src/utils/music.ts, src/data/story.ts, src/components/StoryCutscene.tsx, src/components/DailyQuestModal.tsx, src/components/LoreModal.tsx, src/components/PlayerHUD.tsx, src/components/StartScreen.tsx, src/components/PauseModal.tsx, src/App.tsx