Scene integration for the Great Cycle system:
- CradleScene: shows "Великий Цикл N: Тема | Ран X/7", narrative quote
- UIScene: cycle info bar and run phase display below health
- GameScene: world trace spawning (ruins/markers from past runs),
trace glow rendering, death position recording, cycle info to registry,
biomeId + worldSeed passed to RunState
- Scene flow: Fractal → RenewalScene (on 7th run) → Cradle
Co-authored-by: Cursor <cursoragent@cursor.com>
After every 7th run (Great Renewal), players see a special scene:
- Pulsing Mycelium particle animation (breathing spiral)
- Staged text reveals: title, flavor, cycle counter, theme, lore, maturation
- "Цикл N → Цикл N+1" transition with narrative theme name
- Lore fragment from the new cycle's theme (Russian)
- Mycelium maturation percentage display
- FractalScene routes to RenewalScene when renewal detected
- Scene flow: Fractal → Renewal → Cradle (on renewal) or Fractal → Cradle (normal)
- Registered in game config
Co-authored-by: Cursor <cursoragent@cursor.com>
Law of Trace: "nothing disappears without a trace."
- WorldTrace ECS component (traceType, sourceRunId, glowPhase)
- Death site markers placed at exact death positions (dark red)
- Discovery site markers for runs with 3+ discoveries (blue-gray)
- Deterministic position derivation from world seed
- Traces from current AND previous great cycle included
- Biome filtering, map bounds clamping, glow animation
- 13 new tests (562 total), all passing
Co-authored-by: Cursor <cursoragent@cursor.com>
Core engine for the Great Cycle mechanic (GDD Section IV):
- GreatCycleState tracking: cycle number, run within cycle, theme
- RunTrace recording: death position, school, biome, discoveries per run
- Cycle advancement: auto-advance to next cycle after 7 runs
- Great Renewal: resets traces, advances theme, strengthens Mycelium
- 6 narrative themes (Awakening→Doubt→Realization→Attempt→Acceptance→Synthesis)
- Cycle world modifiers: terrain/resources/creatures scale with cycle
- Narrative data JSON with Russian/English lore fragments per theme
- MetaState + persistence + RunState extended with cycle fields
- 38 new tests (549 total), all passing
Co-authored-by: Cursor <cursoragent@cursor.com>
Add 3 new schools with real scientific principles (Lever & Moment, Photosynthesis,
Angular Measurement). Data-driven unlock conditions check codex elements, creature
discoveries, and completed runs. Each school provides passive gameplay bonuses
(projectile damage, movement speed, creature aggro range, reaction efficiency)
applied through system multiplier parameters. CradleScene shows all 4 schools with
locked ones grayed out and showing unlock hints. 24 new tests (511 total).
Co-authored-by: Cursor <cursoragent@cursor.com>
setScrollFactor(0) prevents camera scroll but NOT zoom displacement.
Added fixToScreen() utility that compensates object positions and scale
each frame based on current camera zoom. Applied to all scrollFactor(0)
UI elements in GameScene, Minimap, and BossArenaScene.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expand beyond vertical slice with two new biomes and massive chemistry expansion:
Chemistry: +20 real elements (Li→U), +39 compounds (acids/salts/oxides/organics),
+85 reactions (Haber process, thermite variants, smelting, fermentation, etc.)
Biomes: Kinetic Mountains (physics/mechanics themed) and Verdant Forests
(biology/ecology themed), each with 8 tile types and unique generation rules.
Creatures: 6 new species — Pendulums/Mechanoids/Resonators (mountains),
Symbiotes/Mimics/Spore-bearers (forests). Species filtered by biome.
Infrastructure: CradleScene biome selector UI, generic world generator
(tile lookup by property instead of hardcoded names), actinide element category.
487 tests passing (32 new).
Co-authored-by: Cursor <cursoragent@cursor.com>
- Remove existing tilemap/minimap textures before recreating (prevents
"Texture key already in use" error on second run)
- Expose __game and __debugKill for dev console testing
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add CradleScene (Spore Cradle): school selection UI with spore particles
- Add DeathScene: body decomposes into real elements with labels
- Add FractalScene: WebGL Mandelbrot/Julia shader + canvas fallback
- Integrate RunState into GameScene: phase management, escalation, crisis
- Give starting kit from chosen school on run start
- Player death triggers DeathScene → FractalScene → CradleScene loop
- Track element/creature discoveries during gameplay
- Chemical Plague crisis: tinted overlay, player damage, neutralization
- BootScene loads meta from IndexedDB, goes to CradleScene
- Update version to v0.6.0
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add school data (Alchemist: H, O, C, Na, S, Fe starting kit)
- Add run cycle types: phases, escalation, crisis, body composition
- Implement run state management (create, advance phase, discoveries, spores)
- Implement meta-progression (codex, spore accumulation, run history)
- Implement crisis system (Chemical Plague with neutralization)
- Add IndexedDB persistence for meta state
- 42 new tests (335 total)
Co-authored-by: Cursor <cursoragent@cursor.com>
5 ecosystem tests verifying:
- Single species stabilizes with food
- Predator-prey dynamics reduce prey population
- Starvation without food leads to decline
- Mixed ecosystem runs 500 ticks without errors
- Lifecycle drives population renewal through egg hatching
293 total tests passing
Co-authored-by: Cursor <cursoragent@cursor.com>
UIScene renders as overlay on top of GameScene:
- Health bar (top-left) with color transitions green→yellow→red
- 4 quick slots (bottom-center) with active highlight, item symbols and counts
- Inventory weight/slots info (bottom-right)
- Controls hint (top-right)
GameScene pushes state to Phaser registry each frame.
Phase 4 (Player Systems) complete — 222 tests passing.
Co-authored-by: Cursor <cursoragent@cursor.com>
4 quick slots bound to keys 1-4. Active slot determines what F key
throws. Auto-assigns new items on collection. Clears slot when item
depleted. 15 new tests (213 total).
Co-authored-by: Cursor <cursoragent@cursor.com>
F key launches first inventory item toward mouse cursor as projectile.
Projectiles travel at 350px/s, expire after 2s, destroyed on hitting
non-walkable tiles. Color matches element's periodic table color.
13 new tests (198 total).
Co-authored-by: Cursor <cursoragent@cursor.com>
Inventory uses real atomic/molecular masses (AMU). Same items auto-stack.
Respects weight limits and slot limits. Supports elements and compounds
via chemistry registries. 28 new tests (162 total).
Co-authored-by: Cursor <cursoragent@cursor.com>
Player spawns at walkable tile near map center. WASD controls movement
(150px/s, normalized diagonal). Tile collision with wall-sliding prevents
walking through acid pools, crystals, geysers. Camera follows player with
smooth lerp. 39 new tests (134 total).
Co-authored-by: Cursor <cursoragent@cursor.com>
Screenshots from visual verification go to screenshots/ dir,
not tracked in git. Also ignore Playwright MCP console logs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Push must happen immediately after every commit — no accumulating
unpushed work. Updated both development order and task completion
checklists.
Co-authored-by: Cursor <cursoragent@cursor.com>
- bitECS world with time tracking (delta, elapsed, tick)
- 5 components: Position, Velocity, SpriteRef, Health, ChemicalComposition
- Movement system (velocity * delta) + bounce system (boundary reflection)
- Health system with damage, healing, death detection
- Entity factory (createGameEntity/removeGameEntity)
- Phaser bridge: polling sync creates/destroys/updates circle sprites
- GameScene: 20 colored circles bouncing at 60fps
- BootScene: click-to-start transition, version bump to v0.2.0
- 39 ECS unit tests passing (74 total)
Co-authored-by: Cursor <cursoragent@cursor.com>