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
12 KiB
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
- Trgovanje (Trading System):
- Interakcija s Trgovcem odpre
TradeMenu - Seznam predmetov za nakup/prodajo
- Gold/Currency sistem
- Interakcija s Trgovcem odpre
- Town Restoration:
- Multiple material requirements (Wood, Stone, Gold)
- Different ruin types with different costs
- Friendship/Hearts system (❤️)
- User feedback messages
FAZA 16: Weather & World
- Weather System:
- Rain effect (100-150 droplets)
- Fog effect (gray overlay)
- Storm (heavy rain)
- Automatic weather cycling (30s)
- Terrain Enhancement:
- Elevation/Hills sistem (Perlin Noise)
- Height-based grass tinting (light = hills, dark = valleys)
- Y-offset based on elevation (-25px max)
- More rocks/bushes on hills
FAZA 17: Polish
- Sound System:
- SoundManager class
- Placeholder beep sounds (chop, pickup, plant, harvest, build)
- Rain ambient sounds
- Mute toggle (M key)
- Parallax Layers:
- Layer 1: Sky + Distant Hills (0.2x scroll)
- Layer 2: Far Trees (0.7x scroll)
- Layer 3: Game objects (1.0x normal)
- Layer 4: Foreground grass (1.05x scroll)
- Smart fading (grass becomes transparent near player)
- Camera:
- Viewport: 640x360 (pixel-perfect)
- Instant follow (1.0 speed)
- 100px deadzone
- Round pixels enabled
- Day/Night Cycle:
- Dynamic lighting overlays
- Dawn, Day, Dusk, Night phases
- Color tinting based on time
BONUS: Custom Sprite Integration
- Character Sprites:
- Player custom sprite (protagonist with dreadlocks)
- Zombie custom sprite (green skin, red eyes)
- Merchant custom sprite (wizard with gold coin)
- All characters scaled to 0.2 (20% size)
- Environment Assets:
- Custom tree sprite (blue tree)
- Custom stone/rock sprite
- Custom grass tile texture
- Wheat sprite
- Leaf sprite
- Asset Packs Loaded:
- objects_pack.png (furniture, barrels, gravestones)
- walls_pack.png (walls, arches)
- ground_tiles.png (terrain textures)
- objects_pack2.png (additional objects)
- trees_vegetation.png (trees, bushes)
- Gravestone System:
- Extract gravestone from objects_pack atlas
- Random spawning (0.5% chance on grass)
- 10 HP (harder to destroy)
- Zombie post-apocalyptic atmosphere
- Transparency Processing:
- Auto-remove white/gray backgrounds
- Auto-remove brown backgrounds (merchant)
- Canvas willReadFrequently optimization
- Performance Fixes:
- Fixed Canvas2D warnings (willReadFrequently: true)
- Electron CSP already configured
BONUS: 2.5D Minecraft-Style Terrain ⛏️
- Volumetric Blocks:
- Block thickness: 25px (2.5x thicker than before)
- Left side shading: 30% darker
- Right side shading: 50% darker (strong shadow)
- Crisp black outlines for definition
- Grass Blocks:
- Green top surface
- Brown (dirt) side faces
- Authentic Minecraft aesthetic
- Rendering:
- Canvas renderer for pixel-perfect sharpness
- CSS image-rendering: crisp-edges / pixelated
- No antialiasing
- Round pixels enabled
- Hybrid Style:
- Terrain = 2.5D volumetric (Minecraft-like)
- Characters = 2D flat sprites (pixel art)
- 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):
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
- Trgovanje (Trading System):
- Interakcija s Trgovcem odpre
TradeMenu - Seznam predmetov za nakup/prodajo
- Gold/Currency sistem
- Interakcija s Trgovcem odpre
- Town Restoration:
- Multiple material requirements (Wood, Stone, Gold)
- Different ruin types with different costs
- Friendship/Hearts system (❤️)
- User feedback messages
FAZA 16: Weather & World
- Weather System:
- Rain effect (100-150 droplets)
- Fog effect (gray overlay)
- Storm (heavy rain)
- Automatic weather cycling (30s)
- Terrain Enhancement:
- Elevation/Hills sistem (Perlin Noise)
- Height-based grass tinting (light = hills, dark = valleys)
- Y-offset based on elevation (-25px max)
- More rocks/bushes on hills
FAZA 17: Polish
- Sound System:
- SoundManager class
- Placeholder beep sounds (chop, pickup, plant, harvest, build)
- Rain ambient sounds
- Mute toggle (M key)
- Parallax Layers:
- Layer 1: Sky + Distant Hills (0.2x scroll)
- Layer 2: Far Trees (0.7x scroll)
- Layer 3: Game objects (1.0x normal)
- Layer 4: Foreground grass (1.05x scroll)
- Smart fading (grass becomes transparent near player)
- Camera:
- Viewport: 640x360 (pixel-perfect)
- Instant follow (1.0 speed)
- 100px deadzone
- Round pixels enabled
- Day/Night Cycle:
- Dynamic lighting overlays
- Dawn, Day, Dusk, Night phases
- Color tinting based on time
BONUS: Custom Sprite Integration
- Character Sprites:
- Player custom sprite (protagonist with dreadlocks)
- Zombie custom sprite (green skin, red eyes)
- Merchant custom sprite (wizard with gold coin)
- All characters scaled to 0.2 (20% size)
- Environment Assets:
- Custom tree sprite (blue tree)
- Custom stone/rock sprite
- Custom grass tile texture
- Wheat sprite
- Leaf sprite
- Asset Packs Loaded:
- objects_pack.png (furniture, barrels, gravestones)
- walls_pack.png (walls, arches)
- ground_tiles.png (terrain textures)
- objects_pack2.png (additional objects)
- trees_vegetation.png (trees, bushes)
- Gravestone System:
- Extract gravestone from objects_pack atlas
- Random spawning (0.5% chance on grass)
- 10 HP (harder to destroy)
- Zombie post-apocalyptic atmosphere
- Transparency Processing:
- Auto-remove white/gray backgrounds
- Auto-remove brown backgrounds (merchant)
- Canvas willReadFrequently optimization
- Performance Fixes:
- Fixed Canvas2D warnings (willReadFrequently: true)
- 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):
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