Commit Graph

20 Commits

Author SHA1 Message Date
Денис Шкабатур
5b7dbb4df3 phase 6: school data, run state, meta-progression, crisis system
- 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>
2026-02-12 15:10:05 +03:00
Денис Шкабатур
22e6c6bcee chore: complete Phase 5 — update version, progress, and plan
- BootScene version bumped to v0.5.0
- PROGRESS.md updated with Phase 5 completion details
- IMPLEMENTATION-PLAN.md Phase 5 marked 
- Ready for Phase 6: Run Cycle

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 14:21:35 +03:00
Денис Шкабатур
8dd69e8fd2 test(ecosystem): add ecosystem simulation tests
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>
2026-02-12 14:20:32 +03:00
Денис Шкабатур
9521b7951c feat(creatures): add interaction system and GameScene integration
- Projectile-creature collision with armor-based damage reduction
- Creature observation system (health/energy/stage when near player)
- Creature-to-player melee attacks with cooldown
- Full GameScene integration: AI, metabolism, lifecycle, reproduction, interaction
- Debug overlay shows creature count
- 16 new interaction tests (288 total)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 14:15:58 +03:00
Денис Шкабатур
324be5e643 feat(creatures): add creature types, data, ECS components, and core systems
Phase 5.1-5.5: Creatures & Ecology foundation
- 3 species data (Crystallid, Acidophile, Reagent) with real chemistry
- ECS components: Creature, AI, Metabolism, LifeCycle
- AI FSM system: idle → wander → feed → flee → attack
- Metabolism: energy drain, feeding from resources, starvation damage
- Life cycle: egg → youth → mature → aging → natural death
- Population dynamics: counting, reproduction, initial spawning
- Species registry with numeric/string ID lookup
- 51 tests passing (272 total)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 14:13:26 +03:00
Денис Шкабатур
7e46d1ed1d feat: HUD overlay via UIScene — health bar, quick slots, inventory info (Phase 4.7)
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>
2026-02-12 13:36:42 +03:00
Денис Шкабатур
d173ada466 feat: quick slots with 1-4 hotkeys (Phase 4.6)
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>
2026-02-12 13:31:12 +03:00
Денис Шкабатур
0396170303 feat: projectile system for throwing elements (Phase 4.5)
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>
2026-02-12 13:29:38 +03:00
Денис Шкабатур
b097ce738f feat: crafting system with chemistry engine integration (Phase 4.4)
craftFromInventory checks reagent availability, runs ReactionEngine,
consumes reagents on success, adds products. Failed attempts return
educational reasons (noble gas inertness, missing conditions, etc.).
11 new tests (185 total).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 13:27:22 +03:00
Денис Шкабатур
e77b9df6e4 feat: resource collection with E-key interaction (Phase 4.3)
Mineral veins yield metals (Fe, Cu, Zn, Au, Sn), geysers yield S/H.
Resources spawn as ECS entities with gold/orange dot sprites on tiles.
E-key collects nearest resource in range into inventory. Resources
deplete after collection. Visual feedback text. 12 new tests (174 total).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 13:25:35 +03:00
Денис Шкабатур
cf36c0adce feat: weight-based inventory with element stacking (Phase 4.2)
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>
2026-02-12 13:11:20 +03:00
Денис Шкабатур
0c0635c93b feat: player entity with WASD movement, tile collision, camera follow (Phase 4.1)
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>
2026-02-12 13:09:01 +03:00
Денис Шкабатур
c4993e9eee Update workflow: screenshots go to screenshots/ dir
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 12:50:25 +03:00
Денис Шкабатур
f5898d30f7 Add screenshots/ and .playwright-mcp/ to gitignore
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>
2026-02-12 12:50:13 +03:00
Денис Шкабатур
5b26820e21 Add mandatory push step to agent workflow rules
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>
2026-02-12 12:49:08 +03:00
Денис Шкабатур
bc472d0f77 Phase 3: World generation — procedural tilemap for Catalytic Wastes
- simplex-noise with seeded PRNG (mulberry32) for deterministic generation
- Biome data: 8 tile types (scorched earth, cracked ground, ash sand,
  acid pools, acid shallow, crystals, geysers, mineral veins)
- Elevation noise → base terrain; detail noise → geyser/mineral overlays
- Canvas-based tileset with per-pixel brightness variation
- Phaser tilemap with collision on non-walkable tiles
- Camera: WASD movement, mouse wheel zoom (0.5x–3x), world bounds
- Minimap: 160x160 canvas overview with viewport indicator
- 21 world generation tests passing (95 total)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 12:47:21 +03:00
Денис Шкабатур
ddbca12740 Phase 2: ECS foundation — world, components, systems, bridge
- 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>
2026-02-12 12:34:06 +03:00
Денис Шкабатур
58ebb11747 Update agent workflow: strict TDD order + commit after every step
Tests first → data structures → implementation → verify → commit

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 12:20:56 +03:00
Денис Шкабатур
7aabb8b4fc Phase 1: Chemistry engine — elements, compounds, reactions
- 20 real elements from periodic table (H through Hg) with accurate data
- 25 compounds with game effects (NaCl, H₂O, gunpowder, thermite, etc.)
- 34 reactions: synthesis, combustion, acid-base, redox, decomposition
- Reaction engine with O(1) lookup by sorted reactant key
- Educational failure reasons (noble gas, missing heat/catalyst, wrong proportions)
- Condition system: temperature, catalyst, energy requirements
- 35 unit tests passing, TypeScript strict, zero errors

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 12:16:08 +03:00
Денис Шкабатур
10bd67c951 Phase 0: Project setup for agent-driven development
- Phaser 3 + bitECS 0.4 + TypeScript + Vite stack
- BootScene with title screen
- 6 cursor rules (project context, agent workflow, ECS, chemistry, Phaser, data)
- Vitest configured with happy-dom
- GDD, engine analysis, implementation plan, progress tracking

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 11:59:41 +03:00