From 22e6c6bcee2880b7a7f709c6f975215df4758fad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81=20=D0=A8=D0=BA=D0=B0=D0=B1?= =?UTF-8?q?=D0=B0=D1=82=D1=83=D1=80?= Date: Thu, 12 Feb 2026 14:21:35 +0300 Subject: [PATCH] =?UTF-8?q?chore:=20complete=20Phase=205=20=E2=80=94=20upd?= =?UTF-8?q?ate=20version,=20progress,=20and=20plan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- IMPLEMENTATION-PLAN.md | 2 +- PROGRESS.md | 21 ++++++++++++++++++--- src/scenes/BootScene.ts | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/IMPLEMENTATION-PLAN.md b/IMPLEMENTATION-PLAN.md index 647bdce..4ebc173 100644 --- a/IMPLEMENTATION-PLAN.md +++ b/IMPLEMENTATION-PLAN.md @@ -122,7 +122,7 @@ --- -## Phase 5: Creatures & Ecology +## Phase 5: Creatures & Ecology ✅ **Цель:** Живая экосистема в Каталитических Пустошах **Зависимости:** Phase 2, Phase 3 diff --git a/PROGRESS.md b/PROGRESS.md index 9e11541..d193380 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -1,7 +1,7 @@ # Synthesis — Development Progress > **Last updated:** 2026-02-12 -> **Current phase:** Phase 4 ✅ → Ready for Phase 5 +> **Current phase:** Phase 5 ✅ → Ready for Phase 6 --- @@ -58,15 +58,29 @@ - [x] 4.7 HUD — UIScene overlay: health bar, quick slots, inventory info, controls hint (`src/scenes/UIScene.ts`) - [x] Unit tests — 39 player + 28 inventory + 12 interaction + 11 crafting + 13 projectile + 15 quickslots + 8 UI = 126 tests (222 total) +### Phase 5: Creatures & Ecology ✅ +- [x] 5.1 Creature data — 3 species: Crystallids, Acidophiles, Reagents (`src/data/creatures.json`) +- [x] 5.2 AI behavior — FSM: idle → wander → feed → flee → attack (`src/creatures/ai.ts`) +- [x] 5.3 Metabolism — energy drain, feeding from resources, starvation damage (`src/creatures/metabolism.ts`) +- [x] 5.4 Population dynamics — counting, reproduction, initial spawning (`src/creatures/population.ts`) +- [x] 5.5 Life cycle — egg → youth → mature → aging → natural death (`src/creatures/lifecycle.ts`) +- [x] 5.6 Interaction — projectile collision (armor), observation, creature→player melee (`src/creatures/interaction.ts`) +- [x] 5.7 Ecosystem test — populations fluctuate, don't die out (`tests/ecosystem.test.ts`) +- [x] 5.8 GameScene integration — all creature systems in update loop, debug overlay +- [x] ECS components: Creature, AI, Metabolism, LifeCycle (`src/ecs/components.ts`) +- [x] Species registry with string/numeric ID lookup (`src/creatures/types.ts`) +- [x] Creature factory (`src/creatures/factory.ts`) +- [x] Unit tests — 51 creature + 16 interaction + 5 ecosystem = 72 tests (293 total) + --- ## In Progress -_None — ready to begin Phase 5_ +_None — ready to begin Phase 6_ --- -## Up Next: Phase 5 — Creatures & AI +## Up Next: Phase 6 — Run Cycle _(See IMPLEMENTATION-PLAN.md for details)_ @@ -87,3 +101,4 @@ None | 3 | 2026-02-12 | Phase 2 | ECS foundation: world + time, 5 components, movement + bounce + health systems, Phaser bridge (polling sync), entity factory, GameScene with 20 bouncing circles at 60fps, 39 tests passing | | 4 | 2026-02-12 | Phase 3 | World generation: simplex noise (seeded), 80x80 tilemap with 8 tile types, Catalytic Wastes biome, camera WASD+zoom, minimap with viewport indicator, 21 tests passing (95 total) | | 5 | 2026-02-12 | Phase 4 | Player systems: WASD movement + tile collision, weight-based inventory, resource collection, crafting via chemistry engine, projectile throw, 4 quick slots, UIScene HUD overlay (health bar, slots, inventory), 126 new tests (222 total) | +| 6 | 2026-02-12 | Phase 5 | Creatures & Ecology: 3 species (Crystallid/Acidophile/Reagent), FSM AI (idle/wander/feed/flee/attack), metabolism (energy drain/feeding/starvation), life cycle (egg→youth→mature→aging→death), population dynamics, projectile-creature collision with armor, creature→player melee, ecosystem simulation test, 72 new tests (293 total) | diff --git a/src/scenes/BootScene.ts b/src/scenes/BootScene.ts index 3e59f18..00a78a0 100644 --- a/src/scenes/BootScene.ts +++ b/src/scenes/BootScene.ts @@ -30,7 +30,7 @@ export class BootScene extends Phaser.Scene { // Version this.add - .text(cx, cy + 80, 'v0.4.0 — Phase 4: Player Systems', { + .text(cx, cy + 80, 'v0.5.0 — Phase 5: Creatures & Ecology', { fontSize: '12px', color: '#333333', fontFamily: 'monospace',