FAZA 17: 2.5D Minecraft-Style Terrain + Y-Layer Stacking + Custom Sprites
COMPLETED FEATURES: Custom Sprite Integration: - Player, Zombie, Merchant sprites (0.2 scale) - 11 custom sprites + 5 asset packs loaded - Auto-transparency processing (white/brown removal) - Gravestone system with atlas extraction 2.5D Minecraft-Style Terrain: - Volumetric blocks with 25px thickness - Strong left/right side shading (30%/50% darker) - Minecraft-style texture patterns (grass, dirt, stone) - Crisp black outlines for definition Y-Layer Stacking System: - GRASS_FULL: All green (elevation > 0.7) - GRASS_TOP: Green top + brown sides (elevation 0.4-0.7) - DIRT: All brown (elevation < 0.4) - Dynamic terrain depth based on height Floating Island World Edge: - Stone cliff walls at map borders - 2-tile transition zone - Elevation flattening for cliff drop-off effect - 100x100 world with defined boundaries Performance & Polish: - Canvas renderer for pixel-perfect sharpness - CSS image-rendering: crisp-edges - willReadFrequently optimization - No Canvas2D warnings Technical: - 3D volumetric trees and rocks - Hybrid rendering (2.5D terrain + 2D characters) - Procedural texture generation - Y-layer aware terrain type selection
This commit is contained in:
379
FAZA_15_CHECKLIST.md
Normal file
379
FAZA_15_CHECKLIST.md
Normal file
@@ -0,0 +1,379 @@
|
||||
# FAZA 15-17 + Custom Assets + 2.5D Terrain: Advanced Systems - Checklist
|
||||
|
||||
**Status:** ✅ ZAKLJUČENO
|
||||
|
||||
**Datum:** 2025-12-06/07
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Cilji
|
||||
- **FAZA 15:** Ekonomija (Trading, Gold, Materials)
|
||||
- **FAZA 16:** Weather & Open World (Rain, Fog, Hills)
|
||||
- **FAZA 17:** Sound, Parallax, Friendship
|
||||
- **BONUS:** Custom Sprite Integration
|
||||
- **BONUS:** 2.5D Minecraft-Style Terrain
|
||||
|
||||
## ✅ Opravila (Developer)
|
||||
|
||||
### FAZA 15: Economy
|
||||
- [x] **Trgovanje (Trading System):**
|
||||
- [x] Interakcija s Trgovcem odpre `TradeMenu`
|
||||
- [x] Seznam predmetov za nakup/prodajo
|
||||
- [x] Gold/Currency sistem
|
||||
- [x] **Town Restoration:**
|
||||
- [x] Multiple material requirements (Wood, Stone, Gold)
|
||||
- [x] Different ruin types with different costs
|
||||
- [x] Friendship/Hearts system (❤️)
|
||||
- [x] User feedback messages
|
||||
|
||||
### FAZA 16: Weather & World
|
||||
- [x] **Weather System:**
|
||||
- [x] Rain effect (100-150 droplets)
|
||||
- [x] Fog effect (gray overlay)
|
||||
- [x] Storm (heavy rain)
|
||||
- [x] Automatic weather cycling (30s)
|
||||
- [x] **Terrain Enhancement:**
|
||||
- [x] Elevation/Hills sistem (Perlin Noise)
|
||||
- [x] Height-based grass tinting (light = hills, dark = valleys)
|
||||
- [x] Y-offset based on elevation (-25px max)
|
||||
- [x] More rocks/bushes on hills
|
||||
|
||||
### FAZA 17: Polish
|
||||
- [x] **Sound System:**
|
||||
- [x] SoundManager class
|
||||
- [x] Placeholder beep sounds (chop, pickup, plant, harvest, build)
|
||||
- [x] Rain ambient sounds
|
||||
- [x] Mute toggle (M key)
|
||||
- [x] **Parallax Layers:**
|
||||
- [x] Layer 1: Sky + Distant Hills (0.2x scroll)
|
||||
- [x] Layer 2: Far Trees (0.7x scroll)
|
||||
- [x] Layer 3: Game objects (1.0x normal)
|
||||
- [x] Layer 4: Foreground grass (1.05x scroll)
|
||||
- [x] Smart fading (grass becomes transparent near player)
|
||||
- [x] **Camera:**
|
||||
- [x] Viewport: 640x360 (pixel-perfect)
|
||||
- [x] Instant follow (1.0 speed)
|
||||
- [x] 100px deadzone
|
||||
- [x] Round pixels enabled
|
||||
- [x] **Day/Night Cycle:**
|
||||
- [x] Dynamic lighting overlays
|
||||
- [x] Dawn, Day, Dusk, Night phases
|
||||
- [x] Color tinting based on time
|
||||
|
||||
### BONUS: Custom Sprite Integration
|
||||
- [x] **Character Sprites:**
|
||||
- [x] Player custom sprite (protagonist with dreadlocks)
|
||||
- [x] Zombie custom sprite (green skin, red eyes)
|
||||
- [x] Merchant custom sprite (wizard with gold coin)
|
||||
- [x] All characters scaled to 0.2 (20% size)
|
||||
- [x] **Environment Assets:**
|
||||
- [x] Custom tree sprite (blue tree)
|
||||
- [x] Custom stone/rock sprite
|
||||
- [x] Custom grass tile texture
|
||||
- [x] Wheat sprite
|
||||
- [x] Leaf sprite
|
||||
- [x] **Asset Packs Loaded:**
|
||||
- [x] objects_pack.png (furniture, barrels, gravestones)
|
||||
- [x] walls_pack.png (walls, arches)
|
||||
- [x] ground_tiles.png (terrain textures)
|
||||
- [x] objects_pack2.png (additional objects)
|
||||
- [x] trees_vegetation.png (trees, bushes)
|
||||
- [x] **Gravestone System:**
|
||||
- [x] Extract gravestone from objects_pack atlas
|
||||
- [x] Random spawning (0.5% chance on grass)
|
||||
- [x] 10 HP (harder to destroy)
|
||||
- [x] Zombie post-apocalyptic atmosphere
|
||||
- [x] **Transparency Processing:**
|
||||
- [x] Auto-remove white/gray backgrounds
|
||||
- [x] Auto-remove brown backgrounds (merchant)
|
||||
- [x] Canvas willReadFrequently optimization
|
||||
- [x] **Performance Fixes:**
|
||||
- [x] Fixed Canvas2D warnings (willReadFrequently: true)
|
||||
- [x] Electron CSP already configured
|
||||
|
||||
### BONUS: 2.5D Minecraft-Style Terrain ⛏️
|
||||
- [x] **Volumetric Blocks:**
|
||||
- [x] Block thickness: 25px (2.5x thicker than before)
|
||||
- [x] Left side shading: 30% darker
|
||||
- [x] Right side shading: 50% darker (strong shadow)
|
||||
- [x] Crisp black outlines for definition
|
||||
- [x] **Grass Blocks:**
|
||||
- [x] Green top surface
|
||||
- [x] Brown (dirt) side faces
|
||||
- [x] Authentic Minecraft aesthetic
|
||||
- [x] **Rendering:**
|
||||
- [x] Canvas renderer for pixel-perfect sharpness
|
||||
- [x] CSS image-rendering: crisp-edges / pixelated
|
||||
- [x] No antialiasing
|
||||
- [x] Round pixels enabled
|
||||
- [x] **Hybrid Style:**
|
||||
- [x] Terrain = 2.5D volumetric (Minecraft-like)
|
||||
- [x] Characters = 2D flat sprites (pixel art)
|
||||
- [x] Objects = 2D flat sprites (pixel art)
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Ročno testiranje (Naročnik)
|
||||
|
||||
### Test 1: 2.5D Terrain **⛏️ NOVO**
|
||||
**Ukaz:** Pritisni F4, opazuj teren.
|
||||
**Rezultat:**
|
||||
- Grass bloki imajo zeleno površino + rjave stranice
|
||||
- Bloki so debeli (25px thickness)
|
||||
- Močno senčenje na straneh (Minecraft-like)
|
||||
- Vse ostalo (karakterji, drevesa) je 2D flat
|
||||
|
||||
### Test 2: Pixel-Perfect Ostrino **⛏️ NOVO**
|
||||
**Ukaz:** Pritisni F4, zoom-aj v karakterje.
|
||||
**Rezultat:**
|
||||
- Vsak pixel je oster in jasen
|
||||
- Ni zamegljenih robov
|
||||
- Crisp pixel art aesthetic
|
||||
|
||||
### Test 3: Custom Sprites
|
||||
**Ukaz:** Pritisni F4 (Soft Reset).
|
||||
**Rezultat:**
|
||||
- Player = Custom protagonist sprite (20% velikosti)
|
||||
- Zombie = Custom zombie sprite (20% velikosti)
|
||||
- Merchant = Custom merchant sprite (20% velikosti)
|
||||
- Drevesa = Modro drevo sprite
|
||||
- Kamenje = Custom rock sprite
|
||||
- Travniki = Custom grass texture
|
||||
|
||||
### Test 4: Gravestone Spawning
|
||||
**Ukaz:** Premakni se po zemljevidu, išči nagrobike.
|
||||
**Rezultat:** Redki nagrobniki (💀) na travniku, težje uničiti (10 HP).
|
||||
|
||||
### Test 5: Transparency
|
||||
**Ukaz:** Opazuj vse sprite.
|
||||
**Rezultat:** Brez belega/rjavega ozadja, popolna transparentnost.
|
||||
|
||||
### Test 6: Performance
|
||||
**Ukaz:** Odpri F12 Console.
|
||||
**Rezultat:** Ni več Canvas2D warnings.
|
||||
|
||||
### Test 7: Town Restoration
|
||||
**Ukaz:** Dodaj materials v inventory (F12 console):
|
||||
```js
|
||||
this.scene.inventorySystem.addItem('wood', 200);
|
||||
this.scene.inventorySystem.addItem('stone', 100);
|
||||
this.scene.inventorySystem.addItem('gold', 100);
|
||||
```
|
||||
Klikni na ruin, klikni "Contribute".
|
||||
**Rezultat:** Ruin postane House, spawne NPC, +10 Hearts ❤️
|
||||
|
||||
### Test 8: Weather
|
||||
**Ukaz:** Počakaj 30s v igri.
|
||||
**Rezultat:** Vreme se spremeni (dež/megla/jasno)
|
||||
|
||||
### Test 9: Sound
|
||||
**Ukaz:** Sekaj drevo, poberi loot.
|
||||
**Rezultat:** Placeholder beep zvoki. M = mute/unmute.
|
||||
|
||||
---
|
||||
|
||||
## 📋 Potrditev Naročnika
|
||||
|
||||
```
|
||||
FAZA 15-17 + Custom Assets + 2.5D: [STATUS]
|
||||
- Testirano: [DA/NE]
|
||||
- Datum testiranja: ___________
|
||||
- Opombe:
|
||||
|
||||
ODOBRENO ZA NASLEDNJO FAZO: [DA/NE]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ➡️ Naslednji koraki
|
||||
|
||||
**FAZA 18:** Combat System (Attack, Damage, Zombie AI)
|
||||
**FAZA 19:** Quest System (Tasks, Objectives, Rewards)
|
||||
**FAZA 20:** Building System (Use asset packs for construction)
|
||||
**FAZA 21:** Final Polish & Optimization
|
||||
|
||||
---
|
||||
|
||||
## 📊 Tehnični Pregled
|
||||
|
||||
**Rendering:**
|
||||
- Canvas renderer (pixel-perfect)
|
||||
- 640x360 viewport
|
||||
- CSS crisp-edges
|
||||
- No antialiasing
|
||||
|
||||
**Terrain:**
|
||||
- 2.5D isometric blocks
|
||||
- 25px thickness (Minecraft-style)
|
||||
- Procedural generation (Perlin Noise)
|
||||
- Custom grass tiles support
|
||||
|
||||
**Characters:**
|
||||
- 2D flat sprites
|
||||
- 0.2 scale (20% size)
|
||||
- Custom sprite support
|
||||
- Auto-transparency processing
|
||||
|
||||
**Assets:**
|
||||
- 11 custom sprites loaded
|
||||
- 5 asset packs (objects, walls, tiles, vegetation)
|
||||
- Gravestone extraction system
|
||||
- Sprite atlas support
|
||||
|
||||
**Performance:**
|
||||
- Canvas willReadFrequently optimization
|
||||
- Object pooling (tiles, decorations, crops)
|
||||
- Frustum culling
|
||||
- No memory leaks
|
||||
|
||||
## ✅ Opravila (Developer)
|
||||
|
||||
### FAZA 15: Economy
|
||||
- [x] **Trgovanje (Trading System):**
|
||||
- [x] Interakcija s Trgovcem odpre `TradeMenu`
|
||||
- [x] Seznam predmetov za nakup/prodajo
|
||||
- [x] Gold/Currency sistem
|
||||
- [x] **Town Restoration:**
|
||||
- [x] Multiple material requirements (Wood, Stone, Gold)
|
||||
- [x] Different ruin types with different costs
|
||||
- [x] Friendship/Hearts system (❤️)
|
||||
- [x] User feedback messages
|
||||
|
||||
### FAZA 16: Weather & World
|
||||
- [x] **Weather System:**
|
||||
- [x] Rain effect (100-150 droplets)
|
||||
- [x] Fog effect (gray overlay)
|
||||
- [x] Storm (heavy rain)
|
||||
- [x] Automatic weather cycling (30s)
|
||||
- [x] **Terrain Enhancement:**
|
||||
- [x] Elevation/Hills sistem (Perlin Noise)
|
||||
- [x] Height-based grass tinting (light = hills, dark = valleys)
|
||||
- [x] Y-offset based on elevation (-25px max)
|
||||
- [x] More rocks/bushes on hills
|
||||
|
||||
### FAZA 17: Polish
|
||||
- [x] **Sound System:**
|
||||
- [x] SoundManager class
|
||||
- [x] Placeholder beep sounds (chop, pickup, plant, harvest, build)
|
||||
- [x] Rain ambient sounds
|
||||
- [x] Mute toggle (M key)
|
||||
- [x] **Parallax Layers:**
|
||||
- [x] Layer 1: Sky + Distant Hills (0.2x scroll)
|
||||
- [x] Layer 2: Far Trees (0.7x scroll)
|
||||
- [x] Layer 3: Game objects (1.0x normal)
|
||||
- [x] Layer 4: Foreground grass (1.05x scroll)
|
||||
- [x] Smart fading (grass becomes transparent near player)
|
||||
- [x] **Camera:**
|
||||
- [x] Viewport: 640x360 (pixel-perfect)
|
||||
- [x] Instant follow (1.0 speed)
|
||||
- [x] 100px deadzone
|
||||
- [x] Round pixels enabled
|
||||
- [x] **Day/Night Cycle:**
|
||||
- [x] Dynamic lighting overlays
|
||||
- [x] Dawn, Day, Dusk, Night phases
|
||||
- [x] Color tinting based on time
|
||||
|
||||
### BONUS: Custom Sprite Integration
|
||||
- [x] **Character Sprites:**
|
||||
- [x] Player custom sprite (protagonist with dreadlocks)
|
||||
- [x] Zombie custom sprite (green skin, red eyes)
|
||||
- [x] Merchant custom sprite (wizard with gold coin)
|
||||
- [x] All characters scaled to 0.2 (20% size)
|
||||
- [x] **Environment Assets:**
|
||||
- [x] Custom tree sprite (blue tree)
|
||||
- [x] Custom stone/rock sprite
|
||||
- [x] Custom grass tile texture
|
||||
- [x] Wheat sprite
|
||||
- [x] Leaf sprite
|
||||
- [x] **Asset Packs Loaded:**
|
||||
- [x] objects_pack.png (furniture, barrels, gravestones)
|
||||
- [x] walls_pack.png (walls, arches)
|
||||
- [x] ground_tiles.png (terrain textures)
|
||||
- [x] objects_pack2.png (additional objects)
|
||||
- [x] trees_vegetation.png (trees, bushes)
|
||||
- [x] **Gravestone System:**
|
||||
- [x] Extract gravestone from objects_pack atlas
|
||||
- [x] Random spawning (0.5% chance on grass)
|
||||
- [x] 10 HP (harder to destroy)
|
||||
- [x] Zombie post-apocalyptic atmosphere
|
||||
- [x] **Transparency Processing:**
|
||||
- [x] Auto-remove white/gray backgrounds
|
||||
- [x] Auto-remove brown backgrounds (merchant)
|
||||
- [x] Canvas willReadFrequently optimization
|
||||
- [x] **Performance Fixes:**
|
||||
- [x] Fixed Canvas2D warnings (willReadFrequently: true)
|
||||
- [x] Electron CSP already configured
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Ročno testiranje (Naročnik)
|
||||
|
||||
### Test 1: Custom Sprites
|
||||
**Ukaz:** Pritisni F4 (Soft Reset).
|
||||
**Rezultat:**
|
||||
- Player = Custom protagonist sprite (20% velikosti)
|
||||
- Zombie = Custom zombie sprite (20% velikosti)
|
||||
- Merchant = Custom merchant sprite (20% velikosti)
|
||||
- Drevesa = Modro drevo sprite
|
||||
- Kamenje = Custom rock sprite
|
||||
- Travn iki = Custom grass texture
|
||||
|
||||
### Test 2: Gravestone Spawning
|
||||
**Ukaz:** Premakni se po zemljevidu, išči nagrobike.
|
||||
**Rezultat:** Redki nagrobniki (💀) na trav niku, težje uničiti (10 HP).
|
||||
|
||||
### Test 3: Transparency
|
||||
**Ukaz:** Opazuj vse sprite.
|
||||
**Rezultat:** Brez belega/rjavega ozadja, popolna transparentnost.
|
||||
|
||||
### Test 4: Performance
|
||||
**Ukaz:** Odpri F12 Console.
|
||||
**Rezultat:** Ni več Canvas2D warnings.
|
||||
|
||||
### Test 5: Town Restoration
|
||||
**Ukaz:** Dodaj materials v inventory (F12 console):
|
||||
```js
|
||||
this.scene.inventorySystem.addItem('wood', 200);
|
||||
this.scene.inventorySystem.addItem('stone', 100);
|
||||
this.scene.inventorySystem.addItem('gold', 100);
|
||||
```
|
||||
Klikni na ruin, klikni "Contribute".
|
||||
**Rezultat:** Ruin postane House, spawne NPC, +10 Hearts ❤️
|
||||
|
||||
### Test 6: Weather
|
||||
**Ukaz:** Počakaj 30s v igri.
|
||||
**Rezultat:** Vreme se spremeni (dež/megla/jasno)
|
||||
|
||||
### Test 7: Sound
|
||||
**Ukaz:** Sekaj drevo, poberi loot.
|
||||
**Rezultat:** Placeholder beep zvoki. M = mute/unmute.
|
||||
|
||||
### Test 8: Parallax
|
||||
**Ukaz:** Premakni igralca okoli.
|
||||
**Rezultat:** Hribi v ozadju se premikajo počasneje, trava v ospredju hitreje.
|
||||
|
||||
### Test 9: Hills
|
||||
**Ukaz:** Opazuj zemljevid.
|
||||
**Rezultat:** Svetlejša trava = hribi, temnejša = doline. Vizualno dvignjeno.
|
||||
|
||||
---
|
||||
|
||||
## 📋 Potrditev Naročnika
|
||||
|
||||
```
|
||||
FAZA 15-17 + Custom Assets: [STATUS]
|
||||
- Testirano: [DA/NE]
|
||||
- Datum testiranja: ___________
|
||||
- Opombe:
|
||||
|
||||
ODOBRENO ZA NASLEDNJO FAZO: [DA/NE]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ➡️ Naslednji koraki
|
||||
|
||||
**FAZA 18:** Combat System (Attack, Damage, Zombie AI)
|
||||
**FAZA 19:** Quest System (Tasks, Objectives, Rewards)
|
||||
**FAZA 20:** Building System (Use asset packs for construction)
|
||||
**FAZA 21:** Final Polish & Optimization
|
||||
Reference in New Issue
Block a user