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>
This commit is contained in:
Денис Шкабатур
2026-02-12 12:47:21 +03:00
parent ddbca12740
commit bc472d0f77
12 changed files with 749 additions and 62 deletions

View File

@@ -1,7 +1,7 @@
# Synthesis — Development Progress
> **Last updated:** 2026-02-12
> **Current phase:** Phase 2 ✅ → Ready for Phase 3
> **Current phase:** Phase 3 ✅ → Ready for Phase 4
---
@@ -38,23 +38,33 @@
- [x] 2.7 Visual test — 20 colored circles bouncing at 60fps, GameScene (`src/scenes/GameScene.ts`)
- [x] Unit tests — 39 passing (`tests/ecs.test.ts`)
### Phase 3: World Generation ✅
- [x] 3.1 Tilemap system — canvas tileset with per-pixel variation + Phaser tilemap (`src/world/tilemap.ts`)
- [x] 3.2 Biome data — Catalytic Wastes: 8 tile types (`src/data/biomes.json`)
- [x] 3.3 Noise generation — simplex-noise, seeded PRNG (mulberry32), deterministic (`src/world/noise.ts`)
- [x] 3.4 World generator — elevation noise → base terrain, detail noise → overlays (`src/world/generator.ts`)
- [x] 3.5 Resource placement — geysers on acid-shallow zones, mineral veins on ground (`src/world/generator.ts`)
- [x] 3.6 Camera — WASD movement, mouse wheel zoom (0.5x3x), bounds clamping (`src/world/camera.ts`)
- [x] 3.7 Minimap — canvas-based 160x160 overview, viewport indicator, border (`src/world/minimap.ts`)
- [x] Unit tests — 21 passing (`tests/world.test.ts`)
---
## In Progress
_None — ready to begin Phase 3_
_None — ready to begin Phase 4_
---
## Up Next: Phase 3World Generation
## Up Next: Phase 4Player Systems
- [ ] 3.1 Tilemap system (Phaser Tilemap from data-driven tile definitions)
- [ ] 3.2 Biome data (`biomes.json` — Catalytic Wastes)
- [ ] 3.3 Noise generation (simplex-noise, seed-based)
- [ ] 3.4 Tile types (scorched earth, acid pools, crystal formations, geysers, mineral veins)
- [ ] 3.5 Resource placement (ores/minerals based on biome params + noise)
- [ ] 3.6 Camera (follow player, zoom, clamp to map bounds)
- [ ] 3.7 Minimap
- [ ] 4.1 Player entity + WASD controller
- [ ] 4.2 Inventory (weight-based, element stacking)
- [ ] 4.3 Element collection from world objects
- [ ] 4.4 Crafting (chemistry engine integration)
- [ ] 4.5 Projectile system (throw elements/compounds)
- [ ] 4.6 Quick slots (1-2-3-4 hotkeys)
- [ ] 4.7 HUD (UIScene: health ring, inventory bar, element info)
---
@@ -71,3 +81,4 @@ None
| 1 | 2026-02-12 | Phase 0 | Project setup: GDD, engine analysis, npm init, Phaser config, BootScene, cursor rules, plan |
| 2 | 2026-02-12 | Phase 1 | Chemistry engine: 20 elements, 25 compounds, 34 reactions, engine with O(1) lookup + educational failures, 35 tests passing |
| 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) |