\ Phase 28 Session 5: Rivers & Lakes Complete - RiverSystem + LakeSystem with biome-aware water rendering"
This commit is contained in:
125
docs/PHASE28_SESSION5_PLAN.md
Normal file
125
docs/PHASE28_SESSION5_PLAN.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# 🌊 PHASE 28 - SESSION 5: RIVERS & LAKES
|
||||
|
||||
**Date:** 15.12.2025 19:20
|
||||
**Duration:** 2-3 hours (estimated)
|
||||
**Status:** 🚀 READY TO START
|
||||
|
||||
---
|
||||
|
||||
## 🎯 **SESSION OBJECTIVES:**
|
||||
|
||||
1. **River System** - Flowing water across biomes
|
||||
2. **Lake System** - Natural water bodies
|
||||
3. **Water Features** - Springs, waterfalls, ponds
|
||||
4. **Visual Polish** - Animated water, reflections
|
||||
|
||||
---
|
||||
|
||||
## 📋 **IMPLEMENTATION PLAN:**
|
||||
|
||||
### **Part 1: River System** (60 min)
|
||||
- Create `RiverSystem.js`
|
||||
- River path generation (noise-based curves)
|
||||
- River width variation (2-6 tiles)
|
||||
- Cross-biome routing
|
||||
- River bed tiles (darker water)
|
||||
|
||||
### **Part 2: Lake System** (45 min)
|
||||
- Lake generation in `BiomeSystem`
|
||||
- Lake hotspots per biome
|
||||
- Lake size variation (5x5 to 20x20)
|
||||
- Lake shorelines (gradual depth)
|
||||
- Connect lakes to rivers
|
||||
|
||||
### **Part 3: Water Features** (30 min)
|
||||
- Water springs (source points)
|
||||
- Small ponds (1x1 to 3x3)
|
||||
- Waterfalls in mountains
|
||||
- Delta where rivers meet lakes
|
||||
|
||||
### **Part 4: Integration** (15 min)
|
||||
- Add to chunk rendering
|
||||
- Update terrain textures
|
||||
- Biome-specific water colors
|
||||
- Performance optimization
|
||||
|
||||
---
|
||||
|
||||
## 🎨 **WATER COLOR PALETTE:**
|
||||
|
||||
| Feature | Color | Alpha | Biome |
|
||||
|---------|-------|-------|-------|
|
||||
| River | `#1E90FF` | 0.8 | All |
|
||||
| Lake | `#4682B4` | 0.85 | All |
|
||||
| River (Forest) | `#2a5f4f` | 0.7 | Forest |
|
||||
| Lake (Swamp) | `#3d5a3d` | 0.6 | Swamp |
|
||||
| Pond | `#87CEEB` | 0.7 | Grassland |
|
||||
| Waterfall | `#ffffff` | 0.9 | Mountain |
|
||||
|
||||
---
|
||||
|
||||
## 🧮 **RIVER GENERATION ALGORITHM:**
|
||||
|
||||
```javascript
|
||||
// 1. Pick 2-4 river sources (springs in mountains)
|
||||
// 2. Generate river path using Perlin noise curves
|
||||
// 3. Flow downhill (prefer lower terrain)
|
||||
// 4. Rivers join (confluence points)
|
||||
// 5. Rivers end in lakes or edge
|
||||
// 6. Add river width variation
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🏞️ **LAKE GENERATION:**
|
||||
|
||||
```javascript
|
||||
// 1. Define lake centers (1-3 per biome type)
|
||||
// 2. Generate organic shapes (circle + noise)
|
||||
// 3. Add depth variation (darker center)
|
||||
// 4. Create shoreline (gradient tiles)
|
||||
// 5. Connect to nearest river
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 **EXPECTED RESULTS:**
|
||||
|
||||
✅ 2-4 major rivers crossing the map
|
||||
✅ 5-8 lakes distributed across biomes
|
||||
✅ 10-15 small ponds in grasslands
|
||||
✅ 2-3 waterfalls in mountains
|
||||
✅ Water flows logically (high to low)
|
||||
✅ Animated water (ripple effect)
|
||||
✅ Performance maintained (60 FPS)
|
||||
|
||||
---
|
||||
|
||||
## 🔍 **TESTING CHECKLIST:**
|
||||
|
||||
- [ ] Rivers visible on map
|
||||
- [ ] Lakes in correct biomes
|
||||
- [ ] Water has distinct color
|
||||
- [ ] Rivers connect logically
|
||||
- [ ] No water in deserts (unless oasis)
|
||||
- [ ] Swamp has most water features
|
||||
- [ ] Mountain rivers flow downhill
|
||||
- [ ] Performance stable
|
||||
|
||||
---
|
||||
|
||||
## 🚀 **DELIVERABLES:**
|
||||
|
||||
1. `src/systems/RiverSystem.js` (250 lines)
|
||||
2. `src/systems/LakeSystem.js` (200 lines)
|
||||
3. Updated `BiomeSystem.js` (+50 lines)
|
||||
4. Updated `Flat2DTerrainSystem.js` (+100 lines)
|
||||
5. `docs/PHASE28_SESSION5_LOG.md`
|
||||
6. Git commit
|
||||
|
||||
---
|
||||
|
||||
**Ready to implement!** 🌊💧
|
||||
|
||||
**Start Time:** TBD
|
||||
**Status:** PLAN COMPLETE
|
||||
Reference in New Issue
Block a user