Files
novafarma/docs/PHASE28_SESSIONS_4_5_6_PLAN.md
NovaFarma Dev f3987cbee9 FINALNI BATCH - Vse spremembe shranjene
Zadnji batch danes vključuje:

1. TASKS.md - Phase 28 update
2. GameScene.js - Biome init popravki
3. Flat2DTerrainSystem.js - Debug logi + zaščite
4. DNEVNI_REPORT_2025-12-15.md - Complete daily summary
5. PHASE28_SESSIONS_4_5_6_PLAN.md - Future sessions plan

Status:
- Part 3: 100%
- Phase 28 Sessions 1-3: 100%
- Sessions 4-6: Načrtovano

Vse commitano in pripravljeno!
2025-12-15 17:41:36 +01:00

280 lines
5.5 KiB
Markdown

# 🗺️ PHASE 28 - Sessions 4-6 Implementation Plan
**Datum:** 15.12.2025
**Status:** NAČRTOVANO za naslednjo sejo
---
## 📋 **PREGLED:**
**Session 3:** Debug & fixes (v teku)
**Session 4:** Biome transitions ⏭️
**Session 5:** Rivers & lakes ⏭️
**Session 6:** Structures & polish ⏭️
---
## 🎯 **SESSION 4: BIOME TRANSITIONS** (1-2h)
**Cilj:** Gladki prehodi med biomi
### **Naloge:**
**1. Transition Zones (45 min)**
- Določi transition širino (20-30 tiles)
- Implementiraj blend algoritm
- Mešaj tile barve med biomi
- Test na vseh biome mejah
**2. Mixed Features (30 min)**
- V transition zones mešaj funkcije
- 50% grassland trees + 50% forest trees
- Postopno spreminjanje gostote
- Naravni izgled
**3. Edge Smoothing (15 min)**
- Soft edges namesto sharp
- Perlin noise za naravne meje
- Variacija v transition širini
**Deliverables:**
- TransitionSystem.js (~150 linij)
- Gladki prehodi med vsemi biomi
- Testiran na vseh kombinacijah
---
## 🌊 **SESSION 5: RIVERS & LAKES** (2-3h)
**Cilj:** Naravne vodne formacije
### **Naloge:**
**1. River Generation (1h)**
- River pathfinding algoritm
- Start points (mountains)
- Flow to edges ali lakes
- Serpentine curves (ne ravne linije)
- Width variacija (2-5 tiles)
**2. Lake Creation (45 min)**
- Lake placement algoritem
- Organic shapes (ne krogi!)
- Size variacija (15-30 tiles)
- Povezava z rekami
- Shoreline tiles
**3. Water Features (30 min)**
- Waterfalls (če river po mountain)
- Rapids (hitrejša voda)
- Calm water (v lakes)
- Water plants (lily pads, reeds)
**Deliverables:**
- RiverSystem.js (~200 linij)
- LakeSystem.js (~150 linij)
- 5-10 rivers
- 3-5 lakes
- Natural water flow
---
## 🏛️ **SESSION 6: STRUCTURES & POLISH** (2-3h)
**Cilj:** Zanimivi objekti in končna kvaliteta
### **Naloge:**
**1. Roads (45 min)**
- Main roads med biomi
- Dirt paths v forests
- Stone paths v mountains
- Connect key points
- PathfindingRoads algoritm
**2. Structures (1h)**
- Abandoned buildings (5-7)
- Ruins v various biomes
- Watchtowers (2-3)
- Bridges (over rivers)
- Camps (1-2)
- Size: 3x3 to 7x7 tiles
**3. Landmarks (30 min)**
- Special unique locations
- Mountain peaks (flags/markers)
- Ancient trees
- Stone circles
- View points
**4. Final Polish (45 min)**
- Remove debug borders
- Performance optimization
- Visual consistency check
- Minimap update
- Documentation
**Deliverables:**
- StructureSystem.js (~300 linij)
- 10+ structures placed
- Roads implemented
- Landmarks added
- Everything polished
---
## 📊 **TEHNIČNE SPECIFIKACIJE:**
### **Session 4: Transitions**
**Transition Algorithm:**
```javascript
function getTransitionBlend(x, y) {
const biome1 = getBiomeAt(x, y);
const nearbyBiomes = getBiomesInRadius(x, y, 20);
if (nearbyBiomes.length > 1) {
// Calculate blend weights
const weights = calculateDistanceWeights(x, y, nearbyBiomes);
return mixBiomes(weights);
}
return biome1;
}
```
### **Session 5: Rivers**
**River Generation:**
```javascript
function generateRiver(startX, startY) {
let current = { x: startX, y: startY };
const path = [current];
while (!isEdgeOrLake(current)) {
const next = flowDownhill(current);
path.push(next);
current = next;
}
return createRiverFromPath(path);
}
```
### **Session 6: Structures**
**Structure Placement:**
```javascript
function placeStructures() {
const candidates = findSuitableLocations();
const selected = selectBestLocations(candidates, minDistance: 50);
selected.forEach(loc => {
const structure = chooseStructureForBiome(loc.biome);
placeStructure(loc.x, loc.y, structure);
});
}
```
---
## 🎨 **VIZUALNI CILJI:**
**Session 4:**
- Biome meje izgledajo naravno
- Ni očitnih "linij" med biomi
- Postopne spremembe
**Session 5:**
- Reke izgledajo naravno
- Jezera imajo organic shapes
- Vode connectivity makes sense
**Session 6:**
- Svet izgleda živ in populated
- Structures so smiselno postavljene
- Roads povezujejo pomembne točke
---
## ⏱️ **ČASOVNICA:**
| Session | Naloge | Čas | Prioriteta |
|---------|--------|-----|------------|
| 4 | Transitions | 1-2h | HIGH |
| 5 | Rivers/Lakes | 2-3h | MEDIUM |
| 6 | Structures | 2-3h | MEDIUM |
| **TOTAL** | | **5-8h** | |
---
## ✅ **SUCCESS CRITERIA:**
**Session 4:**
- [ ] Vsi biome prehodi gladki
- [ ] Ni sharp edges
- [ ] Naravni izgled
- [ ] 60 FPS maintained
**Session 5:**
- [ ] 5+ rivers generated
- [ ] 3+ lakes created
- [ ] Natural water flow
- [ ] Shorelines smooth
**Session 6:**
- [ ] 10+ structures placed
- [ ] Roads connect biomes
- [ ] Landmarks visible
- [ ] No debug artifacts
- [ ] Performance good
---
## 🔧 **TOOLS NEEDED:**
**Session 4:**
- Perlin noise for transitions
- Distance calculation utilities
- Color blending functions
**Session 5:**
- Pathfinding algorithm
- Terrain height map (simple)
- Water flow simulation
**Session 6:**
- Structure templates (JSON)
- Placement validation
- Collision detection
---
## 📝 **DOKUMENTACIJA:**
Po vsakem session-u:
- Update session log
- Commit changes
- Update main roadmap
- Screenshot examples
---
## 🎯 **KONČNI REZULTAT:**
Po Session 6 bi morali imeti:
- ✅ 500x500 fully functional world
- ✅ 5 distinct biomes
- ✅ Smooth transitions
- ✅ Rivers & lakes
- ✅ Structures & landmarks
- ✅ Roads connecting everything
- ✅ 60 FPS performance
- ✅ Professional quality
**Phase 28 bo 100% complete!** 🎊
---
**Ready for Session 4 when you are!** 🚀