# Plan v3: Level System Overhaul ## Summary of Changes Requested 1. **Boss duration affects spawned enemies** - Boss's `duration` setting covers full journey (boss + spawns reaching well) 2. **Keep triangle enemy (basalt_guardian)** - Keep in config but don't use in levels 3. **Separate difficulty levels** - Folder-based: `levels/easy/`, `levels/medium/`, `levels/hard/` 4. **Regenerate all levels** - Using BPMs from bpm.md, evenly distributed, match music duration ## Decisions Made ### 1. Difficulty Level File Structure **Answer: Folder-based** ``` levels/easy/level1.json levels/medium/level1.json levels/hard/level1.json ``` ### 2. Boss Duration Propagation **Answer:** Duration covers boss travel + spawns reaching well. - If duration=10s and boss explodes at 60% of travel (explodeAt=0.4 means 40% screen width): - Boss explodes at 6s - Spawns hit well 4s later (at 10s total) - Spawns use same speed as boss ### 3. basalt_guardian **Answer:** Keep in config, just don't use in levels ### 4. Level Intensity Curve **Answer:** Evenly distributed for now ## Music/Level Reference | Level | Music | Duration | BPM | Half BPM | Double BPM | |-------|-------|----------|-----|----------|------------| | 1 | lvl1.wav | 44.8s | 126 | 63 | 252 | | 2 | lvl2.wav | 42.3s | 126 | 63 | 252 | | 3 | lvl3.wav | 55.8s | 140 | 70 | 280 | | 4 | lvl4.wav | 57.7s | 88 | 44 | 176 | | 5 | lvl5.wav | 50.0s | 120 | 60 | 240 | | 6 | lvl6.wav | 49.0s | 120 | 60 | 240 | | 7 | lvl7.wav | 37.6s | 88 | 44 | 176 | | 8 | lvl8.wav | 51.6s | 120 | 60 | 240 | | 9 | lvl9.wav | 58.6s | 144 | 72 | 288 | | 10 | lvl10.wav | 49.8s | 115 | 57 | 230 | ## Remaining Enemy Types (after removing basalt_guardian) | Type | Pattern | Notes | |------|---------|-------| | ember_scout | straight | Basic enemy, medium speed | | flare_serpent | sine | Wavy movement, rhythmic | | swift_cinder | straight | Very fast, small, low damage | | inferno_boss | straight | Slow, explodes into fan of spawns | ## Implementation Steps 1. [x] Fix boss spawns to inherit boss's speed (game.js) 2. [x] Update level loading for folder-based difficulty (levels.js) 3. [x] Update main.py API for folder-based structure 4. [x] Update editor for folder-based structure (editor.js, editor.html) 5. [x] Create folder structure and move existing levels to medium/ 6. [x] Regenerate all 10 levels for medium difficulty (with BPM matching) 7. [x] Clone medium levels to easy/ and hard/