# 🎯 TODO ZA JUTRI - JAN 9, 2026 ## Implementacija Faza 2 Asset v Igro **Status:** FAZA 2 - 100% ASSETS COMPLETE! ✅ **Next:** Dodati sisteme v igro za uporabo assetov --- ## 🚀 PRIORITY SISTEMI ZA IMPLEMENTACIJO ### **1. NPC SISTEM (HIGHEST PRIORITY!)** **Kar imaš:** - 4 NPCji s polnimi 8-directional animations (32 sprites total) - Guard Captain Luka, Innkeeper Janez, Store Owner Novak, Elder Marta - Vsak ima: portrait, idle (left/right/back), walk (left/right/back), custom action **Kar rabiš dodati v kodo:** #### **A. NPC Movement System:** ```javascript // src/entities/NPC.js class NPC extends Phaser.GameObjects.Sprite { constructor(scene, x, y, npcData) { // npcData = { name, spriteKey, dialogues, schedule } super(scene, x, y, npcData.spriteKey); this.npcData = npcData; this.direction = 'down'; // front, left, right, back this.state = 'idle'; // idle, walk, action this.loadAnimations(); this.setupBehavior(); } loadAnimations() { // Naloži vse 8 animacij za ta NPC // idle_left, idle_right, idle_back, idle_front // walk_left, walk_right, walk_back, walk_front // action (custom za vsakega) } setupBehavior() { // Integracija z NPCIdleBehavior.js (že obstaja!) // Random idle animations every 3-8 seconds } } ``` #### **B. NPC Dialogue System:** ```javascript // src/ui/DialogueBox.js class DialogueBox { showDialogue(npcName, text, portrait) { // Uporabi NPC portrait sprite // Display text with typewriter effect // Allow player choices if quest-related } } ``` #### **C. NPC Schedule System (Optional for later):** ```javascript // NPCs move around town based on time // Luka - patrols streets // Janez - stays at inn, serves during evening // Novak - at store during day // Marta - sits at square, walks slowly ``` --- ### **2. BUILDING RESTORATION SYSTEM** **Kar imaš:** - 50 building sprites (40 main + 10 decorations) - Progression states: broken → repaired - Windows, doors, signs, decorations **Kar rabiš dodati v kodo:** #### **A. Building State Manager:** ```javascript // src/systems/BuildingStateManager.js class BuildingStateManager { constructor(scene) { this.buildings = new Map(); // Each building has: id, currentStage, maxStages } upgradeBuilding(buildingId) { const building = this.buildings.get(buildingId); if (building.currentStage < building.maxStages) { building.currentStage++; this.updateBuildingSprite(buildingId); return true; } return false; } updateBuildingSprite(buildingId) { // Switch sprite to next stage // Update collision if needed } } ``` #### **B. Restoration Quest System:** ```javascript // Player collects resources → brings to building // Building upgrades visually // Town looks better as player progresses ``` --- ### **3. PROP INTERACTION SYSTEM** **Kar imaš:** - 67 infrastructure props (wells, benches, signs, tools, etc.) - Interactive elements (bulletin board, tool rack, water well) **Kar rabiš dodati v kodo:** #### **A. Interactive Props:** ```javascript // src/entities/InteractiveProp.js class InteractiveProp extends Phaser.GameObjects.Sprite { constructor(scene, x, y, propType) { super(scene, x, y, propType); this.interactionType = this.getInteractionType(propType); } interact(player) { switch(this.interactionType) { case 'bulletin_board': // Show quest board break; case 'water_well': // Fill water can break; case 'tool_rack': // Access community tools break; case 'bench': // Sit and rest (heal?) break; } } } ``` --- ### **4. WEATHER & LIGHTING SYSTEM** **Kar imaš:** - Fog overlay - Rain animation - Lit lanterns - Wall torches **Kar rabiš dodati v kodo:** #### **A. Weather System:** ```javascript // src/systems/WeatherSystem.js class WeatherSystem { setWeather(type) { switch(type) { case 'fog': this.addFogOverlay(); break; case 'rain': this.addRainParticles(); break; case 'clear': this.clearWeather(); break; } } } ``` #### **B. Lighting System:** ```javascript // Street lamps turn on at night // Torches flicker // Player flashlight interacts with darkness ``` --- ### **5. CEMETERY SYSTEM** **Kar imaš:** - 20 cemetery sprites (mausoleum, gates, crypts, plaques) - Broken → restored progression **Kar rabiš dodati v kodo:** #### **A. Cemetery Interaction:** ```javascript // Memorial plaques - read inscriptions // Mausoleum - quest location? // Crypt door - dungeon entrance? // Gates - unlock with quest progression ``` --- ## 📋 IMPLEMENTATION PRIORITY ### **DAY 1 (TOMORROW):** 1. **NPC Basic Movement** ✅ - Load 4 NPCs into town - Idle animations working - Can walk (simple patrol?) 2. **NPC Dialogue** ✅ - Click NPC → show dialogue - Portrait display - Text system ### **DAY 2:** 3. **Interactive Props** ✅ - Bulletin board quest system - Water well interaction - Bench sitting 4. **Building States** ✅ - Load broken buildings - Simple upgrade system (test 1 building) ### **DAY 3:** 5. **Weather Effects** ✅ - Fog overlay test - Rain particles 6. **Lighting System** ✅ - Night/day cycle basic - Lanterns light up --- ## 🔧 TECHNICAL INTEGRATION CHECKLIST ### **A. Sprite Loading:** ```javascript // In GameScene preload(): this.load.spritesheet('luka_idle_left', 'assets/references/faza2_npcs/guard_luka/idle_left.png', { frameWidth: ???, // Check actual sprite size frameHeight: ??? }); // ... repeat for all 32 NPC sprites ``` ### **B. Animation Creation:** ```javascript // In GameScene create(): this.anims.create({ key: 'luka_idle_left', frames: this.anims.generateFrameNumbers('luka_idle_left'), frameRate: 8, repeat: -1 }); ``` ### **C. NPC Spawning:** ```javascript // Create NPCs in town this.luka = new NPC(this, 400, 300, { name: 'Guard Captain Luka', spriteKey: 'luka', dialogues: LUKA_DIALOGUES }); ``` --- ## 📁 FILES TO CREATE/UPDATE ### **Create:** 1. `src/entities/NPC.js` - NPC class 2. `src/ui/DialogueBox.js` - Dialogue system 3. `src/entities/InteractiveProp.js` - Props 4. `src/systems/BuildingStateManager.js` - Buildings 5. `src/systems/WeatherSystem.js` - Weather ### **Update:** 1. `src/scenes/GameScene.js` - Add NPCs, props, weather 2. `src/ai/NPCIdleBehavior.js` - Already exists! Just integrate 3. `src/config/NPCData.js` - Create NPC definitions --- ## 🎯 QUICK WIN FOR TOMORROW **NAJLAŽJI START:** 1. Naloži 1 NPC (Luka) v GameScene 2. Dodaj idle_left animation 3. Klik na njega → show "Hello, I'm Luka!" 4. **DONE - NPC sistem dela!** ✅ **Potem expand:** - Dodaj ostale 3 NPCje - Dodaj walk animations - Dodaj dialogue choices - Dodaj quest system --- ## 💡 POMEMBNO ZA JUTRI ### **ŠE RABIŠ VEDETI:** 1. **Sprite Sizes?** - Preveri dejanske dimenzije sprite-ov 2. **Frame Counts?** - Koliko framov ima vsaka animacija? 3. **Tiled Integration?** - Ali boš dodajal v obstoječi map ali nov? ### **QUICK CHECK:** ```bash # Check sprite dimensions cd assets/references/faza2_npcs/guard_luka file idle_left.png # Output will show: PNG image data, 128 x 128 (example) ``` --- ## 🚀 JUTRI ZAČNI Z: 1. **Open** `src/scenes/GameScene.js` 2. **Preload** 1 NPC sprite (Luka idle_left) 3. **Create** simple NPC sprite 4. **Add** click interaction 5. **Test** - če dela → expand! --- ## 📊 OČAKOVAN PROGRESS JUTRI **Realistično:** - 1 NPC working (Luka) ✅ - Basic dialogue ✅ - 1-2 interactive props ✅ **Če gre smooth:** - All 4 NPCs ✅ - Full dialogue system ✅ - Quest board working ✅ **Če gre EPIC:** - NPCs patrol ✅ - Building restoration ✅ - Weather system ✅ --- ## 🎊 MOTIVACIJA **Danes si naredil:** - 255 sprites v 12 urah! 🔥 - 100% Faza 2 complete! 🏆 **Jutri boš naredil:** - Assets LIVE in game! 🎮 - NPCs hodijo po town! 👥 - Players lahko interactajo! 🎯 **IT'S ALL COMING TOGETHER!** 💎 --- **Sleep well, legend! Jutri se nadaljuje! 😴🌙**