diff --git a/nova farma TRAE/.DS_Store b/nova farma TRAE/.DS_Store index 3396cebf3..6e62ae849 100644 Binary files a/nova farma TRAE/.DS_Store and b/nova farma TRAE/.DS_Store differ diff --git a/nova farma TRAE/assets/.DS_Store b/nova farma TRAE/assets/.DS_Store index 841f3a85e..6ca6aec40 100644 Binary files a/nova farma TRAE/assets/.DS_Store and b/nova farma TRAE/assets/.DS_Store differ diff --git a/nova farma TRAE/assets/DEMO_FAZA1/.DS_Store b/nova farma TRAE/assets/DEMO_FAZA1/.DS_Store index b27429d22..734a5db0e 100644 Binary files a/nova farma TRAE/assets/DEMO_FAZA1/.DS_Store and b/nova farma TRAE/assets/DEMO_FAZA1/.DS_Store differ diff --git a/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/drevo_faza_1.png b/nova farma TRAE/assets/DEMO_FAZA1/Trees/drevo_faza_1.png similarity index 100% rename from nova farma TRAE/assets/DEMO_FAZA1/Vegetation/drevo_faza_1.png rename to nova farma TRAE/assets/DEMO_FAZA1/Trees/drevo_faza_1.png diff --git a/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/drevo_faza_2.png b/nova farma TRAE/assets/DEMO_FAZA1/Trees/drevo_faza_2.png similarity index 100% rename from nova farma TRAE/assets/DEMO_FAZA1/Vegetation/drevo_faza_2.png rename to nova farma TRAE/assets/DEMO_FAZA1/Trees/drevo_faza_2.png diff --git a/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/drevo_veliko.png b/nova farma TRAE/assets/DEMO_FAZA1/Trees/drevo_veliko.png similarity index 100% rename from nova farma TRAE/assets/DEMO_FAZA1/Vegetation/drevo_veliko.png rename to nova farma TRAE/assets/DEMO_FAZA1/Trees/drevo_veliko.png diff --git a/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/drevo_srednje.png b/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/drevo_srednje.png deleted file mode 100644 index b5e23c492..000000000 Binary files a/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/drevo_srednje.png and /dev/null differ diff --git a/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/visoka_trava.png b/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/grass_ref_1.png similarity index 100% rename from nova farma TRAE/assets/DEMO_FAZA1/Vegetation/visoka_trava.png rename to nova farma TRAE/assets/DEMO_FAZA1/Vegetation/grass_ref_1.png diff --git a/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/trava_sop.png b/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/trava_sop.png deleted file mode 100644 index 5bf4562bd..000000000 Binary files a/nova farma TRAE/assets/DEMO_FAZA1/Vegetation/trava_sop.png and /dev/null differ diff --git a/nova farma TRAE/dokumentacija/DEMO_FAZA1_ASSET_INVENTORY.md b/nova farma TRAE/dokumentacija/DEMO_FAZA1_ASSET_INVENTORY.md new file mode 100644 index 000000000..0a6368fe9 --- /dev/null +++ b/nova farma TRAE/dokumentacija/DEMO_FAZA1_ASSET_INVENTORY.md @@ -0,0 +1,351 @@ +# 📊 DEMO & FAZA 1 - ASSET INVENTORY +**Analiza obstoječih slik in referenc** + +**Datum:** 9. Februar 2026 +**Status:** Inventory Complete + +--- + +## 🎯 ŠE IMAŠ (Že narejeno) + +### 👥 **CHARACTERS (3 files)** +✅ `Kai_Dreads.png` - Static Kai +✅ `kai_walk_sheet.png` - Walk animation (1024×1024, 4×4 frames) +✅ `gronk_walk_sheet.png` - Gronk walk animation (1024×1024, 4×4 frames) + +**REFERENCES:** +- `kaj.png` - Kai reference +- `ana.png` - Ana reference +- `ata.png` - Oče reference +- `mama.png` - Mama reference +- `dr_krnic.png` - Dr. Krnić reference +- `duh_mame_plav.png` - Mama ghost reference +- `gronk_susi.png` - Gronk reference + +--- + +### 🌳 **TREES (9 files)** +✅ `tree_adult_0.png` through `tree_adult_5.png` (6 slices) +✅ `drevo_faza_1.png` - Small tree +✅ `drevo_faza_2.png` - Medium tree +✅ `drevo_veliko.png` - Large tree + +**REFERENCES:** +- `drevo_faza_1.png` +- `drevo_faza_2.png` +- `drevo_veliko.png` +- `drevo_majhno.png` +- `drevo_srednje.png` +- `drevesce.png` +- `suho_drevo.png` (dead tree) + +--- + +### 🌾 **VEGETATION (5 files)** +✅ `visoka_trava_v2.png` - Tall grass (1024×1024) +✅ `grass_cluster_dense.png` - Dense grass cluster +✅ `grass_cluster_flowery.png` - Flowery grass +✅ `bush_hiding_spot.png` - Bush for hiding +✅ `grass_ref_1.png` - Reference grass + +**REFERENCES:** +- `visoka_trava_ref.png` +- `visoka_trava_ref_final.png` +- `trava_sop.png` - Grass tuft +- `trava_sop_ref_final.png` + +--- + +### 🏞️ **ENVIRONMENT (18 files)** +✅ `dead_nature_0.png` through `dead_nature_8.png` (9 slices) +✅ `fence_sign_0.png` through `fence_sign_2.png` (3 signs) +✅ `sotor.png` - Tent +✅ `taborni_ogenj.png` - Campfire +✅ `water_clean_patch.png` - Clean water patch +✅ `river_tile_seamless.png` - River tile +✅ `stream_final_v6.png` - Stream segment +✅ `stream_final_v7.png` - Stream segment +✅ `mud_puddle.png` - Mud puddle +✅ `sign_danger.png` - Danger sign +✅ `obstacle_thorns.png` - Thorns obstacle + +**REFERENCES:** +- `stream_reference.png` +- `mala_koca.png` - Small hut +- `koca_lesena.png` - Wooden hut +- `skedenj.png` - Shed +- `kup_smeti_guma_konzerve.png` - Trash pile +- `objekt_grob_odprt_zombi_postelja.png` - Open grave/zombie bed +- `objekt_strasilo_creepy.png` - Creepy scarecrow +- `objekt_gnoj_kompost_kup.png` - Manure/compost pile +- `objekt_kompostnik_lesen.png` - Wooden composter +- `objekt_kontejner_smeti.png` - Trash container +- `kovinska_resetka.png` - Metal grate +- `zlomljena_ograja.png` - Broken fence + +--- + +### 🏗️ **STRUCTURES (2 files)** +✅ `foundation_concrete.png` - Concrete foundation +✅ `rain_catcher.png` - Rain catcher (vodni lovilec!) + +**REFERENCES:** +- `structure_workshop_garage.png` - Workshop/Garage +- `zgradba_kurnik.png` - Chicken coop +- `zgradba_rastlinjak_namakanje.png` - Greenhouse with irrigation +- `zgradba_pec_cela_in_podrta.png` - Furnace (whole & destroyed) +- `rudnik_vhod_dolina_smrti.png` - Mine entrance +- `vhod_rudnik_1_zrušen.png` - Mine entrance collapsed +- `vhod_rudnik_2_popravljen.png` - Mine entrance repaired +- `rudnik_rov.png` - Mine tunnel +- `vodnjak.png` - Well +- `vodnjak_star.png` - Old well + +--- + +### 📦 **ITEMS (3 files)** +✅ `spalna_vreca.png` - Sleeping bag +✅ `hay_drop_0.png` - Hay drop +✅ `item_longboard_wheel.png` - Longboard wheel + +**REFERENCES:** +- `spalna_vreca.png` +- `bencin_kanta.png` - Fuel canister +- `item_zica_kolut.png` - Wire coil +- `kamen_majhen.png` - Small stone +- `kamen_srednji.png` - Medium stone +- `kopica_premoga.png` - Coal pile +- `baker_ikona.png` - Copper icon +- `premog_ikona.png` - Coal icon +- `mladika_ikona.png` - Seedling icon +- `seme_kalcek.png` - Seed/sprout +- `zareca_ruda.png` - Glowing ore + +--- + +### 🌿 **OBSTACLES (1 file)** +✅ `trnje.png` - Thorns + +--- + +### 🎨 **GROUND/TILES (2 files)** +✅ `ground_dirt_patch.png` - Dirt patch +✅ `ground_pebbles.png` - Pebbles + +**REFERENCES:** +- `tla_trava_tekstura_ref.png` - Grass texture ref +- `tla_trava_tekstura_ref_final.png` - Final grass texture +- `tla_in_stene.png` - Floors and walls +- `resource_mivka_in_potok_tile.png` - Sand & stream tile + +--- + +### 🖼️ **UI (11+ files)** +✅ `action_btn.png` +✅ `badge_purchase.png` +✅ `badge_trial.png` - TRIAL VERSION badge! +✅ `dialog_panel.png` +✅ `health_bar.png` +✅ `health_critical.png` +✅ `hotbar_background.png` +✅ `inventory_panel.png` +✅ `inventory_slot.png` +... (+2 more) + +**REFERENCES:** +- `ui_dnevnik.png` - Journal UI +- `ui_gumbi.png` - Buttons +- `ui_okno_leseno.png` - Wooden window frame +- `ui_status_bar.png` - Status bar +- `ui_vrstica_napredka.png` - Progress bar +- `okna_vrata_tileset.png` - Windows/doors tileset + +--- + +### ⚡ **VFX (files unknown)** +(Potrebno dodatno pregledati) + +**REFERENCES:** +- `megla_ozadje.png` - Fog background (AMNEZIJA!) + +--- + +## 🌿 **SPECIAL: CANNABIS/MARIHUANA** + +**REFERENCES:** +- `cvetenje_marihuane.png` - Cannabis flowering +- `rast_marihuane.png` - Cannabis growth +- `rastlina_konoplja_faze_rasti_v_loncih.png` - Cannabis growth stages in pots +- `seed_packet_cannabis.png` - Cannabis seed packet + +--- + +## 🌾 **CROPS (Growth Sheets)** + +**REFERENCES:** +- `wheat_grow_sheet.png` - Pšenica growth stages +- `corn_grow_sheet.png` - Koruza growth stages +- `potato_grow_sheet.png` - Korenje growth stages +- `soncnice_faze_rasti.png` - Sunflower growth stages + +--- + +## 🧟 **ZOMBIJI** + +**REFERENCES:** +- `zombi.png` - Basic zombie +- `zombi_izvidnik.png` - **SCOUT ZOMBIE** (Faza 1!) +- `zombi_kmet.png` - **FARMER ZOMBIE** (Faza 1!) +- `zombi_rudar.png` - **MINER ZOMBIE** (Faza 1!) +- `zombie_punk.png` - Punk zombie variant +- `zombi_otrok.png` - Child zombie +- `zombi_otrok_punca.png` - Girl child zombie + +--- + +## 🐾 **ŽIVALI** + +**REFERENCES:** +- `zivali_divje_predelane_svetlejsa.png` - **WILD ANIMALS SET!** +- `zivali_krava_svinja_ovca.png` - Cow, Pig, Sheep +- `zival_kokosi_vse_barve.png` - Chickens (all colors) +- `zivali_ribe_vse_vrste_set.png` - **ALL FISH TYPES!** + +--- + +## 🦋 **INSEKTI** + +**REFERENCES:** +- `insekti_travnik_set.png` - Grassland insects +- `insekti_matica_dezevnik_polz_set.png` - Queen bee, earthworm, snail +- `insekti_posebni_set.png` - Special insects +- `insekti_metulji_set.png` - Butterflies +- `insekti_komar_muha.png` - Mosquito, fly +- `insekti_dezevnik_polz_mravlja.png` - Earthworm, snail, ant +- `insekti_zima_set.png` - Winter insects + +--- + +## 🔧 **ORODJA & CRAFTING** + +**REFERENCES:** +- `motorna_kosa.png` - **LAKSARCA (chainsaw)!** +- `orodja_nadgradnje_sekira_kramp_motika.png` - Tool upgrades (axe, pickaxe, hoe) +- `orodje_kramp_lopata.png` - Pickaxe & shovel +- `kosa_orozje.png` - Scythe weapon +- `cebelnjak_orodje_set.png` - Beehive tool set +- `delovna_miza.png` - **WORKBENCH!** +- `predelovalni_stroji.png` - Processing machines +- `bio_gorivo_proizvodnja.png` - Biofuel production +- `proizvodnja_sena.png` - Hay production +- `sistem_za_vodo.png` - Water system + +--- + +## 📸 **STORY/MEMORY** + +**REFERENCES:** +- `druzina_portret.png` - Family portrait +- `stara_fotografija.png` - Old photograph (POLAROID style!) +- `spomini_otrostva.png` - Childhood memories + +--- + +## 🎁 **SPECIAL ITEMS** + +**REFERENCES:** +- `nagrada_kip_200_dni.png` - **200 DAYS TROPHY!** (Demo completion!) +- `sencna_posast.png` - Shadow creature +- `netopir.png` - Bat +- `sova.png` - Owl (Museum keeper!) +- `Switch:Lever.png` - Switch/lever +- `lestev_lesena.png` - Wooden ladder +- `nacrti_zvitki.png` - Blueprints/scrolls +- `znak_smerokaz_mesto_gozd.png` - Signpost (town/forest) +- `znak_viseci_prazna_tabla.png` - Hanging sign (empty) +- `sod_izometricen.png` - Isometric barrel +- `predmeti_terariji_in_kace_set.png` - Terrariums & snakes +- `objekt_cevi_in_kabli_set.png` - Pipes & cables +- `objekt_elektricni_drog_predelan_svetlejsi.png` - Electric pole +- `ikone_rude.png` - Ore icons +- `agregat_1_pokvarjen.png` - Generator (broken) +- `agregat_2_delujoc.png` - Generator (working) +- `Zabojnik za zombije + Kamenita potka + Zlati hrošč.png` - Zombie container + stone path + golden beetle + +--- + +## ❌ MANJKA ZA DEMO & FAZA 1 + +### **HIGH PRIORITY:** +1. ❌ **20 Polaroid Intro Images** - `polaroid_01.png` through `polaroid_20.png` +2. ❌ **Kai Idle Animation** - `kai_idle_sheet.png` +3. ❌ **Kai Work Animation** - `kai_work_sheet.png` +4. ❌ **Crop Growth Stages:** + - ❌ `crop_wheat_0.png` through `crop_wheat_3.png` (4 stages) + - ❌ `crop_carrot_0.png` through `crop_carrot_4.png` (5 stages) +5. ❌ **Cannabis Growth Stages** (Demo cash crop!) + - Imaš reference, rabiš game sprites +6. ❌ **Wild Animals Sprites** (3× animals) + - ❌ Raccoon (Rakun) + - ❌ Wolf (Volk) + - ❌ Crow (Vrana) + - Imaš reference `zivali_divje_predelane_svetlejsa.png`! + +### **MEDIUM PRIORITY (Faza 1):** +7. ❌ **Zombie Worker Sprites:** + - Imaš references za vse 4! + - ❌ Scout animation + - ❌ Farmer animation + - ❌ Miner animation + - ❌ Lumberjack animation +8. ❌ **Buildings/Ruševine:** + - ❌ Garaža (imaš reference `structure_workshop_garage.png`) + - ❌ Rastlinjak (imaš reference `zgradba_rastlinjak_namakanje.png`) + - ❌ Hlev (reference manjka) +9. ❌ **Crafting Items:** + - ❌ Motorka sprite + - ❌ Laksarca sprite (imaš reference `motorna_kosa.png`) + - ❌ Vodni filter sprite + +### **LOW PRIORITY:** +10. ❌ **Fish Sprites** (imaš reference sheet!) +11. ❌ **Insect Sprites** (imaš reference sheets!) +12. ❌ **NPC Sprites** (Lena, Kustos, etc.) + +--- + +## 🎯 NAČRT AKCIJE + +### **KAJ ŽE IMAŠ PRIPAVLJENO (Referenced):** +1. ✅ Cannabis growth references → Need game sprites +2. ✅ Zombie worker references → Need animations +3. ✅ Wild animals reference → Need individual sprites (rakun, volk, vrana) +4. ✅ Fish reference sheet → Need individual sprites +5. ✅ Insect reference sheets → Need individual sprites +6. ✅ Crop growth sheets (wheat, potato, corn) → Need to process +7. ✅ Story/memory images → Need Polaroid processing +8. ✅ Buildings references → Need to clean/process +9. ✅ Tools references → Need to clean/process + +### **PRIORITETA = PROCESIRATI REFERENCE V GAME SPRITES!** + +--- + +## 📝 ZAKLJUČEK + +**ŠE IMAŠ:** 61 processed game sprites + 138 reference images +**NAČRT:** Imaš skoraj VSE reference za Demo & Faza 1! +**PROBLEM:** Reference niso processirane v clean game sprites + +**NEXT STEPS:** +1. Processirati crop growth sheets (wheat, carrot, cannabis) +2. Izrezati wild animals iz reference sheet (rakun, volk, vrana) +3. Narediti 20 Polaroid intro images +4. Processirati zombie worker sprites iz references +5. Clean building sprites (garaža, rastlinjak) + +**SI SUPER ORGANIZED! Reference obstajajo! 💪** + +--- + +*"Twin Bond. Zdaj in vedno."* 💜 diff --git a/nova farma TRAE/dokumentacija/DEMO_FAZA1_COMPLETE.md b/nova farma TRAE/dokumentacija/DEMO_FAZA1_COMPLETE.md new file mode 100644 index 000000000..7492ed6f2 --- /dev/null +++ b/nova farma TRAE/dokumentacija/DEMO_FAZA1_COMPLETE.md @@ -0,0 +1,1437 @@ +# 🎮 MRTVA DOLINA - DEMO & FAZA 1 KOMPLETNA SPECIFIKACIJA +**Verzija:** ULTIMATE MASTER (9. Februar 2026) +**Status:** PRODUCTION BIBLE - TA DOKUMENT JE ZAKON +**Viri:** HARD_IZPISEK + FINAL_MASTER_DEMO_FAZA1_SPEC + COLLECTORS_ALBUM + GAME_BIBLE + +--- + +# 📋 KAZALO + +1. [DEMO SPECIFIKACIJA](#demo-specifikacija) +2. [FAZA 1 SPECIFIKACIJA](#faza-1-specifikacija) +3. [OTOK & SVET](#otok--svet) +4. [LIKI](#liki) +5. [ŽIVALI](#živali) +6. [RASTLINE & KMETOVANJE](#rastline--kmetovanje) +7. [ZOMBI SISTEM](#zombi-sistem) +8. [ZGRADBE](#zgradbe) +9. [ORODJA & CRAFTING](#orodja--crafting) +10. [VODA & PREŽIVETJE](#voda--preživetje) +11. [SISTEMI](#sistemi) +12. [ASSETS CHECKLIST](#assets-checklist) + +--- + +# DEMO SPECIFIKACIJA + +## 🏁 CILJ +**Preživi 200 dni** → Achievement "Trmasti Preživeli" 🏆 +- **Kje:** Velja v DEMU ali FULL GAME (isti save file). +- **Nagrada:** Zlati Kip (in-game statue) + Steam Achievement. + +## ♾️ DEMO TRAJANJE +- **Čas:** **NEOMEJENO!** Igraš kolikor hočeš. +- **Save File:** Se prenese v polno igro. +- **Hoarding:** Material (les, kamen, denar) se OHRANI. +- **Lock:** Samo napredne mehanike so zaklenjene (Faza 1+). +- **Nakup:** Ko kupiš, se INSTANT odklene Faza 1 (na istem savu!). + +## 🏝️ OKOLJE - OTOK + +### **Otok Dimenzije:** +- **Velikost:** 2560 × 2560 px (20 × 20 tiles @ 128px/tile) +- **Oblika:** Jagged/nazobčan obod (40 vertices, 50px jitter) +- **Material:** Rjava zemlja (brown ground) +- **Centralna Luknja:** Brez tal v centru (hole) + +### **Ocean:** +- **Velikost:** 10000 × 10000 px (veliko večji od otoka) +- **Barva:** #001d3d (Deep Blue) +- **Physics:** Deadly - ne moreš plavati! Takojšnja smrt. +- **Camera View:** Vidiš ocean okrog otoka (diorama effect) + +### **Pozicija:** +- **Island Offset:** X=3720, Y=3720 (center sveta) +- **Physics Bounds:** Samo otok (hard stop na robu) +- **Camera Bounds:** Celoten svet (10000×10000) +- **Visual Style:** **2.5D Hand-Drawn / Vector HD** (NI Pixel Art!) + - Clean lines, smooth animations. + - High resolution assets (1024×1024 main). + +## 🗺️ MAPA & OBMOČJE + +### **Playable Area:** +- **Samo Farma:** 8×8 area na otoku +- **Fog of War:** Vse ostalo zaprto/nevidno +- **Exploration:** 0% (zaklenjeno do Faze 1) + +## 🏠 BIVANJE + +### **Začetek:** +- ⛺ **Spalna Vreča** (Sleeping Bag) - Dan 1 +- ⛺ **Šotor** (Tent) - dostopen takoj + - **Radio:** Igra Synthwave/Dark Country + - **Vreme:** Napove jutri ("Dež jutri") + - **SOS Signali:** Quest hooks + - **Energy Restore:** 70% + +### **Locked:** +- 🏠 **Lesena Hiša** - ZAKLENJENA do Faze 1 + +### **Spanje:** +- **Moraš spati do 02:00** +- **Pass Out:** Če ne spiš → Omedliš + - Izguba energije + - Izguba denarja +- **Energy Restore:** + - Šotor: 70% + - Hiša: 100% (Faza 1) + +## 📦 ZAČETNA SKRINJA (Sezonska) + +**Na farmi že stoji:** + +### **Pomlad Start:** +- 🪓 **Orodja:** Lesena (Tier 1) + - Lesena Motika (Wooden Hoe) + - Lesena Sekira (Wooden Axe) + - Lesena Zalivalka (Wooden Watering Can) +- 👕 **Obleka:** Survivor Rags (Cunje) +- 🍞 **Preživetje:** + - Kruh × 1 + - Jabolko × 1 + - Bakla × 1 +- 🌾 **Semena:** + - Pšenica × 3 + - Korenje × 3 +- 🌿 **Kapital:** Cannabis Sativa × 3-5 semen + +### **Zima Start (Hard Mode):** +- 🥔 **Semena:** + - Zimski Krompir × 3 + - Zimska Pšenica × 3 +- 🌿 **Kapital:** Cannabis Sativa × 3-5 semen + +## 🛠️ OMEJITVE (Locked Content) + +### **Orodja:** +- ✅ **Lesena (Tier 1)** - AVAILABLE +- ❌ **Kovinska** - LOCKED + +### **Zombiji:** +- ✅ **Shambler** (basic zombie) - AVAILABLE + - Počasni (slow) + - Ne evolvirajo + - Lahko jih udomačiš (Max 3) +- ❌ **All other types** - LOCKED + +### **Kmetovanje:** +- ✅ **2 Crops:** + - Pšenica (3 dni rasti) + - Korenje (4 dni rasti) +- ✅ **Special Crop:** + - Cannabis Sativa (Konoplja) - "Začetni kapital" + - Sell for money + - Main economy in Demo +- ❌ **80+ other crops** - LOCKED + +## 💧 VODA SISTEM + +### **VSA VODA JE STRUPENA!** +### **VODA NA OTOKU:** +- 🌧️ **Deževnica (Rain):** **EDINI VIR PITNE VODE!** +- 🌊 **Ocean:** Deadly (smrtonosen, ne moreš piti/plavati) +- ❌ **Reke/Jezera:** JIH NI! (Otok je suh/slan) + +### **Čista Voda (Survival):** +- 🌧️ **Rain Catcher (Lovilec Deževnice):** + - Must build immediately! + - Edini vir vode za zalivanje in pitje. + - Če ne dežuje → **KRIZA!** (Stockpile water!) + +### **Če zalivaš z dirty water:** +- 🧪 Mutant rastline + - Neuporabne za hrano + - Dobre za gorivo (bio-fuel) + +### **Čista Voda (EDINI način):** +- 🌧️ **Rain Catcher** (Lovilec Deževnice) + - Must build immediately + - Collects rain when it rains + - Store in barrels +- ❌ **Vodni Filter** - LOCKED (Faza 1) + +## 🎬 INTRO SEKVENCA + +### **20 Polaroid Slik:** +1. "Družina (Pred Virusom)" +2. "Marko v Laboratoriju" +3. "Izbruh (Red Alert)" +4. "Kaos na Ulicah" +5. "Naš Dom (Obkoljen)" +6. "Oče se Bori" +7. "Mama Pada" +8. "Kai Ugriznjen" +9. "Ana Ugrabljena" +10. "Veliki Trol Kralj" +11. "Sam" +12. "Alfa Moč" +13. "Prvi Kontroliran Zombi" +14. "Pobeg" +15. "Potovanje" +16. "Najdena Dolina" +17. "Opuščena Kmetija" +18. "Prvi Semenski" +19. "Twin Bond" +20. "Obljuba" + +### **Prebujanje (Dan 1):** +- Kai se prebudi v **Spalni Vreči** +- **Blur Effect:** Vid zamegljen (amnezija) +- **Prvi Memory Fragment:** Razjasni vid +- **Twin Bond Signal:** Čutiš Ano (šibek signal) + +## 🧠 AMNEZIJA SISTEM + +### **Spomini (Flashbacks):** +- **Trigger:** Bližina spominskih predmetov +- **Effect:** Screen glitch/pulse → Polaroid flash +- **Napredek:** + - Najdi predmete (Artefakti) + - **ZBIRKA (Collection):** Vsak nov vnos (insekt, riba) → **MEMORY XP!** + - Level up Memory → Odklene nove skille ("Survival Instinct") + +### **Memory Fragments (Demo):** +1. "Srečni Časi" (družina) +2. "Očetov Laboratorij" (virus warning) +3. "Zadnji Večerni" (Ana rojstni dan) + +--- + +# FAZA 1 SPECIFIKACIJA + +## 🚀 UNLOCK POGOJ +**Preživi 200 dni v DEMO** → Faza 1 se odpre + +## 🗺️ ODPRTJE SVETA + +### **Fog of War:** +- ✅ **Megla se odpre!** +- 🔍 **Raziskovanje:** Aktivno + - Sami raziskujemo + - ALI pošljemo Zombi Izvidnika +- 🧟 **Zombi Izvidnik (Scout):** KLJUČNA mehanika! + - Kjer hodi, se **MEGLA TRAJNO RAZKRI** + - Avtomatično odpira mapo + +### **Nove Lokacije:** +- 🏚️ **Ruševine:** Garaža, Rastlinjak, Hlev + - **NE GRADIŠ NA NOVO!** + - **NAJDEŠ RUŠEVINO** in jo popraviš +- 🏞️ **Raziskuj:** Forest, Swamp, Desert areas (začetek) +- ⛏️ **Mine:** Majhen rudnik (Baker, Coal) + +## 🧟 ZOMBI IZVIDNIK (Scout) - KLJUČNO! + +### **Funkcija:** +- **Edini zombi** ki gre v Fog of War! +- **Scavenge:** Išče dele, material, resources +- **Avtomatski:** Pošlješ ga, vrne se čez nekaj časa +- **Megla:** Kjer hodi = **TRAJNO ODPRE FOG** + +### **Najde:** +- 🔧 **Motor** (za motorko & laksarco) +- ⛓️ **Verige** (za motorko) +- 🪚 **Glava (Blade)** (za motorko) +- 🌀 **Rotating Head** (za laksarco) +- 🪵 **Palica (Handle)** (za laksarco) +- 🛢️ **Bencin** (fuel za motorko & laksarco) +- � **Scrap Metal** (za repair) +- 📦 **Random Items** (tools, seeds, parts) + +### **Risk:** +- ⚠️ **10% chance** da ne pride nazaj (lost in fog) +- ⏰ **Čas:** 1-3 in-game days za return + +## 🏚️ RUŠEVINE (Repairs, ne Building!) + +### **1. GARAŽA (Garage) - Workshop:** +- **Status:** Ruševina v Fog of War +- **Repair Cost:** + - 50 Wood + - 30 Stone + - 10 Scrap Metal +- **Time:** 2 dni +- **Unlock:** Crafting Delovna Miza (Workbench) +- **Funkcija:** + - Repair tools + - Craft vehicles (motorka) + - Craft machines (laksarca) + - **Skladišče za Gorivo:** + - Bencin (rdeče barrels) + - Olje (rumene barrels) + - **Miza za Sestav:** Stroji & vozila + +### **2. RASTLINJAK (Greenhouse):** +- **Status:** Ruševina v Fog of War +- **Repair Cost:** + - 40 Wood + - 20 Glass (iz scrap ali craft: Sand + Coal) + - 15 Stone +- **Time:** 2 dni +- **Unlock:** Advanced farming (več crop types) +- **Funkcija:** + - Faster growth (50% boost) + - Kmetovanje pozimi (winter crops work) + +### **3. HLEV (Barn):** +- **Status:** Ruševina v Fog of War +- **Repair Cost:** + - 60 Wood + - 25 Stone + - 5 Iron (rare!) +- **Time:** 3 dni +- **Unlock:** Žival housing +- **Funkcija:** + - Storage + animal care + - **Capacity:** 4 animals (Tier 1) + +## 🔧 CRAFTING (Novi Recepti) + +### **1. MOTORKA (Chainsaw) 🪚:** +``` +Potrebuješ (Scout najde): +- Motor × 1 +- Veriga × 1 +- Glava (Blade) × 1 +- Bencin × 5L + +Crafting Time: 1 dan +Crafting Location: Garaža (Workbench) + +Funkcija: +- **DRVA (TREES):** 1-shot instant chop! +- Cuts 3×3 area (all trees in radius) +- Fuel: -0.5L per tree +- Durability: 50 trees +- Replaces axe completely +``` + +### **2. LAKSARCA (Trimmer) 🌿:** +``` +Potrebuješ (Scout najde): +- Motor × 1 +- Rotating Head × 1 +- Palica (Handle) × 1 +- Bencin × 3L + +Crafting Time: 6 ur +Crafting Location: Garaža (Workbench) + +Funkcija: +- **TRAVA & GRMIČEVJE:** Instant clear! +- Cuts 5×5 area (grass, bushes, weeds) +- Fuel: -0.2L per area +- Durability: 100 uses +- Keeps farm clean & tidy +``` + +### **3. VODNI FILTER (Water Desalinator):** +``` +Potrebuješ: +- Oglje (Charcoal) × 10 +- Pesek (Sand) × 20 +- Plastika (Plastic) × 5 + +Crafting Time: 3 ure + +Funkcija: +- **Sea Water → Clean Water** (50L) +- **Bonus:** **SOL (Salt)** × 5 (za sušenje mesa!) +- Postaviš na obalo! +- Reši problem suše. +``` + +### **4. STISKALNICA (Oil Press):** +``` +Potrebuješ: +- Iron × 5 (Miner Lv 5) +- Wood × 20 +- Stone × 10 + +Location: Garaža + +Funkcija: +- **Sončnice (Sunflowers) → BIO-OLJE** +- 10 Sunflowers = 1L Bio-Oil +- Fuel za Generator in Stroje! +``` + +### **5. GENERATOR (za Rudnik):** +``` +Potrebuješ: +- Engine Parts × 5 (Scout najde) +- Metal Sheets × 10 (scrap) +- Wire × 20 + +Gorivo: +- **BIO-OLJE** (iz Stiskalnice!) +- Renewable energy source + +Funkcija: +- Power za rudnik (Deeper Mining) +- Light system +``` + +## ⛏️ RUDARJENJE (Mining) + +### **Mine Lokacija:** +- **Small Mine:** 5×5 area na edge of island +- **Znajdeš v Fog of War** +- **Status:** Vhod zrušen (collapsed) +- **Repair:** 100 Wood + 50 Stone + Generator + +### **Dostopno:** +- 🪨 **Baker (Copper):** Common + - Use: Crafting electrical items +- 🪵 **Premog (Coal):** Common + - Use: Fuel, crafting charcoal, glass +- 🧱 **Glina (Clay):** Koplji blizu vode/močvirja + - Use: Bricks, Pots (za rože) +- 🏖️ **Pesek (Sand):** Koplji na obali (Beach) + - Use: Glass (Sand + Coal v peči) + +### **Scavenging Items (Trash/Ruševine):** +- 🗑️ **Plastika (Plastic):** Najdeš v smeteh ali naplavi morje. +- ⚙️ **Scrap Metal:** Ruševine, stroji. +- 🧵 **Cloth/Rags:** Zapuščene hiše, zombiji. + +### **Animal Drops (Usnje/Hrana):** +- **Usnje (Leather):** Krave, Zajci, Kače. +- **Meso (Meat):** Raw (cook → Grilled). +- **Mast (Fat):** Prašiči (za biogorivo/sveče). + +### **Napredno Rudarjenje:** +- ⚙️ **Železo (Iron):** REDKO! + - **NE NAJDEŠ GA SAM!** + - Samo **Zombi Rudar Lv 5+** lahko najde + - Use: Advanced tools, buildings + +### **Zaklennjeno (Faza 2+):** +- 🥈 Silver +- 🥇 Gold +- 💎 Gems + +### **Danger:** +- ☠️ Toxic gas pockets +- Need Gas Mask (craft later) +- Random cave-ins + +## 🧟 NOVI ZOMBI TIPI + +### **1. IZVIDNIK (Scout):** +- **HP:** 50 +- **Speed:** Fast +- **Function:** Scavenge fog of war, odpira meglo +- **Limit:** Max 1 naenkrat +- **Finds:** Bencin, Motor, Verige, Ohišje, Dele +- **Level Up:** Hitrejše iskanje, manj chance za loss + +### **2. KMET (Farmer):** +- **HP:** 30 +- **Speed:** Slow +- **Function:** Zaliva, žanje +- **Limit:** Max 3 naenkrat +- **Level Up:** Hitrejše delo, več yield + +### **3. GOZDAR (Lumberjack):** +- **HP:** 40 +- **Speed:** Normal +- **Function:** Seka drevesa +- **Limit:** Max 2 naenkrat +- **Level Up:** Hitrejše sekanje, več wood per tree + +### **4. RUDAR (Miner):** +- **HP:** 60 +- **Speed:** Slow +- **Function:** Koplje (Lv 5+ najde Iron!) +- **Limit:** Max 2 naenkrat +- **Level Up:** + - Lv 1-4: Coal, Copper + - Lv 5+: **LAHKO NAJDE ŽELEZO!** + +### **5. PORTER/COLLECTOR (Nosač):** +- **HP:** 40 +- **Speed:** Normal +- **Function:** **Pobira iz Drop Boxov → Nosi v skrinje!** +- **Limit:** Max 1 naenkrat +- **Delovanje:** + 1. Zombie patrolira med Drop Boxi + 2. Če je Drop Box poln → pobere items + 3. Nosi v najbližjo prazno skrinje + 4. Deposit items + 5. Repeat +- **Level Up:** + - Lv 1-3: Nosi 5 items naenkrat + - Lv 4-6: Nosi 10 items naenkrat + - Lv 7-10: Nosi 20 items naenkrat + hitrejše gibanje +- **Benefit:** Te ne rabi več ročno prazniti Drop Boxov! + +### **Zombi Bivališče:** +- **GROBOVI (Graves)** +- Najdi Blueprint v Fog of War +- Craft: 20 Stone + 10 Wood per grave +- Zombiji spijo v grobovih (creepy but cool) + +### **Zombi Leveling:** +- **XP:** Nabirajo med delom +- **Lv 1-10** +- **Boljši level = hitrejše delo** +- **Rudar Lv 5+ = IRON ACCESS!** + +## 📦 DROP BOX SISTEM + +**Zombiji ne nosijo direktno v tvoje skrinje!** + +### **Delovanje:** +1. Zombi naredi delo (tree chop, harvest, mine) +2. Resource gre v **DROP BOX** (posebenposeben zabojnik) +3. **Ti** pobereš iz Drop Box → Inventory +4. **Razlog:** Balance (ne preveč easy) + +### **Drop Box Craft:** +``` +Potrebuješ: +- Wood × 30 +- Stone × 10 + +Crafting Time: 1 ura +Crafting Location: Workbench +``` + +### **Drop Box Lokacije:** +- Pri Workshopu (1× box) - za crafted items +- Pri Mine Entrance (1× box) - za ore +- Pri Farmi (1× box) - za crops, wood + +--- + +# OTOK & SVET + +# OTOK & SVET (STYLE 32: PURE 2D NOIR) + +## 📏 MERE IN RAZMERJA (Asset Dimensions) + +### **1. RAZMERJA LIKOV (2D Sprite Scale):** +*Vse slike se avtomatsko prilagodijo velikosti polja (1 Tile).* +- **Kai (14 let):** **1 Tile** (Standardna višina). +- **Gronk:** **2.5 Tiles** (Ogromen, sega čez vrhove majhnih dreves). +- **Shambler Zombi:** **1 Tile** (Enako visok kot Kai, a zgrbljen). +- **Piščanček:** **0.2 Tile** (Rumena pika v travi). +- **Odrasla Kura:** **0.5 Tile** (Polovica Kaijeve višine). +- **Krava / Bik:** **2 Tiles** (Masivna 2D žival). +- **Susi (Jazbečarka):** **0.3 Tile** (Teka ob Gronkovih nogah). + +### **2. ZGRADBE IN MAŠINE (Tloris/Footprint):** +*Koliko prostora predmet zasede na tleh (Collision Box).* +- **Spalna vreča:** 1×1 Tile. +- **Šotor:** 2×2 Tiles. +- **Lesena Hiša:** 3×3 Tiles (vhod v sredini). +- **Garaža / Hlev:** 4×4 Tiles (velike ruševine). +- **Generator / Stiskalnica:** 1×1 Tile. +- **Rezervoar (Rain Catcher):** 2×2 Tiles. +- **Umetni Ribnik:** 3×3 Tiles. +- **Škropilnik:** Majhen (walkable). + +### **3. NARAVA & KMETOVANJE:** +- **Polje (Dirt):** 1 Tile. +- **Cannabis:** Višja od Kaia (ko zraste). +- **Visoka Trava:** Do ramen (Layering: Kai hodi "v" travi). +- **Mrtvi Hrast:** 1 Tile (tla) / 3×3 Tiles (krošnja - Kai hodi "pod" njo). + +## 🏝️ TEHNIČNE SPECIFIKACIJE (Engine Rules) + +### **Island Logic:** +```javascript +ISLAND_SIZE = 20 × 20 Tiles +TILE_SIZE = "Dynamic" (Visual Scale) +OCEAN = "Infinite 2D Plane" (No rivers on island) +``` + +### **Agent Directives (Style 32):** +1. **NO PIXELS:** Uporabljaj High-Res Vector/Hand-Drawn assete. +2. **LAYERING (Depth):** + - Y-Sort: Stvari nižje na ekranu so "spredaj". + - Kai hodi **ZA** drevesi in **V** travi. +3. **MOVEMENT:** + - **Free Movement:** Kai se premika tekoče (analogno) po 2D ravnini. + - **Grid Action:** Farming/Building se "snapne" na kvadratke (Tiles). +4. **COLLISION:** + - Samo **BAZE** stavb in **ROB** otoka so trdi. + - Krošnje, visoka trava, škropilniki so "Walkable". + +--- + +# LIKI + +## 👤 KAI MARKOVIĆ + +### **Osnovni Podatki:** +- **Ime:** Kai Marković +- **Starost:** 14 let +- **Status:** Alpha Hybrid (imun na virus) +- **Posebnost:** Zombie Master (kontrolira zombije) + +### **Videz:** +- **Lasje:** Pink/Zeleni dreadlocksi +- **Stil:** Dark-Chibi Noir +- **Outfit:** Raztrgane cunje (rags), later unlock wear +- **Red Eyes:** Genetic trait (birth trait) + +### **Sposobnosti:** +- 🧟 **Zombie Control:** Lahko udomači zombije + - Demo: Max 3 zombiji + - Faza 1: Max 8 zombijev + - Use SPACE key near zombie +- 🔗 **Twin Bond:** Telepatska povezava z Ano +- 💪 **Alpha Immunity:** Ne postane zombi + +### **Amnezija:** +- **Start:** Ne spomni se vsega! +- **Flashbacki:** Spomini se vračajo skozi igro +- **Memory Pulse:** Screen glitch trigger +- **Blur Vision:** Until first memory found + +## 👧 ANA MARKOVIĆ + +### **Osnovni Podatki:** +- **Ime:** Ana Marković +- **Starost:** 14 let +- **Status:** UGRABLJENA! (Troll King / Dr. Krnić) +- **Lokacija:** Černobilski Reaktor + +### **Twin Bond:** +- 💜 **Telepatija:** Kai čuti da je živa +- 📡 **Signal:** Random messages (very weak in Demo/Faza 1) +- 🎯 **Main Quest:** Najti jo! (unlock v Fazi 2+) + +### **Sporočila (Random, rare):** +``` +"Kai... čutiš me? Sem ujeta... ampak ŽIVIM." +"Ne obupaj... Twin Bond... deluje..." +"Troll me čuva... ampak nisem sama..." +``` + +## 👻 STARŠA (Duhovi) + +### **Marko Marković (Oče):** +- **Status:** Mrtev (Dan 3) +- **Duh:** Force Ghost (ko zgradiš oltar) +- **Funkcija:** Inženirski nasveti +- **Item:** Inženirska ura (najdi za trigger) + +### **Elena Marković (Mama):** +- **Status:** Mrtva (Dan 3) +- **Duh:** Force Ghost (ko zgradiš oltar) +- **Funkcija:** Biološki nasveti (kmetovanje) +- **Item:** Medaljon (najdi za trigger) + +### **Družinski Oltar:** +- **Location:** Na kmetiji (8×8 center) +- **Build Cost:** 20 Stone, 10 Wood, 2 Candles +- **Effect:** Duhovi se pojavijo +- **Buff:** "Parental Love" (+10% Energy regen) +- **Unlock:** Faza 1 + +## 🧟 GRONK + +### **Osnovni Podatki:** +- **Ime:** Gronk +- **Tip:** **TROL** (udomačen velikan) +- **Status:** Prvi pomočnik (Mentor) +- **Unlock:** Faza 1 (Demo: Locked) + - **Special:** Prvih 20 kupcev + Streamerji → dobi Gronka TAKOJ + +### **Videz:** +- **Lasje:** Roza dreadlocksi +- **Special:** Vape v ustih (permanent) +- **Stil:** Chill Troll +- **Companion:** **Susi (Jazbečarka)** + - OBA spita v **HLEVU** (Barn) na senu. + - Susi spi pri Gronkovih nogah. +- **Funkcija:** Helper + Tutorial NPC +- **Vibe:** "Chill stric" +- **Speech:** "Gronk... pomaga... šefu..." +- **Funkcija:** Tutorial NPC + helper + +### **Dialogues:** +``` +GRONK: "Gronk... pomaga šefu?" +KAI: "Ja, Gronk. Pomagaš mi." +GRONK: "Gronk... dober?" +KAI: "Najboljši trol." +``` + +--- + +# ŽIVALI + +## 🐾 DIVJE ŽIVALI (Škodljivci & Meso) + +### **1. VRANA (Crow):** +- **HP:** 10 +- **Behavior:** Krade semena z farms +- **Spawn:** Naključen, če ni Strašila +- **Counter:** Strašilo (Scarecrow) +- **Drop:** Feather × 1-2 +- **Meso:** Ne (too small) + +### **2. RAKUN (Raccoon):** +- **HP:** 30 +- **Behavior:** Brska po **Kontejnerju za Smeti** (NE po skrinjah!) +- **Spawn:** Nočni (night only) +- **Counter:** Kontejner za smeti (dumpster) + - Če ga imaš → Rakun tam + - Če ne → Rakun brska random +- **Drop:** Fur × 1, lahko rare item +- **Meso:**Raw Raccoon Meat (cook → Grilled Raccoon) + +### **3. VOLK (Wolf):** +- **HP:** 80 +- **Damage:** 20 +- **Behavior:** Napada v gozdu (aggressive) +- **Spawn:** Forest edge, Fog of War +- **Counter:** Weapons, avoid at night +- **Drop:** Wolf Pelt × 1, Wolf Tooth × 1-3 +- **Meso:** Raw Wolf Meat (cook → Grilled Wolf) + +### **4. ZAJEC (Rabbit) - iz GAME_BIBLE:** +- **HP:** 5 +- **Behavior:** Beži (flees from player) +- **Spawn:** Grassland (common) +- **Drop:** Rabbit Fur × 1 +- **Meso:** Raw Rabbit Meat (cook → Grilled Rabbit) + +### **5. KAČA (Snake):** +- **Tip:** Skrita v visoki travi (Grassland, Forest) +- **Varianata A:** **Navadna (Grass Snake):** + - **Behavior:** Beži. + - **Drop:** Snake Skin (usnje). +- **Varianata B:** **STRUPENJAČA (Viper) ☠️:** + - **Behavior:** Ugrizne če stopiš gor! + - **Effect:** Poison (HP drain). + - **Cure:** Antidote (craft: Aloe + Charcoal). + - **Tameable:** DA! (V Fazi 2). + - **Collect:** Lahko jo ujameš v **TERARIJ**. + +## 🐄 DOMAČE ŽIVALI (Nakup - Faza 1) + +### **Nakup Sistem:** +- **Delivery:** Pride v **ŠKATLI** na rob farme +- **Spol:** Random (50/50 male/female) - **RABIŠ PAR ZA BREEDING!** +- **Cena:** Varies per animal + +### **1. KURA (Chicken) & PETELIN (Rooster):** +- **Cena:** 500g +- **Produce:** Egg × 1 per day (Kura only) +- **Breeding:** Kura + Petelin = Piščanec (Chick) +- **Housing:** **KOKOŠNJAK (Coop)** + +### **2. KRAVA (Cow) & BIK (Bull):** +- **Cena:** 3000g +- **Produce:** Milk × 1 per day (Krava only) +- **Breeding:** Krava + Bik = Tele (Calf) +- **Housing:** Hlev (Barn) + +### **3. PUJSA (Sow) & MERJASEC (Boar):** +- **Cena:** 2000g +- **Produce:** Truffle hunting (Oba) +- **Breeding:** Pujsa + Merjasec = Pujsek (Piglet) +- **Housing:** Hlev (Barn) + +## 🦅 NPC ŽIVALI (Gozdni Kurirji) + +### **SOVA (Owl):** +- **Ime:** The Owl +- **Funkcija:** Prinese Quest Nagrade + darila +- **Timing:** Dnevni (day delivery) +- **Later:** Museum keeper (Faza 2) + +### **NETOPIR (Bat):** +- **Funkcija:** Prinese Pošto in Račune +- **Timing:** Nočni (night delivery) +- **Vibe:** Creepy but helpful + +--- + +# RASTLINE & KMETOVANJE + +## 🌾 DEMO CROPS (2 Basic + 1 Special) + +### **1. PŠENICA (Wheat):** +- **Growth Time:** 3 dni +- **Seasons:** Pomlad, Poletje, Jesen +- **Water:** Daily (DIE if skip 1 day!) +- **Yield:** 1-3 wheat per plant +- **Use:** Bread, flour, sell +- **Seed Cost:** 10g +- **Sell Price:** 30g per wheat + +### **2. KORENJE (Carrot):** +- **Growth Time:** 4 dni +- **Seasons:** Pomlad, Poletje +- **Water:** Daily (DIE if skip 1 day!) +- **Yield:** 1-2 carrots per plant +- **Use:** Food, cooking, sell +- **Seed Cost:** 15g +- **Sell Price:** 40g per carrot + +### **3. KONOPLJA (Cannabis Sativa) - SPECIAL:** +- **Growth Time:** 7 dni +- **Seasons:** Pomlad, Poletje +- **Water:** Daily! +- **Yield:** 3-5 buds per plant +- **Use:** **GLAVNI ZASLUŽEK (main money maker!)** +- **Seed Cost:** 50g +- **Sell Price:** 200g per bud +- **Economy:** "Začetni kapital" - kako survivaš v Demu +- **Legal:** It's post-apocalypse, no laws! 🌿 + +## 🌱 FAZA 1 DODATNE CROPS + +### **Unlock:** Po popravilu Rastlinjaka + +### **Winter Crops:** +- **Zimski Krompir:** 6 dni, zima only +- **Zimska Pšenica:** 5 dni, zima only + +### **Special Crops (80+ total v Fazi 1):** +- **Sončnice:** Bio-Oil production +- **Gobe (Mushrooms):** Indoor (klet/basement) +- **Dodatne:** Unlock through exploration + +## 🌳 DREVES & WOOD + +### **Tree Types:** +- **Majhno Drevo:** 3× wood, chop +- **Veliko Drevo:** 10× wood, chop + +## 🦋 ZBIRKA & LOVLJENJE (Collector's System) + +### **1. LOVLJENJE INSEKTOV (Bug Catching):** +- **Orodje:** 🕸️ **Mreža (Bug Net)** +- **Craft:** 5 Wood + 5 Silk (pajčevina) +- **Mehanika:** Opremi Mrežo → Pritisni SPACE ko si blizu. +- **Stealth:** Hodi počasi (drži SHIFT), da jih ne splašiš! + +### **Čebelji Sistem (Bee System):** +1. **Divji Panj (Wild Hive):** + - **Lokacija:** Na drevesih v Gozdu. + - **Drop:** Med, Vosek, Satje (Honeycomb). + - **Rare Drop:** **Matica (Queen Bee)** - nujna za domači čebelnjak! +2. **Domači Čebelnjak (Apiary):** + - **Craft:** 20 Wood + 5 Honeycomb + 1 Queen Bee. + - **Function:** Proizvaja Med vsake 3 dni. + - **Bonus:** Opraševanje (hitrejša rast rož v bližini). + +#### **Seznam Insektov (Faza 1):** +| Ime | Sezona | Ura | Lokacija | Rarity | Uporaba | +| :--- | :--- | :--- | :--- | :--- | :--- | +| **Beli Metulj** | Pomlad/Poletje | Dan | Travnik | Common | Decoration | +| **Modri Morpho** | Poletje | Dan | Gozd | Rare | Sell (High Value) | +| **Monarh** | Jesen | Dan | Travnik | Uncommon | Sell | +| **Čebela (Aviator)** | Pomlad/Poletje | Dan | Rože | Common | Honey | +| **Matica (Queen Bee)** | Pomlad | Dan | Panj | **LEGENDARY** | Craft: Apiary | +| **Kresnička** | Poletje | 20:00-02:00 | Gozd | Common | Lantern fuel | +| **Hrošč Rogač** | Poletje | Noč | Drevesa | Rare | Strong bait | +| **Deževnik** | Pomlad/Jesen | Dež | Zemlja | Common | Fishing Bait | +| **Komar** | Poletje | Noč | Voda | Annoying | None (Bite!) | +| **Pajek (Hišni)** | Vse | Noč | Hiša/Klet | Common | Cobwebs | +| **Ptičji Pajek (Tarantula)** | Poletje | Noč | Puščava/Gozd | **RARE** | Exotic Pet / Poison | +| **Muha (Fly)** | Pomlad-Jesen | Dan | Smeti/Gnoj | Common | Frog Bait | +| **Mušica (Gnat)** | Poletje | Vse | Sadje/Vlaga | Common | Swarm (Annoying) | + +### **2. RIBOLOV (Fishing):** +- **Orodje:** 🎣 **Ribiška Palica (Fishing Rod)** +- **Craft:** 10 Wood + 2 Iron + 5 String +- **Mehanika:** Vrzi trnek (drži SPACE) → Čakaj na ! → Minigame. +- **Voda:** + - **Ocean:** Slanavodne ribe. + - **Mutant Voda:** Toxic ribe (bioluminescent). + +#### **Seznam Rib (Ocean & Toxic):** +| Ime | Voda | Vreme | Ura | Rarity | +| :--- | :--- | :--- | :--- | :--- | +| **Sardela** | Ocean | Sonce | Dan | Common | +| **Postrv (Trout)** | Ocean | Oblačno | Dan | Common | +| **Brancin (Bass)** | Ocean | Sonce | Jutro/Večer | Uncommon | +| **Som (Catfish)** | Ocean | Dež | Noč | Rare | +| **Piranja** | Toxic/Ocean | Vroče | Dan | Rare (Aggressive!) | +| **Losos (Salmon)** | Ocean | Dež | Vse | Rare | +| **Zlata Ribica** | Ocean | Vse | Vse | **LEGENDARY** | +| **Mutant Riba** | Toxic | Vse | Vse | Common (Glows!) | + +### **3. LOVLJENJE KAČ (Snake Handling):** +- **Orodje:** 🧤 **Debele Rokavice (Gloves)** + Mreža + +### **⭐ ALBUM ZVEZDICE (Star System):** +- **1. Zvezdica (Bronze):** Prvič ko najdeš item. (Faza 1) +- **2. Zvezdica (Silver):** Ko najdeš **VELIK (Large)** primerek. (Faza 2 - Muzej) +- **3. Zvezdica (Gold):** Ko najdeš **GIGANTSKI (Giant)** ali **SHINY** primerek. +- **Nagrada:** Vsaka zvezdica poveča vrednost predmeta in memory XP! +- **Craft:** 5 Leather (koža) + 2 Thread +- **Mehanika:** Brez rokavic = **UGRIZ!** (Poison). Z rokavicami = Safe catch. + +#### **Seznam Kač:** +| Ime | Sezona | Nevarnost | Lokacija | Uporaba | +| :--- | :--- | :--- | :--- | :--- | +| **Navadna Kača** | Pomlad/Poletje | Varna | Travnik | Pet / Skin | +| **Zelena Drevesna** | Poletje | Varna | Gozd | Pet / Terrarium | +| **Gad (Viper)** | Poletje/Jesen | ☠️ STRUP! | Kamenje | Antidote craft | +| **Kobra** | Poletje | ☠️☠️ SMRTNO! | Puščava (Faza 1 rob) | Legendary Loot | + +### **ZBIRKA (Album):** +- **Reward:** Vsak nov vnos = **MEMORY XP!** +- **Completion Bonus:** + - Vsi Insekti: "Bug Master" Badge + Golden Net. + - Vse Ribe: "Master Fisher" Badge + Iridium Rod. + +### **Motorka (Chainsaw) 🪚:** +- **Instant chop!** Any tree size +- **3×3 area** (cuts all surrounding trees) +- **Fuel cost:** -0.5L bencin per tree + +### **Lakserca (Trimmer) 🌿:** +- **Not for trees!** For grass & bushes +- **5×5 area** (clears grass, weeds, grmičevje) +- **Fuel cost:** -0.2L bencin per area + +--- + +# ZOMBI SISTEM + +## 🧟 ZOMBIE CONTROL (Alfa Moč) + +### **Taming:** +- **Key:** SPACE (near zombie) +- **Effect:** Screen flash, zombie podrejen +- **Limit:** + - Demo: Max 3 zombiji + - Faza 1: Max 9 zombijev (Scout + Farmer×3 + Lumberjack×2 + Miner×2 + Porter×1) +- **Leveling:** Zombiji gain XP med delom (Lv 1-10) + +## 🧟 ZOMBIE TYPES & ROLES + +### **DEMO:** +- ✅ **Shambler** - Basic zombie + - Can tame for basic work + - Slow, dumb, but helpful + +### **FAZA 1:** +- ✅ **Scout** (Izvidnik) - Fog explorer +- ✅ **Farmer** (Kmet) - Zaliva, žanje +- ✅ **Lumberjack** (Gozdar) - Seka drevesa +- ✅ **Miner** (Rudar) - Koplje (Lv 5+ = Iron!) +- ✅ **Porter** (Nosač) - Pobira iz Drop Boxov → Skrinje + +## 🪦 ZOMBIE HOUSING + +### **Grobovi (Graves):** +- **Craft:** 20 Stone + 10 Wood per grave +- **Blueprint:** Najdi v Fog of War (Faza 1) +- **Function:** Zombiji spijo v grobovih +- **Aesthetic:** Creepy but thematic + +--- + +# ZGRADBE + +## 🏗️ DEMO ZGRADBE + +### **1. ŠOTOR (Tent):** +- **Start:** Available Day 1 +- **Function:** + - Sleep (70% energy restore) + - Radio (weather + SOS signals) +- **Upgrade:** Ne + +### **2. CAMPFIRE (Taborni Ogenj):** +- **Craft:** 10 Wood + 5 Stone +- **Function:** + - Basic cooking + - Basic crafting + - Light source +- **Recipes:** Bread, grilled meat, charcoal + +### **3. RAIN CATCHER (Lovilec Deževnice):** +- **Craft:** 20 Wood + 10 Stone +- **Function:** + - Collect rain → čista voda! + - **ESSENTIAL** (edini način za clean water v Demo) +- **Capacity:** 50L +- **Refill:** Automatic when raining + +### **4. DROP BOX (Zabojnik):** +- **Craft:** 30 Wood + 10 Stone +- **Function:** Zombiji deposit resources here (scout, miner, lumberjack) +- **Collection:** Manual or **Porter Zombie** (automated) +- **Locations:** Farm, Mine, Workshop (3× total v Fazi 1) + +### **5. STRAŠILO (Scarecrow):** +- **Craft:** 3 Wood + 10 Wheat +- **Function:** Odganja Vrano (crow) +- **Range:** 5×5 tiles +- **Duration:** Permanent + +## 🏗️ FAZA 1 ZGRADBE + +### **1. LESENA HIŠA:** +- **Unlock:** Faza 1 +- **Function:** + - Sleep (100% energy restore) + - Unlock KLET (Basement) +- **Klet:** + - Storage (extra chests) + - **Grow Room:** Indoor Cannabis/Mushrooms (safe from weather) + +### **2. GARAŽA (Workshop) - RUŠEVINA:** +- **Repair:** 50 Wood + 30 Stone + 10 Scrap +- **Function:** + - Workbench (Smart Inventory - vidi vse skrinje) + - Craft Vehicles (Motorka) + - Craft Machines (Laksarca) + - **Skladišče Goriva:** + - Bencin (red barrels) + - Olje (yellow barrels) + +### **3. RASTLINJAK (Greenhouse) - RUŠEVINA:** +- **Repair:** 40 Wood + 20 Glass + 15 Stone +- **Function:** + - Winter crops work + - 50% faster growth + - Protected from weather + +### **4. HLEV (Barn) - RUŠEVINA:** +- **Repair:** 60 Wood + 25 Stone + 5 Iron +- **Function:** + - Housing: Cows, Pigs + - **Capacity:** 4 large animals (Tier 1) + +### **5. KOKOŠNJAK (Chicken Coop) - RUŠEVINA:** +- **Repair:** 30 Wood + 10 Stone + 5 Scrap +- **Function:** + - Housing: Chickens, Roosters + - **Capacity:** 8 birds (Tier 1) + +### **6. KONTEJNER ZA SMETI (Dumpster):** +- **Craft:** 50 Scrap Metal + 20 Wood +- **Function:** + - Dispose of trash + - **Rakun brska TU** (not random chests!) +- **Benefit:** Keeps raccoons in one place + +### **6. RUDNIK (Mine) - NAJDEŠ:** +- **Location:** Edge of island, v Fog +- **Repair:** 100 Wood + 50 Stone + **Generator** +- **Function:** + - Mining: Coal, Copper, (Iron if Miner Lv 5+) +- **Danger:** Toxic gas, cave-ins + +### **7. PREDELOVALNICA (Processing Plant) - RUŠEVINA:** +- **Status:** Samo temelji (Foundation) v Fazi 1. +- **Lokacija:** Blizu Garaže. +- **Future use (Faza 2):** Factory za masovno proizvodnjo hrane (Canning, Boxing). +- **Current use:** **Veliko Skladišče (Palete)**. + - Lahko odložiš stacke materiala (Les, Kamen) na palete. + +### **8. DRUŽINSKI OLTAR (Family Altar):** +- **Craft:** 20 Stone + 10 Wood per grave +- **Function:** Zombie housing +- **Capacity:** 1 zombie per grave + +### **8. DRUŽINSKI OLTAR (Family Altar):** +- **Craft:** 20 Stone + 10 Wood + 2 Candles +- **Trigger Items:** + - Očetova ura (Inženirska) + - Mamina medaljon +- **Function:** + - Duhovi se pojavijo (Force Ghosts) + - Dajejo nasvete + - Buff: +10% Energy regen + +### **9. GROBOVI (Graves):** +- **Craft:** 20 Stone + 10 Wood per grave +- **Function:** Zombie housing +- **Capacity:** 1 zombie per grave + +--- + +# ORODJA & CRAFTING + +## 🛠️ DEMO ORODJA (Tier 1 - Lesena) + +### **Lesena Motika (Wooden Hoe):** +- **Function:** Till soil for planting +- **Durability:** 100 uses +- **Speed:** Normal +- **Start:** V skrinji + +### **Lesena Sekira (Wooden Axe):** +- **Function:** Chop trees +- **Durability:** 100 uses +- **Speed:** Normal +- **Start:** V skrinji + +### **Lesena Zalivalka (Wooden Watering Can):** +- **Function:** Water crops (ESSENTIAL!) +- **Capacity:** 10L +- **Refill:** Rain Catcher +- **Start:** V skrinji + +### **9. TERARIJ (Terrarium):** +- **Craft:** 20 Glass + 10 Wood + 2 Iron +- **Function:** + - **Showcase:** Postavi ulovljenega Insekta ali Kačo notri. + - **Decoration:** Dvig "Home Rating". + - **Variante:** Majhen (Metulji), Srednji (Hrošči), Velik (Kače). + +### **10. AKVARIJ (Simple Aquarium):** +- **Craft:** 30 Glass + 5 Sand + 2 Water Plant +- **Function:** + - Showcase za Ulovljene Ribe (Faza 1). + - Fish swim inside. + +### **1. MOTORKA (Chainsaw) 🪚:** +``` +Craft v Garaži: +- Motor × 1 (Scout najde) +- Veriga × 1 (Scout najde) +- Glava (Blade) × 1 (Scout najde) +- Bencin × 5L (Scout najde) + +Time: 1 dan + +Stats: +- **DRVA (TREES):** Instant chop! +- Cuts 3×3 area (all trees) +- Fuel: -0.5L per tree +- Durability: 50 trees +- Replaces axe +``` + +### **2. LAKSARCA (Trimmer) 🌿:** +``` +Craft v Garaži: +- Motor × 1 (Scout najde) +- Rotating Head × 1 (Scout najde) +- Palica (Handle) × 1 (Scout najde) +- Bencin × 3L (Scout najde) + +Time: 6 ur + +Stats: +- **TRAVA & GRMIČEVJE:** Instant clear! +- Cuts 5×5 area (grass, bushes, weeds) +- Fuel: -0.2L per area +- Durability: 100 uses +- Keeps farm tidy +``` + +### **3. KRAMP (Pickaxe - Wooden):** +- **Function:** Mining +- **Durability:** 50 uses +- **Speed:** Slow +- **Craft:** 5 Wood + 3 Stone + +### **4. DELOVNA MIZA (Workbench):** +- **Craft:** 50 Wood + 20 Stone + 5 Iron +- **Function:** + - **Smart Inventory (vidi VSE skrinje v bližini!)** + - Advanced crafting station. + - Machine assembly point. + +### **5. SVEČA (Candle):** +- **Craft:** 1 Vosek (Wax) ali Mast (Fat) + 1 Vrvica (String) +- **Use:** Light source, **Oltar requirement**. +- **Burn Time:** 1 noč. + +### **6. VRVICA (String):** +- **Craft:** 2 Plant Fiber (trava) ali Spider Web. +- **Use:** Fishing Rod, Candle, Bow. + +--- + +# VODA & PREŽIVETJE + +## 💧 VODNI SISTEM + +### **Dirty Water (Toxic):** +- **Vsi naravni viri:** Reke, jezera, mlake +- **Effect on Player:** + - Zastrupitev + - HP loss over time (−10 HP per minute) + - Need antidote or wait +- **Effect on Crops:** + - Mutant rastline + - Weird colors (purple, green) + - Neuporabne za hrano + - Dobre za bio-fuel production + +### **Clean Water Sources:** + +#### **Demo:** +- 🌧️ **Rain Catcher ONLY!** + - Must build immediately + - Collects rain when it rains + - Capacity: 50L + +#### **Faza 1:** +- 🌧️ **Rain Catcher** (still best) +- 💧 **Water Filter:** + - Craft: 10 Charcoal + 20 Sand + 5 Stone + - Converts Dirty → Clean (50L per filter) + - Enables river water use! + +## 🔥 ENERGY SISTEM + +### **Max Energy:** 100% + +### **Drain:** +- Walking: -0.5% per minute +- Running: -1% per minute +- Working (farm, chop, mine): -1% per action +- Fighting: -2% per attack + +### **Restore:** +- **Sleep:** + - Šotor: 70% + - Hiša: 100% +- **Food:** + - Kruh: +10% + - Jabolko: +5% + - Grilled Meat: +20% + - Cannabis: −10% (don't eat it! Sell it!) + +### **Low Energy (<20%):** +- Slow movement (50% speed) +- Can't run +- Can't fight effectively + +--- + +# SISTEMI + +## ⚙️ CORE SISTEMI (Implementirati za Demo) + +### **1. Kmetovanje (Farming):** +- **Plant:** Pritisni E na obdelano zemljo +- **Water:** **VSAK DAN** (ali rastline umrejo!) +- **Harvest:** Ko zreste (pšenica 3 dni, korenje 4 dni) +- **Yield:** 1-3 items per plant (random) +- **Dirty Water:** Mutant rastline (bio-fuel) + +### **2. Zombi Kontrola (Zombie Taming):** +- **Trigger:** Pritisni SPACE blizu zombija +- **Alfa Moč:** Screen flash, zombie podrejen +- **Limit:** + - Demo: Max 3 + - Faza 1: Max 8 +- **Assign Task:** Interact z zombijem → izberi delo + +### **3. Crafting:** +- **Location:** + - Campfire (basic) - Demo + - Garaža/Workbench (advanced) - Faza 1 +- **UI:** Crafting menu (C key) +- **Time:** Real-time crafting (must wait!) + +### **4. Day/Night Cycle:** +- **Day Length:** 20 real minutes +- **Night:** + - Zombiji 2× močnejši + - Več spawns + - Rakun aktiven + - Netopir prinese pošto +- **Sleep:** Šotor/Hiša → skip to morning + +### **5. Energy System:** +- **Max:** 100% +- **Drain:** varied by action +- **Restore:** Sleep, food, rest +- **Low Energy:** <20% = penalties + +### **6. Twin Bond:** +- **Always Active:** Pasivni sistem +- **Messages:** Random Ana messages (1 per day chance) +- **Visual:** Purple glow na HUD when message +- **Mechanic:** Čutiš Ano (quest marker v Fazi 2+) + +### **7. Weather System:** +- **Radio Forecast:** Predicts tomorrow +- **Rain:** + - Fills Rain Catcher + - Auto-waters crops (bonus!) + - Visual effects +- **Seasons:** + - Pomlad: Normal + - Poletje: Hot (crops need more water) + - Jesen: Normal + - Zima: Cold (only winter crops work bez Greenhouse) + +### **8. Economy:** +- **Currency:** Gold (g) +- **Earn:** + - Sell crops + - **Cannabis = main money** + - Sell animal products + - Quests +- **Spend:** + - Seeds + - Animals + - Tools (later tiers) + +--- + +# ASSETS CHECKLIST + +## 🎨 GRAPHICS ASSETS + +### **✅ ŠE IMAŠ:** +- Kai walk animation (1024×1024) +- Gronk walk animation (1024×1024) +- Trees (9 variants) +- Grass & vegetation (5 variants) +- Šotor, Campfire, Sleeping Bag +- Rain Catcher +- Ground tiles +- Water tiles +- UI panels (11+ files) + +### **❌ MANJKA ZA DEMO:** +1. **20 Polaroid Intro Images** (polaroid_01.png - polaroid_20.png) +2. **Kai Animations:** + - `kai_idle_sheet.png` + - `kai_work_sheet.png` (Hoe, Chop, Water) +3. **UI:** + - Trial Version Banner + - Fishing Minigame Bar + +### **❌ MANJKA ZA FAZA 1:** +4. **Zombie Workers:** + - **Porter animation** - **MANJKA** (nov tip!) + - Lumberjack animation (lahko uporabi `zombi_kmet.png`?) +5. **Buildings & Machines:** + - **Water Filter / Desalinator** - **MANJKA** + - **Stiskalnica (Oil Press)** - (Preveri `predelovalni_stroji.png`?) +6. **Items:** + - **Motorka (Chainsaw)** - (Icon obstaja v `orodja_...`, manjka world sprite?) +7. **Creatures (New):** + - **Tarantula** + - **Piranha** + +### **✅ NAJDENO (Confirmed in /references):** +- **Grobovi:** `objekt_grob_odprt_zombi_postelja.png` +- **Hlev (Barn):** `skedenj.png` +- **Rudnik:** `vhod_rudnik_1_zrušen.png` / `vhod_rudnik_2_popravljen.png` +- **Laksarca:** `motorna_kosa.png` +- **Rastlinjak:** `zgradba_rastlinjak_namakanje.png` +- **Kurnik:** `zgradba_kurnik.png` +- **Čebelnjak:** `cebelnjak_orodje_set.png` +- **Kontejner:** `objekt_kontejner_smeti.png` +- **Insekti/Ribe/Kače:** Vsi osnovni seti so prisotni (`..._set.png`). + +## 🔊 AUDIO ASSETS + +### **❌ VSE MANJKA (PRIORITETA NIZKA):** +- Menu theme music +- Day ambient +- Night ambient +- Footsteps SFX +- Tree chop SFX +- Zombie groan SFX +- Plant harvest SFX +- Rain SFX +- Radio static + synthwave music + +--- + +# 📝 PRODUCTION CHECKLIST + +## ✅ DEMO PRIORITIES (Launch Critical): + +### **HIGH:** +1. ❌ 20 Polaroid intro images +2. ❌ Farming system (plant/water/harvest) +3. ❌ Zombie taming mechanic (SPACE key) +4. ❌ Basic UI (health, energy, trial banner) +5. ❌ Start inventory system +6. ❌ Day/night cycle +7. ❌ Amnezija blur effect +8. ❌ Rain Catcher mechanics +9. ❌ Cannabis crop growth +10. ❌ Dirty water system + +### **MEDIUM:** +11. ❌ Wild animals (Vrana, Rakun, Volk, Zajec) +12. ❌ Strašilo mechanics +13. ❌ Weather forecast (Radio) +14. ❌ Twin Bond messages +15. ❌ Energy system + +### **LOW:** +16. ❌ Sound effects +17. ❌ Music +18. ❌ Save/Load +19. ❌ Settings menu + +## ✅ FAZA 1 PRIORITIES: + +### **HIGH:** +1. ❌ Fog of War system +2. ❌ Scout Zombie (scavenging + fog reveal) +3. ❌ Ruševine (Garaža, Rastlinjak, Hlev) +4. ❌ Crafting recipes (Motorka, Laksarca, Filter) +5. ❌ Generator system (bio-oil) +6. ❌ Mining system +7. ❌ Drop Box system +8. ❌ Zombie leveling (Lv 1-10) + +### **MEDIUM:** +9. ❌ 4 Zombie worker types + animations +10. ❌ Workbench (Smart Inventory) +11. ❌ Basement/Grow Room +12. ❌ Animal delivery system +13. ❌ Grobovi (zombie housing) +14. ❌ Kontejner za smeti (Rakun target) + +### **LOW:** +15. ❌ NPC kurirji (Sova, Netopir) +16. ❌ Advanced crops (80+ types) +17. ❌ Quest system +18. ❌ Gronk companion + +--- + +# 🎯 KONEC - VSE INFORMACIJE + +**Status:** ✅ COMPLETE PRODUCTION BIBLE +**Verzija:** ULTIMATE MASTER (9. Februar 2026) +**Uporaba:** TA DOKUMENT JE ZAKON + +**VSE INFORMACIJE O DEMO & FAZI 1 SO TUKAJ!** 🎮✨ + +Za dodatne detajle glej: +- `/docs/FINAL_MASTER_DEMO_FAZA1_SPEC.md` - Original koncept +- `HARD_IZPISEK_CLEAN_START.md` - Quick reference +- `COLLECTORS_ALBUM_SYSTEM.md` - Crop details +- `GAME_BIBLE_FINAL_2026.md` - Full game spec +- `DEMO_FAZA1_ASSET_INVENTORY.md` - Asset status + +--- + +*"Twin Bond. Zdaj in vedno."* 💜 + +**GENERATOR:** Bio-Oil powered (Sončnice → Oil Press) +**MOTORKA & LAKSARCA:** Scout najde dele, sestaviš v Garaži +**3 DIVJE ŽIVALI:** Vrana (crow), Rakun (raccoon), Volk (wolf) +**CANNABIS:** Main money maker v Demu! diff --git a/nova farma TRAE/dokumentacija/DEMO_FAZA1_MASTER_SPEC.md b/nova farma TRAE/dokumentacija/DEMO_FAZA1_MASTER_SPEC.md new file mode 100644 index 000000000..2283e9e74 --- /dev/null +++ b/nova farma TRAE/dokumentacija/DEMO_FAZA1_MASTER_SPEC.md @@ -0,0 +1,739 @@ +# 🎮 DEMO & FAZA 1 - MASTER SPECIFIKACIJA +**MRTVA DOLINA (Krvava Žetev)** + +**Verzija:** 2.0 FINAL +**Datum:** 9. Februar 2026 +**Status:** Production Reference Document + +--- + +## 📋 KAZALO + +1. [DEMO SPECIFIKACIJA](#demo-specifikacija) +2. [FAZA 1 SPECIFIKACIJA](#faza-1-specifikacija) +3. [OTOK & OKOLJE](#otok--okolje) +4. [LIKI & ZGODBA](#liki--zgodba) +5. [SISTEMI & MEHANIKE](#sistemi--mehanike) +6. [ASSETS POTREBŠČINE](#assets-potrebščine) +7. [UI & KONTROLE](#ui--kontrole) + +--- + +# DEMO SPECIFIKACIJA + +## 🏁 CILJ DEMO-JA +**Preživi 200 dni** → Achievement "Trmasti Preživeli" 🏆 + +## 🏝️ OKOLJE + +### **Otok (Island):** +- **Velikost:** 2560 × 2560 px +- **Tile Grid:** 20 × 20 tiles @ 128px/tile +- **Oblika:** Jagged/nazobčan obod (40 vertices, 50px jitter) +- **Material:** Rjava zemlja (brown ground) +- **Centralna Luknja:** Brez tal v centru (hole) + +### **Ocean:** +- **Velikost:** 10000 × 10000 px (veliko večji od otoka) +- **Barva:** #001d3d (Deep Blue) +- **Physics:** Deadly - ne moreš plavati! +- **Camera View:** Vidiš ocean okrog otoka + +### **Pozicija:** +- **Island Offset:** X=3720, Y=3720 (center sveta) +- **Physics Bounds:** Samo otok (hard stop na robu) +- **Camera Bounds:** Celoten svet (10000×10000) + +## 🎯 MAPA & OBMOČJE + +### **Playable Area:** +- **Samo Farma:** 8×8 area na otoku +- **Fog of War:** Vse ostalo zaprto/nevidno +- **Exploration:** 0% (zaklenjeno do Faze 1) + +## 🛠️ OMEJITVE + +### **Bivanje:** +- ⛺ **Samo ŠOTOR** (tent) +- 🏠 **Hiša:** ZAKLENJENA (unlock v Fazi 1) +- 🔥 **Ogenj:** Campfire (za cooking) + +### **Orodja:** +- 🪓 **Samo LESENA (Tier 1)** + - Lesena Motika (Wooden Hoe) + - Lesena Sekira (Wooden Axe) + - Lesena Zalivalka (Wooden Watering Can) +- ⚒️ **Kovinska:** ZAKLENJENA + +### **Zombiji:** +- 🧟 **Samo SHAMBLER** (basic zombie) + - Počasni (slow) + - Ne evolvirajo + - Lahko jih udomačiš (Alfa Moč) + - Max 3 zombiji naenkrat + +### **Voda:** +- 💧 **VSA VODA JE STRUPENA!** + - Reke: Dirty Water (toxic) + - Jezera: Toxic + - Ocean: Deadly +- 🌧️ **Čista voda:** + - Samo deževnica (Rain Catcher) + - Če piješ dirty water → zastrupitev + - Če zalivaš z dirty water → mutant rastline (neuporabne za hrano) + +## 🌱 KMETOVANJE + +### **Posadljive Rastline:** +1. 🌾 **Pšenica (Wheat)** - 3 dni rasti +2. 🥕 **Korenje (Carrot)** - 4 dni rasti + +### **Semenski:** +- **Start Inventory:** 10× Pšenica, 5× Korenje +- **Več semen:** Samo iz pridelka (harvest) + +## 📦 START INVENTORY + +**Kai (14 let) se prebudi z:** +- 👕 Cunje (rags) +- 🍞 Kruh (bread) × 1 +- 🍎 Jabolko (apple) × 1 +- 🔦 Bakla (torch) × 1 +- 🌾 Semena: Pšenica × 10, Korenje × 5 +- 🎒 Prazen ruksak (empty slots) + +## 🎬 INTRO SEKVENCA + +### **20 Polaroid Slik:** +1. "Družina (Pred Virusom)" +2. "Marko v Laboratoriju" +3. "Izbruh (Red Alert)" +4. "Kaos na Ulicah" +5. "Naš Dom (Obkoljen)" +6. "Oče se Bori" +7. "Mama Pada" +8. "Kai Ugriznjen" +9. "Ana Ugrabljena" +10. "Veliki Trol Kralj" +11. "Sam" +12. "Alfa Moč" +13. "Prvi Kontroliran Zombi" +14. "Pobeg" +15. "Potovanje" +16. "Najdena Dolina" +17. "Opuščena Kmetija" +18. "Prvi Semenski" +19. "Twin Bond" +20. "Obljuba" + +### **Prebujanje:** +- Kai se prebudi v **spalni vreči** (sleeping bag) +- **Blur Effect:** Vid zamegljen (amnezija) +- **Prvi Memory Fragment:** Razjasni vid +- **Twin Bond Signal:** Čutiš Ano (šibek signal) + +## 🧠 AMNEZIJA SISTEM + +### **Spomini (Flashbacks):** +- **Trigger:** Bližina spominskih predmetov +- **Effect:** Screen glitch/pulse → Polaroid flash +- **Napredek:** Vsak flashback restore malo spomina + +### **Memory Fragments:** +1. "Srečni Časi" (družina) +2. "Očetov Laboratorij" (virus warning) +3. "Zadnji Večerni" (Ana rojstni dan) + +--- + +# FAZA 1 SPECIFIKACIJA + +## 🚀 UNLOCK POGOJ +**Preživi 200 dni v DEMO** → Unlock Faza 1 + +## 🗺️ ODPRTJE SVETA + +### **Fog of War:** +- ✅ **Megla se odpre!** +- 🔍 **Raziskovanje:** Aktivno +- 🧟 **Zombi Izvidnik (Scout):** KLJUČNA mehanika! + +### **Nove Lokacije:** +- 🏚️ **Ruševine:** Garaža, Rastlinjak, Hlev (popravljaš jih!) +- 🏞️ **Raziskuj:** Forest, Swamp, Desert areas (začetek) +- ⛏️ **Mine:** Majhen rudnik (Baker, Coal) + +## 🧟 ZOMBI IZVIDNIK (Scout) + +### **Funkcija:** +- **Edini zombi** ki gre v Fog of War! +- **Scavenge:** Išče dele, material, resources +- **Avtomatski:** Pošlješ ga, vrne se čez nekaj časa + +### **Najde:** +- 🔧 **Motor Delen** (za motorko) +- ⛓️ **Verige** (za laksarco) +- 🛢️ **Bencin** (fuel za motorko) +- 🪨 **Scrap Metal** (za repair) +- 📦 **Random Items** (tools, seeds) + +### **Risk:** +- ⚠️ **10% chance** da ne pride nazaj (lost in fog) +- ⏰ **Čas:** 1-3 in-game days za return + +## 🏚️ RUŠEVINE (Repairs, ne Building!) + +### **1. Garaža (Garage):** +- **Repair Cost:** + - 50 Wood + - 30 Stone + - 10 Scrap Metal +- **Time:** 2 dni +- **Unlock:** Crafting Delovna Miza (Workbench) +- **Funkcija:** Repair tools, craft vehicles + +### **2. Rastlinjak (Greenhouse):** +- **Repair Cost:** + - 40 Wood + - 20 Glass (iz scrap) + - 15 Stone +- **Time:** 2 dni +- **Unlock:** Advanced farming (več crop types) +- **Funkcija:** Faster growth (50% boost) + +### **3. Hlev (Barn):** +- **Repair Cost:** + - 60 Wood + - 25 Stone + - 5 Iron +- **Time:** 3 dni +- **Unlock:** Žival housing (prihodnji update) +- **Funkcija:** Storage + animal care + +## 🔧 CRAFTING (Novi Recepti) + +### **1. Motorka (Motorcycle):** +``` +Potrebuješ: +- Motor × 1 (Scout najde) +- Veriga × 1 (Scout najde) +- Ohišje × 1 (Scout najde) +- Bencin × 5L (Scout najde) + +Crafting Time: 1 dan +Crafting Location: Garaža + +Funkcija: +- Speed boost: 3× hitrejši travel +- Fuel: -1L na 1km +- Durability: 100 uses +``` + +### **2. Laksarca (Chainsaw):** +``` +Potrebuješ: +- Motor × 1 +- Glava (Blade) × 1 +- Palica (Handle) × 1 +- Bencin × 3L + +Crafting Time: 6 ur +Crafting Location: Garaža + +Funkcija: +- Drevo: 1-shot (instant chop!) +- Fuel: -0.5L per tree +- Durability: 50 trees +``` + +### **3. Vodni Filter (Water Filter):** +``` +Potrebuješ: +- Oglje (Charcoal) × 10 +- Pesek (Sand) × 20 +- Kamenje (Stone) × 5 + +Crafting Time: 2 uri +Crafting Location: Campfire + +Funkcija: +- Dirty Water → Clean Water +- 1 Filter = 50L čiste vode +- Unlock: Pitje iz reke! +``` + +## ⛏️ RUDARJENJE (Mining) + +### **Dostopno:** +- 🪨 **Baker (Copper):** Common +- 🪵 **Premog (Coal):** Common +- ⚙️ **Železo (Iron):** REDKO (samo iz scavenging!) + +### **Zaklennjeno (Faza 2+):** +- 🥈 Silver +- 🥇 Gold +- 💎 Gems + +### **Mine Lokacija:** +- **Small Mine:** 5×5 area na edge of island +- **Minecart:** Rail system (unlock v Fazi 2) +- **Danger:** Toxic gas pockets (need mask!) + +## 🧟 NOVI ZOMBI TIPI + +### **IZVIDNIK (Scout):** +- **HP:** 50 +- **Speed:** Fast +- **Function:** Scavenge fog of war +- **Limit:** Max 1 naenkrat + +### **KMET (Farmer):** +- **HP:** 30 +- **Speed:** Slow +- **Function:** Zaliva, žanje +- **Limit:** Max 3 naenkrat + +### **GOZDAR (Lumberjack):** +- **HP:** 40 +- **Speed:** Normal +- **Function:** Seka drevesa +- **Limit:** Max 2 naenkrat + +### **RUDAR (Miner):** +- **HP:** 60 +- **Speed:** Slow +- **Function:** Koplje (Lv 5+ najde Iron!) +- **Limit:** Max 2 naenkrat + +## 📦 DROP BOX SISTEM + +**Zombiji ne nosijo direktno v tvoje skrinje!** + +### **Delovanje:** +1. Zombi naredi delo (tree chop, harvest, mine) +2. Resource gre v **DROP BOX** (poseben zabojnik) +3. **Ti** pobereš iz Drop Box → Inventory +4. **Razlog:** Balance (ne preveč easy) + +### **Drop Box Lokacije:** +- Pri Workshopu (1× box) +- Pri Mine Entrance (1× box) +- Pri Farmi (1× box) + +--- + +# OTOK & OKOLJE + +## 🏝️ TEHNIČNE SPECIFIKACIJE + +### **Island Dimensions:** +```javascript +TILE_SIZE = 128 px +ISLAND_WIDTH_TILES = 20 +ISLAND_HEIGHT_TILES = 20 + +ISLAND_W = 2560 px (20 × 128) +ISLAND_H = 2560 px (20 × 128) +``` + +### **World Dimensions:** +```javascript +WORLD_W = 10000 px +WORLD_H = 10000 px + +ISLAND_X = 3720 px (center offset) +ISLAND_Y = 3720 px (center offset) +``` + +### **Island Shape:** +```javascript +VERTEX_COUNT = 40 // detail vertices +JITTER = 50 // edge roughness (px) +``` + +### **Camera:** +```javascript +Default Zoom: 0.8 +Zoom Range: 0.2 - 5.0 +Background: #001d3d (Deep Blue Ocean) +``` + +## 🌍 BIOMI (Faza 1 Preview) + +### **Dostopno:** +- 🌾 **Grassland:** Otok je grassland biome +- 🌲 **Forest Edge:** Robovi otoka (trees) + +### **Vidno v Fog:** +- 🌿 **Swamp:** Vidiš v daljavi (zaklennjeno) +- 🏜️ **Desert:** Vidiš v daljavi (zaklennjeno) +- 🏔️ **Mountain:** Vidiš peak (zaklennjeno) + +--- + +# LIKI & ZGODBA + +## 👤 KAI MARKOVIĆ + +### **Osnovni Podatki:** +- **Ime:** Kai Marković +- **Starost:** 14 let +- **Status:** Alpha Hybrid (imun na virus) +- **Posebnost:** Zombie Master (kontrolira zombije) + +### **Videz:** +- **Lasje:** Pink/Zeleni dreadlocksi +- **Stil:** Dark-Chibi Noir +- **Outfit:** Raztrgane cunje (rags), later unlock wear + +### **Sposobnosti:** +- 🧟 **Zombie Control:** Lahko udomači zombije +- 🔗 **Twin Bond:** Telepatska povezava z Ano +- 💪 **Alpha Immunity:** Ne postane zombi + +### **Amnezija:** +- **Start:** Ne spomni se vsega! +- **Flashbacki:** Spomini se vračajo skozi igro +- **Memory Pulse:** Screen glitch trigger + +## 👧 ANA MARKOVIĆ + +### **Osnovni Podatki:** +- **Ime:** Ana Marković +- **Starost:** 14 let +- **Status:** UGRABLJENA! (Troll King) +- **Lokacija:** Černobilski Reaktor + +### **Twin Bond:** +- 💜 **Telepatija:** Kai čuti da je živa +- 📡 **Signal:** Random messages (very weak!) +- 🎯 **Main Quest:** Najti jo! + +### **Sporočila:** +``` +"Kai... čutiš me? Sem ujeta... ampak ŽIVIM." +"Ne obupaj... Twin Bond... deluje..." +"Troll me čuva... ampak nisem sama..." +``` + +## 👻 STARŠA (Duhovi) + +### **Marko Marković (Oče):** +- **Status:** Mrtev (Dan 3) +- **Duh:** Force Ghost (ko zgradiš oltar) +- **Funkcija:** Inženirski nasveti +- **Item:** Inženirska ura (najdi za trigger) + +### **Elena Marković (Mama):** +- **Status:** Mrtva (Dan 3) +- **Duh:** Force Ghost (ko zgradiš oltar) +- **Funkcija:** Biološki nasveti (kmetovanje) +- **Item:** Medaljon (najdi za trigger) + +### **Družinski Oltar:** +- **Location:** Na kmetiji (8×8 center) +- **Build Cost:** 20 Stone, 10 Wood, 2 Candles +- **Effect:** Duhovi se pojavijo +- **Buff:** "Parental Love" (+10% Energy regen) + +## 🧟 GRONK + +### **Osnovni Podatki:** +- **Ime:** Gronk +- **Tip:** Zombi (udomačen) +- **Status:** Prvi pomočnik + +### **Videz:** +- **Lasje:** Roza dreadlocksi +- **Special:** Vape v ustih (permanent) +- **Stil:** Chill zombie + +### **Osebnost:** +- **Vibe:** "Chill stric" +- **Speech:** "Gronk... pomaga... šefu..." +- **Funkcija:** Tutorial NPC + helper + +### **Dialogues:** +``` +GRONK: "Gronk... pomaga šefu?" +KAI: "Ja, Gronk. Pomagaš mi." +GRONK: "Gronk... dober zombi?" +KAI: "Najboljši zombi." +``` + +--- + +# SISTEMI & MEHANIKE + +## ⚙️ CORE SISTEMI + +### **1. Kmetovanje (Farming):** +- **Plant:** Pritisni E na obdelano zemljo +- **Water:** Vsak dan (ali rastline umrejo!) +- **Harvest:** Ko zraste (pšenice 3 dni, korenje 4 dni) +- **Yield:** 1-3 items per plant + +### **2. Zombi Kontrola (Zombie Taming):** +- **Trigger:** Pritisni SPACE blizu zombija +- **Alfa Moč:** Screen flash, zombie podrejen +- **Limit:** Max 3 zombiji v Demo, 8 v Fazi 1 +- **Assign Task:** Interact z zombijem → izberi delo + +### **3. Crafting:** +- **Location:** Campfire (basic), Garaža (advanced) +- **UI:** Crafting menu (C key) +- **Time:** Real-time crafting (wait!) + +### **4. Day/Night Cycle:** +- **Day Length:** 20 real minutes +- **Night:** Zombiji 2× močnejši, več spawn +- **Sleep:** Šotor → skip to morning + +### **5. Energy System:** +- **Max Energy:** 100% +- **Drain:** -1% per action +- **Restore:** Sleep, eat, rest +- **Low Energy:** <20% = slow movement + +### **6. Twin Bond:** +- **Always Active:** Pasivni sistem +- **Messages:** Random Ana messages (1× per day chance) +- **Visual:** Purple glow na HUD +- **Mechanic:** Čutiš Ano (quest marker later) + +## 🎯 QUEST SISTEMI + +### **Main Quest:** +``` +"NAJDI ANO" +Tvoja sestra je živa. Somewhere. +Twin Bond signal je šibek, ampak present. +Nadaljuj... Ne obupaj. + +Progress: 0% (unlock v Fazi 2+) +``` + +### **Side Quests (Demo):** +``` +1. "Prvi Pridelek" + - Posadi 10 Pšenice + - Reward: +50 XP, Unlock: Scarecrow + +2. "Udomači 3 Zombije" + - Zombie Workforce + - Reward: +100 XP, Unlock: Zombie Barracks + +3. "Najdi Spomine" + - Unlock 3 Flashbacks + - Reward: +200 XP, Partial Vision Restore +``` + +--- + +# ASSETS POTREBŠČINE + +## 🎨 GRAPHICS ASSETS + +### **Characters:** +- ✅ `kai_walk_sheet.png` - 256×256 frames (1024×1024 sheet) +- ✅ `gronk_walk_sheet.png` - 256×256 frames +- ❌ `kai_idle.png` - Idle animation (needed!) +- ❌ `kai_work.png` - Working animation (needed!) + +### **Environment:** +- ✅ `ground_base` (trava_osnova.png) - Tile 512×512 +- ✅ `water_clean_patch.png` +- ✅ `river_tile_seamless.png` +- ✅ `sotor.png` (tent) +- ✅ `taborni_ogenj.png` (campfire) +- ✅ `spalna_vreca.png` (sleeping bag) +- ❌ `rain_catcher.png` (needed!) + +### **Vegetation:** +- ✅ `visoka_trava_v2.png` - 1024×1024 +- ✅ `grass_cluster_dense.png` +- ✅ `bush_hiding_spot.png` +- ❌ `crop_wheat_0.png` through `crop_wheat_3.png` (growth stages - needed!) +- ❌ `crop_carrot_0.png` through `crop_carrot_4.png` (growth stages - needed!) + +### **Trees:** +- ✅ `tree_adult_0.png` through `tree_adult_5.png` (432px height) +- ✅ `drevo_faza_1.png` (small) +- ✅ `drevo_faza_2.png` (medium) +- ✅ `drevo_veliko.png` (large) + +### **UI:** +- ❌ `Trial_Version_Banner.png` (needed!) +- ❌ `heart_full.png` (health UI - needed!) +- ❌ `heart_empty.png` (needed!) +- ❌ `energy_bar_bg.png` (needed!) +- ❌ `energy_bar_fill.png` (needed!) + +### **Intro:** +- ❌ **20 Polaroid images** (all needed!) + - `polaroid_01_family.png` + - `polaroid_02_lab.png` + - ... through... + - `polaroid_20_promise.png` + +## 🔊 AUDIO ASSETS + +### **Music:** +- ❌ `menu_theme.ogg` (needed!) +- ❌ `day_ambient.ogg` (needed!) +- ❌ `night_ambient.ogg` (needed!) + +### **SFX:** +- ❌ `footsteps.ogg` (needed!) +- ❌ `tree_chop.ogg` (needed!) +- ❌ `zombie_groan.ogg` (needed!) +- ❌ `plant_harvest.ogg` (needed!) + +--- + +# UI & KONTROLE + +## 🎮 KONTROLE + +### **Gibanje:** +- **W** - Gor +- **A** - Levo +- **S** - Dol +- **D** - Desno + +### **Akcije:** +- **E** - Interakcija +- **SPACE** - Alfa Moč (udomači zombija) +- **I** - Inventar +- **C** - Crafting Menu +- **M** - Mapa (Faza 1+) +- **ESC** - Pause Menu + +### **Camera:** +- **Mouse Wheel** - Zoom (0.2 - 5.0) +- **Middle Mouse** - Pan camera (optional) + +## 📊 HUD ELEMENTI + +### **Top Left:** +``` +TRIAL VERSION - DEMO FAZA 1 +``` + +### **Top Right:** +``` +DAN 1 - 06:00 +☀️ (day icon) +``` + +### **Bottom Left:** +``` +❤️ ❤️ ❤️ ❤️ ❤️ (5 hearts = 100 HP) +Energija: [████████░░] 85% +``` + +### **Bottom Right:** +``` +[INVENTORY PREVIEW] +Pšenica × 10 +Korenje × 5 +``` + +## 💬 DIALOG SISTEM + +### **Typewriter Effect:** +```javascript +fontSize: '18px' +fontFamily: 'Press Start 2P' +color: '#ffffff' +stroke: '#000000' +strokeThickness: 4 +typewriterSpeed: 50ms per character +``` + +### **Flashback Effect:** +```javascript +fontSize: '16px' +color: '#888888' (gray) +blur: 2px +typewriterSpeed: 70ms (slower for emphasis) +``` + +--- + +# 📝 PRODUCTION CHECKLIST + +## ✅ DEMO READY: +- [x] Otok (island) rendering +- [x] Ocean (water) rendering +- [x] Kai walk animation +- [x] Gronk sprite +- [x] Basic grass/trees +- [ ] Start inventory +- [ ] Intro sequence (20 Polaroids) +- [ ] Amnezija blur effect +- [ ] Farming system +- [ ] Zombie taming +- [ ] Day/night cycle +- [ ] Rain Catcher +- [ ] UI (hearts, energy, trial banner) + +## ✅ FAZA 1 READY: +- [ ] Fog of War unlock +- [ ] Scout Zombie +- [ ] Ruševine (Garaža, Rastlinjak, Hlev) +- [ ] Crafting: Motorka +- [ ] Crafting: Laksarca +- [ ] Crafting: Vodni Filter +- [ ] Mining system +- [ ] Drop Box system +- [ ] 4 Zombie worker types +- [ ] Expanded map + +--- + +# 🎯 PRIORITETE + +## **HIGH PRIORITY (Demo Launch):** +1. ✅ Otok rendering +2. ❌ 20 Polaroid intro images +3. ❌ Farming system (plant/water/harvest) +4. ❌ Zombie taming mechanic +5. ❌ Basic UI (health, energy, trial banner) +6. ❌ Start inventory +7. ❌ Day/night cycle +8. ❌ Amnezija blur effect + +## **MEDIUM PRIORITY (Faza 1):** +1. ❌ Scout Zombie system +2. ❌ Crafting recipes (motorka, laksarca, filter) +3. ❌ Ruševine repair system +4. ❌ Mining +5. ❌ Drop Box +6. ❌ Fog of War unlock + +## **LOW PRIORITY (Polish):** +1. ❌ Advanced animations +2. ❌ Sound effects +3. ❌ Music +4. ❌ Save/Load system +5. ❌ Settings menu + +--- + +# 📖 KONEC DOKUMENTA + +**Status:** ✅ Complete Master Reference +**Verzija:** 2.0 FINAL +**Datum:** 9. Februar 2026 + +**VSE INFORMACIJE O DEMO & FAZI 1 SO TUKAJ!** 🎮✨ + +Za dodatne detajle glej: +- `DEMO_FAZA1_NAPISI_DIALOGI.md` - Dialogi +- `HARD_IZPISEK_CLEAN_START.md` - Quick reference +- `GAME_BIBLE_FINAL_2026.md` - Full game spec + +--- + +*"Twin Bond. Zdaj in vedno."* 💜 diff --git a/nova farma TRAE/dokumentacija/DEMO_FAZA1_NAPISI_DIALOGI.md b/nova farma TRAE/dokumentacija/DEMO_FAZA1_NAPISI_DIALOGI.md new file mode 100644 index 000000000..81d43c9eb --- /dev/null +++ b/nova farma TRAE/dokumentacija/DEMO_FAZA1_NAPISI_DIALOGI.md @@ -0,0 +1,624 @@ +# 📝 DEMO & FAZA 1 - NAPISI IN DIALOGI +**MRTVA DOLINA (Krvava Žetev)** + +**Verzija:** 1.0 +**Datum:** 9. Februar 2026 +**Status:** Production Ready + +--- + +## 📋 KAZALO + +1. [INTRO SEKVENCA](#intro-sekvenca) +2. [TUTORIAL DIALOGI](#tutorial-dialogi) +3. [UI NAPISI](#ui-napisi) +4. [SISTEM SPOROČILA](#sistem-sporočila) +5. [PRVI DNEVI](#prvi-dnevi) +6. [FLASHBACKI](#flashbacki) +7. [GRONK DIALOGI](#gronk-dialogi) + +--- + +# INTRO SEKVENCA + +## 🎬 POLAROID SEKVENCA (20 Slik) + +### Slika 1: "Družina (Pred Virusom)" +**Napis:** +``` +"Pred virusom... bili smo srečni." +``` + +### Slika 2: "Marko v Laboratoriju" +**Napis:** +``` +"Oče je delal na cepilu..." +``` + +### Slika 3: "Izbruh (Red Alert)" +**Napis:** +``` +"Potem je prišel DAN 0..." +``` + +### Slika 4: "Kaos na Ulicah" +**Napis:** +``` +"Svet se je sesula v 48 urah." +``` + +### Slika 5: "Naš Dom (Obkoljen)" +**Napis:** +``` +"DAN 3: Prišli so k nam..." +``` + +### Slika 6: "Oče se Bori" +**Napis:** +``` +"Oče: 'Kai... varuj sestro... beži...'" +``` + +### Slika 7: "Mama Pada" +**Napis:** +``` +"Mama: 'Ana... Kai... ljubiva vaju...'" +``` + +### Slika 8: "Kai Ugriznjen" +**Napis:** +``` +"Ugriznili so me... ampak nisem postal zombi." +``` + +### Slika 9: "Ana Ugrabljena" +**Napis:** +``` +"Ana: 'KAIII! POMAGAJ!'" +``` + +### Slika 10: "Veliki Trol Kralj" +**Napis:** +``` +"Nekega... POŠASTI jo je odnesel." +``` + +### Slika 11: "Sam" +**Napis:** +``` +"Starše mrtvi. Sestra ugrabljena. Sam." +``` + +### Slika 12: "Alfa Moč" +**Napis:** +``` +"Nekaj se je zbudilo v meni..." +``` + +### Slika 13: "Prvi Kontroliran Zombi" +**Napis:** +``` +"Zombiji... me poslušajo?" +``` + +### Slika 14: "Pobeg" +**Napis:** +``` +"Moral sem pobegniti... preživeti..." +``` + +### Slika 15: "Potovanje" +**Napis:** +``` +"7 dni pešačenja skozi peklo..." +``` + +### Slika 16: "Najdena Dolina" +**Napis:** +``` +"Našel sem jo. Mojo dolino." +``` + +### Slika 17: "Opuščena Kmetija" +**Napis:** +``` +"Majhna kmetija. Nov začetek." +``` + +### Slika 18: "Prvi Semenski" +**Napis:** +``` +"Če bom preživel... jo bom našel." +``` + +### Slika 19: "Twin Bond" +**Napis:** +``` +"Čutim jo... Ana je ŽE VEDNO ŽIV." +``` + +### Slika 20: "Obljuba" +**Napis:** +``` +"Prisegli sem... Najti jo bom. Ne glede na ceno." +``` + +--- + +# TUTORIAL DIALOGI + +## 🌾 PRVO KMETOVANJE + +### Sistem Sporočilo: +``` +"Pritisni WASD za premikanje." +``` + +### Ko pristopi k zemlji: +``` +"Pritisni E za interakcijo." +``` + +### Prva saditev: +``` +"SEMENA PŠENICE posajeno. +Potrebujejo 3 dni za rast." +``` + +### Prvo zalivanje: +``` +"Rastline potrebujejo vodo vsak dan. +Pritisni E ob vedru vode." +``` + +--- + +## 🧟 PRVI ZOMBI (GRONK) + +### Ko se pojavi Gronk: +``` +KAI (misli): "Zombi! Ampak... čutim ga. +Lahko ga... kontroliram?" +``` + +### Sistem: +``` +"Pritisni SPACE za uporabo ALFA MOČI. +Zombije lahko 'udomačiš'." +``` + +### Po udomačitvi: +``` +GRONK: "Urrrgh... Kaj... sem?" +KAI: "Ti si... Gronk. Moj pomočnik." +GRONK: "Gronk... pomaga?" +``` + +--- + +## 🏚️ SPALNA VREČA + +### Ko pristopi: +``` +"Pritisni E za spanje. +Spanje restore energijo in preskoči čas." +``` + +### Pri spanju: +``` +"Želiš spati do jutra? +[DA] [NE]" +``` + +### Po spanju: +``` +"DAN 2 +Energija: 100%" +``` + +--- + +# UI NAPISI + +## 📊 HUD ELEMENTI + +### Trial Version Banner: +``` +"TRIAL VERSION - DEMO FAZA 1" +``` + +### Inventar: +``` +"INVENTAR (I)" +``` + +### Energija Bar: +``` +"Energija: 85%" +``` + +### Življenje: +``` +"❤️ ❤️ ❤️ ❤️ ❤️" +``` + +### Dan/Čas: +``` +"DAN 1 - 06:00" +``` + +--- + +## 🎒 INVENTAR NAPISI + +### Kategorije: +``` +[SEMENA] [ORODJE] [MATERIAL] [HRANA] +``` + +### Predmeti: +``` +PŠENIČNA SEMENA +"Osnovna žitarica. Raste 3 dni." +Količina: 10 + +KORENČEK SEMENA +"Zdrava zelenjava. Raste 4 dni." +Količina: 5 + +MOTIKA +"Za kopanje tal." +Trajnost: 80% + +ZALIVALKA +"Za zalivanje rastlin." +Polna: DA +``` + +--- + +# SISTEM SPOROČILA + +## ⚠️ OPOZORILA + +### Nizka energija: +``` +"⚠️ ENERGIJA NIZKA! +Počivaj ali pojej hrano." +``` + +### Potrebna voda: +``` +"⚠️ RASTLINE POTREBUJEJO VODO! +Zalij jih ali bodo odmrle." +``` + +### Ni dovolj prostora: +``` +"❌ INVENTAR POLN! +Sprosti prostor ali prodaj predmete." +``` + +--- + +## ✅ USPEH + +### Prvi pridelek: +``` +"🌾 PRVI PRIDELEK! ++10 Pšenice" +``` + +### Level up: +``` +"⭐ LEVEL UP! +Level 2: Kmetovanje +Unlock: KORENČEK SEMENA" +``` + +### Novo odkritje: +``` +"🔍 NOVO ODKRITJE! +Našel si: OPUŠČENO VAS" +``` + +--- + +# PRVI DNEVI + +## 📅 DAN 1: PRIHOD + +### Zjutraj (06:00): +``` +KAI (misli): "Končno... Nov dom. +Majhna kmetija, ampak dovolj za začetek." +``` + +### Pregled kmetije: +``` +KAI: "Tla so... pravi. +Malo orodja v skednju. +To bo šlo... moram preživeti." +``` + +### Zvečer (20:00): +``` +KAI (misli): "Prvi dan je mimo. +Ana... kjer si že... Čakaj me." +``` + +--- + +## 📅 DAN 2: PRVI ZOMBI + +### Zjutraj: +``` +KAI: "Moram biti previden. +Zombiji so povsod..." +``` + +### Ko pride Gronk: +``` +SISTEM: "⚠️ ZOMBI ZAZNAN!" + +KAI (misli): "Čakaj... Kaj če...?" +[Uporabi Alfa Moč] + +GRONK: "Urrrgh..." +KAI: "Poslušaj me! Ti si... moj!" + +GRONK: "Gronk... posluša... šefa..." +``` + +### Zvečer: +``` +KAI (misli): "Zombi pomočnik. +Nikoli si nisem mislil... +Ampak to pomeni... Imam moč." +``` + +--- + +## 📅 DAN 3: SPOMINI + +### Flash system: +``` +"⚡ FLASHBACK ⚡" +``` + +### Memory fragment: +``` +[Zamegljena slika] +MAMA (glas): "Kai, Ana... nikoli ne pozabita... +ljubiva vaju..." + +KAI (sedaj): "Mama... Oče... +Oprostita mi... še vedno iščem..." +``` + +--- + +# FLASHBACKI + +## 💭 AMNEZIJA SPOMINI + +### Memory 1: "Srečni Časi" +``` +[Zameglj slika družine] +ANA: "Kai! Poglej, našla sem metulja!" +KAI: "Wooow! Daj ga sem!" +[Smeh otrok] + +KAI (sedaj): "Pred virusom... bili smo tako normalni..." +``` + +### Memory 2: "Očetov Laboratorij" +``` +[Zamegljena slika laboratorija] +MARKO: "Kai, nikoli ne dotikaj se teh vzorčkov. +Obljubi mi." +KAI (mlajši): "Obljubim, oče!" + +KAI (sedaj): "Če bi le vedel... kaj bo to povzročilo..." +``` + +### Memory 3: "Zadnji Večerni" +``` +[Zamegljena slika večerje] +ELENA: "Jutri je Ana-jev rojstni dan!" +ANA: "Želim si tort s čokolado!" +VSAKDO: [Smeh] + +KAI (sedaj): "To je bila... zadnja večerja skupaj..." +``` + +--- + +# GRONK DIALOGI + +## 🧟 CONVERSATIONS + +### Prvi pogovor: +``` +GRONK: "Gronk... pomaga šefu?" +KAI: "Ja, Gronk. Pomagaš mi." +GRONK: "Gronk... dober zombi?" +KAI: "Najboljši zombi." +GRONK: *Srečno mrmra* +``` + +### Ko dela na kmetiji: +``` +GRONK: "Gronk... sadi... rastline..." +KAI: "Dobro delo, Gronk!" +GRONK: "Gronk... je... ponosen!" +``` + +### Ko je lačen: +``` +GRONK: "Gronnnnk... želodec... dela zvoke..." +KAI: "Zombiji jedo?!" +GRONK: "Gronk... rad... krompir..." +KAI: "...Resno?" +``` + +### Ko vidi Ano (Twin Bond memory): +``` +GRONK: "Šef... žalosten?" +KAI: "Moja sestra... Pogrešam jo..." +GRONK: "Gronk... pomagal... najti sestro!" +KAI: "Hvala, Gronk. Res si dober prijatelj." +GRONK: "Prijatelj... Gronk... prijatelj!" *Srečen* +``` + +--- + +# 💬 INTERAKCIJE + +## Interakcija z objekti: + +### Studenc: +``` +"Pitna voda. +Pritisni E za piti (restore 20% energije)" +``` + +### Skrinja: +``` +"Stara skrinja. +Pritisni E za odpiranje." +``` + +### Semenski: +``` +"SEMENSKI SEMENA +10x Pšenica | 5x Korenček +Vzemi vse? [DA/NE]" +``` + +--- + +# 🌙 NOČ + +## Nočne misli: + +### Ob ognju: +``` +KAI (misli): "Ogenj gori... Kot tisti dan... +Ampak danes nisem sam. Imam Gronka. +Je to... prijateljstvo? Z zombijem?" +``` + +### Pred spanjem: +``` +KAI: "Ana... Čutiš me? +Twin Bond... Prosim, deluj... +Vem, da si tam nekje..." +``` + +### Twin Bond Signal (Rare): +``` +⚡ TWIN BOND SIGNAL ⚡ +ANA (glas, šibek): "Kai... živa sem..." +KAI: "ANA! Kje si?!" +[Signal izgubljen] +KAI: "Ne! Vrni se! ANA!" +``` + +--- + +# 📖 JOURNAL ENTRIES + +## Kai-jev Dnevnik: + +### Entry 1: +``` +"DAN 1 - Prihod +Našel sem majhno kmetijo. +Ni popolna, ampak je moja. +Začenjam znova. Za Ano." +``` + +### Entry 2: +``` +"DAN 2 - Gronk +Danes sem srečal zombija. +Ampak nisem ga ubil... udomačil sem ga. +Ime sem mu dal Gronk. +Je to noro? Verjetno. Ampak deluje." +``` + +### Entry 3: +``` +"DAN 3 - Spomini +Flashbacki se vračajo. +Vidim mamo, očeta, Ano... +Boli. Ampak tudi opominja... +zakaj moram preživeti." +``` + +--- + +# 🎯 QUEST NAPISI + +## Main Quest: +``` +"NAJDI ANO +Tvoja sestra je živa. Somewhere. +Twin Bond signal je šibek, ampak present. +Nadaljuj... Ne obupaj." +``` + +## Side Quests: + +### "Prvi Pridelek" +``` +"POSADI 10 PŠENICE +Progress: 5/10 +Reward: +50 XP, Unlock: Scarecrow" +``` + +### "Udomači 3 Zombije" +``` +"ZOMBIE WORKFORCE +Progress: 1/3 +Reward: +100 XP, Unlock: Zombie Barracks" +``` + +--- + +# ⚙️ NASTAVITVE BESEDILA + +```javascript +const DIALOG_CONFIG = { + fontSize: '18px', + fontFamily: 'Press Start 2P', + color: '#ffffff', + stroke: '#000000', + strokeThickness: 4, + typewriterSpeed: 50, // ms per character + lineSpacing: 8 +}; + +const FLASHBACK_CONFIG = { + fontSize: '16px', + fontFamily: 'Press Start 2P', + color: '#888888', // Gray for memories + blur: 2, // Blurred effect + typewriterSpeed: 70 // Slower for emphasis +}; +``` + +--- + +# 📝 KONEC DOKUMENTA + +**Status:** ✅ Complete +**Verzija:** 1.0 +**Datum:** 9. Februar 2026 + +**Vse dialogi in napisi za DEMO in FAZA 1 so pripravljeni za implementacijo!** 🎮✨ + +--- + +*"Twin Bond. Zdaj in vedno."* 💜 diff --git a/nova farma TRAE/dokumentacija/HARD_IZPISEK_CLEAN_START.md b/nova farma TRAE/dokumentacija/HARD_IZPISEK_CLEAN_START.md index 44c227aa1..de9ef667c 100644 --- a/nova farma TRAE/dokumentacija/HARD_IZPISEK_CLEAN_START.md +++ b/nova farma TRAE/dokumentacija/HARD_IZPISEK_CLEAN_START.md @@ -10,6 +10,11 @@ Igra je razdeljena na **DEMO** in **10 FAZ** (Roadmap). Trenutni fokus je **Demo ### 🏁 DEMO (The Hook) * **Cilj:** Preživi 200 dni (Achievement "Trmasti Preživeli"). * **Mapa:** Samo **Farma (8x8)**. Ostalo je Fog of War. +* **🏝️ OKOLJE:** Farma je na **OTOKU** obdanem z vodo! + * **Otok:** Okrogel, ~3000px širine. Rjava zemlja (ground). + * **Voda:** Modrа voda okrog otoka (deadly - ne moreš plavat). + * **Luknја:** Centralna luknja v otoku (brez tal). + * **2.5D Pogled:** Isometric diorama stil. * **Omejitve:** * **Bivanje:** Samo **Šotor** (Hiša zaklenjena). * **Orodja:** Samo **Lesena** (Tier 1). diff --git a/nova farma TRAE/src/scenes/GrassScene_Clean.js b/nova farma TRAE/src/scenes/GrassScene_Clean.js index 3c27503d8..9ce6dca5a 100644 --- a/nova farma TRAE/src/scenes/GrassScene_Clean.js +++ b/nova farma TRAE/src/scenes/GrassScene_Clean.js @@ -1,6 +1,10 @@ export default class GrassSceneClean extends Phaser.Scene { constructor() { super({ key: 'GrassSceneClean' }); + + // Class-level constants + this.TILE_SIZE = 128; // Standard grid size + this.GROUND_TILE_SIZE = 128; // Standard grid size (Style 32) } preload() { @@ -16,8 +20,9 @@ export default class GrassSceneClean extends Phaser.Scene { // 3. Foliage // "Divja trava" - samo visoka trava - this.load.image('grass_wild', 'DEMO_FAZA1/Vegetation/visoka_trava.png'); - this.load.image('grass_wild_v2', 'DEMO_FAZA1/Vegetation/visoka_trava_v2.png'); + // UPDATED: Using reference assets + this.load.image('grass_ref_1', 'DEMO_FAZA1/Vegetation/grass_ref_1.png'); + // grass_ref_2.png does NOT exist - removed // 4. Items & Charts this.load.image('hay', 'DEMO_FAZA1/Items/hay_drop_0.png'); @@ -39,10 +44,15 @@ export default class GrassSceneClean extends Phaser.Scene { this.load.image('campfire', 'DEMO_FAZA1/Environment/taborni_ogenj.png'); this.load.image('sign_danger', 'DEMO_FAZA1/Environment/sign_danger.png'); - // Vegetation - const veg = ['bush_hiding_spot', 'drevo_faza_1', 'drevo_faza_2', 'drevo_srednje', 'drevo_veliko', 'grass_cluster_dense', 'grass_cluster_flowery', 'trava_sop']; + // Vegetation - Trees moved to Trees folder + const veg = ['bush_hiding_spot', 'grass_cluster_dense', 'grass_cluster_flowery', 'visoka_trava_v2']; veg.forEach(k => this.load.image(k, `DEMO_FAZA1/Vegetation/${k}.png`)); + // Trees are now in Trees folder + this.load.image('drevo_faza_1', 'DEMO_FAZA1/Trees/drevo_faza_1.png'); + this.load.image('drevo_faza_2', 'DEMO_FAZA1/Trees/drevo_faza_2.png'); + this.load.image('drevo_veliko', 'DEMO_FAZA1/Trees/drevo_veliko.png'); + // Ground (Path) // for (let i = 0; i < 16; i++) { // this.load.image(`path_tile_${i}`, `DEMO_FAZA1/Ground/path_tile_${i}.png`); @@ -73,21 +83,35 @@ export default class GrassSceneClean extends Phaser.Scene { create() { // --- DYNAMIC ASSETS GENERATION --- // Generate 'hole' texture if it doesn't exist - if (!this.textures.exists('hole')) { - const holeGfx = this.make.graphics({ x: 0, y: 0, add: false }); - holeGfx.fillStyle(0x111111); // Almost black - holeGfx.fillCircle(64, 64, 60); - holeGfx.generateTexture('hole', 128, 128); - } + // --- DYNAMIC ASSETS GENERATION --- + // Hole texture generation removed to save memory. + // We will use a direct Graphics object for the hole later. // --- WORLD CONFIGURATION (ISLAND SYSTEM) --- - const TILE_SIZE = 128; // Standard grid size - + // Using class-level TILE_SIZE constant + + // --- 0. PROCEDURAL AUDIO GENERATION --- + // Create Wood Hit Sound + if (!this.cache.audio.exists('hit_wood')) { + const hit_ctx = new (window.AudioContext || window.webkitAudioContext)(); + const hit_osc = hit_ctx.createOscillator(); + const hit_gain = hit_ctx.createGain(); + hit_osc.type = 'sine'; + hit_osc.frequency.setValueAtTime(150, hit_ctx.currentTime); + hit_osc.frequency.exponentialRampToValueAtTime(40, hit_ctx.currentTime + 0.1); + hit_gain.gain.setValueAtTime(0.3, hit_ctx.currentTime); + hit_gain.gain.exponentialRampToValueAtTime(0.01, hit_ctx.currentTime + 0.1); + // This is just a placeholder logic, in Phaser we use Synth or preloaded files. + // Since I can't easily inject raw audio buffers into Phaser Cache here without complex code, + // I will implement a simpler AudioSystem helper or ask the user for files. + // For now, I'll use a simple console notification and prepare the code for tree_hit.mp3 / tree_fall.mp3 + } + // Island Dimensions (Playable Area) const ISLAND_WIDTH_TILES = 20; const ISLAND_HEIGHT_TILES = 20; - const ISLAND_W = ISLAND_WIDTH_TILES * TILE_SIZE; // 2560 px - const ISLAND_H = ISLAND_HEIGHT_TILES * TILE_SIZE; // 2560 px + const ISLAND_W = ISLAND_WIDTH_TILES * this.TILE_SIZE; // 2560 px + const ISLAND_H = ISLAND_HEIGHT_TILES * this.TILE_SIZE; // 2560 px // World/Ocean Dimensions (Large Buffer) const WORLD_W = 10000; @@ -97,7 +121,7 @@ export default class GrassSceneClean extends Phaser.Scene { // Set World Bounds to Island only (Hard Stop) this.physics.world.setBounds(ISLAND_X, ISLAND_Y, ISLAND_W, ISLAND_H); - + // Camera Bounds allow seeing deep water this.cameras.main.setBounds(0, 0, WORLD_W, WORLD_H); this.cameras.main.setBackgroundColor('#001d3d'); // Deep Blue Ocean @@ -111,69 +135,225 @@ export default class GrassSceneClean extends Phaser.Scene { this.cameras.main.setZoom(Phaser.Math.Clamp(newZoom, 0.2, 5.0)); }); - // --- 1. OCEAN (Background) --- - // DRAWN via Code (Rectangle) - No Image/Sprite used per user request ("ne dodajaj slik... ti narisal") - this.ocean = this.add.rectangle( - WORLD_W/2, WORLD_H/2, - WORLD_W, WORLD_H, - 0x004488 // Deep Blue Color - ); - this.ocean.setDepth(-200); + // --- 1. DYNAMIC OCEAN & ISLAND SYSTEM --- + const ISLAND_POINTS = []; + const VERTEX_COUNT = 40; // More vertices = more detail + const JITTER = 50; // How jagged it is - // --- 2. ISLAND BASE (The Land) --- - - // A. Shadow (Senca na vodi) - Depth perception (Distance from water) - this.islandShadow = this.add.rectangle( - WORLD_W/2 + 40, WORLD_H/2 + 40, // Larger offset for height - ISLAND_W, ISLAND_H, - 0x000000, 0.3 // User requested alpha 0.3 - ); - this.islandShadow.setDepth(-120); + // Define Base Rect Points + const rectX1 = ISLAND_X; + const rectY1 = ISLAND_Y; + const rectX2 = ISLAND_X + ISLAND_W; + const rectY2 = ISLAND_Y + ISLAND_H; - // B. Cliff/Thickness (Rob/Višina) - The physical side of the island - // Changed to tileSprite with Earth Tint per user request ("naredi zemljo") - this.islandCliff = this.add.tileSprite( - WORLD_W/2, WORLD_H/2 + 15, // Shifted down more (15px) for visible cliff face - ISLAND_W, ISLAND_H, - 'ground_base' - ); - this.islandCliff.setTint(0x5C4033); // Dark Brown / Earth Textures - this.islandCliff.setDepth(-110); + // Generate Jagged Perimeter + // Top + for (let i = 0; i < VERTEX_COUNT; i++) { + let t = i / VERTEX_COUNT; + ISLAND_POINTS.push({ x: rectX1 + ISLAND_W * t, y: rectY1 + (Math.random() - 0.5) * JITTER }); + } + // Right + for (let i = 0; i < VERTEX_COUNT; i++) { + let t = i / VERTEX_COUNT; + ISLAND_POINTS.push({ x: rectX2 + (Math.random() - 0.5) * JITTER, y: rectY1 + ISLAND_H * t }); + } + // Bottom + for (let i = VERTEX_COUNT; i > 0; i--) { + let t = i / VERTEX_COUNT; + ISLAND_POINTS.push({ x: rectX1 + ISLAND_W * t, y: rectY2 + (Math.random() - 0.5) * JITTER }); + } + // Left + for (let i = VERTEX_COUNT; i > 0; i--) { + let t = i / VERTEX_COUNT; + ISLAND_POINTS.push({ x: rectX1 + (Math.random() - 0.5) * JITTER, y: rectY1 + ISLAND_H * t }); + } + this.islandPoints = ISLAND_POINTS; + + // --- 1.1 OCEAN SURFACE (Realistic Layers) --- + // A. Base Depth (Very Deep Blue) + this.oceanBg = this.add.rectangle(WORLD_W / 2, WORLD_H / 2, WORLD_W, WORLD_H, 0x001a33).setDepth(-300); + + // B. Regional Gradient (Simulates depth/shallows near island) + // DISABLED PROCEDURAL TEXTURE GENERATION TO PREVENT MEMORY LEAKS + /* + if (!this.textures.exists('ocean_depth')) { + const size = 512; + const gfx = this.make.graphics({ x: 0, y: 0, add: false }); + gfx.fillGradientStyle(0x0066cc, 0x0066cc, 0x001a33, 0x001a33, 1.0, 1.0, 1.0, 1.0); + gfx.fillRect(0, 0, size, size); + gfx.generateTexture('ocean_depth', size, size); + } + this.depthOverlay = this.add.image(WORLD_W / 2, WORLD_H / 2, 'ocean_depth') + .setDisplaySize(WORLD_W, WORLD_H) + .setDepth(-295) + .setAlpha(0.6); + */ + + // C. Dynamic Water Ripple Texture (Layer 1 - Big waves) + // DISABLED PROCEDURAL GENERATION + /* + if (!this.textures.exists('water_ripples_1')) { + const gfx = this.make.graphics({ x: 0, y: 0, add: false }); + gfx.lineStyle(2, 0xffffff, 1.0); + for (let i = 0; i < 60; i++) { + let x = Math.random() * 512; + let y = Math.random() * 512; + let w = 20 + Math.random() * 60; + let alpha = 0.05 + Math.random() * 0.1; + + gfx.lineStyle(1 + Math.random() * 2, 0xffffff, alpha); + gfx.beginPath(); + gfx.arc(x, y, w, 0, Math.PI * 0.4); + gfx.strokePath(); + } + gfx.generateTexture('water_ripples_1', 512, 512); + } + */ + + // D. Dynamic Water Sparkle Texture (Layer 2 - Sun glints) + // DISABLED PROCEDURAL GENERATION + /* + if (!this.textures.exists('water_sparkles')) { + const gfx = this.make.graphics({ x: 0, y: 0, add: false }); + for (let i = 0; i < 150; i++) { + let alpha = Math.random() * 0.2; + gfx.fillStyle(0xffffff, alpha); + gfx.fillRect(Math.random() * 256, Math.random() * 256, 1, 1); + } + gfx.generateTexture('water_sparkles', 256, 256); + } + */ + + // FAILSAFE 2: Use simple Rectangles instead of TileSprites/Textures to STOP OOM. + // We will add waves later if stability allows. + const viewW = this.scale.width || 1280; + const viewH = this.scale.height || 720; + + this.oceanLayer1 = this.add.rectangle(viewW / 2, viewH / 2, viewW + 100, viewH + 100, 0x004488) + .setScrollFactor(0) + .setDepth(-290) + .setAlpha(0.5); + + // Optional: Second layer for depth effect + this.oceanLayer2 = this.add.rectangle(viewW / 2, viewH / 2, viewW + 100, viewH + 100, 0x002244) + .setScrollFactor(0) + .setDepth(-295) // Behind + .setAlpha(1.0); + + // --- 1.2 CLIFF SYSTEM (Vertical Stone Face) --- + this.cliffGraphics = this.add.graphics().setDepth(-110); + const CLIFF_HEIGHT = 100; + + // Draw the vertical face with a "faked" gradient by layering + // 1. Darkest base (Blackish) + this.cliffGraphics.fillStyle(0x1a0f0a, 1.0); + this.cliffGraphics.beginPath(); + this.cliffGraphics.moveTo(ISLAND_POINTS[0].x, ISLAND_POINTS[0].y + CLIFF_HEIGHT); + ISLAND_POINTS.forEach(p => this.cliffGraphics.lineTo(p.x, p.y + CLIFF_HEIGHT)); + this.cliffGraphics.closePath(); + this.cliffGraphics.fillPath(); + + // 2. Main Stone Body (Dark Brown) + this.cliffGraphics.fillStyle(0x3d2b1f, 1.0); + this.cliffGraphics.beginPath(); + this.cliffGraphics.moveTo(ISLAND_POINTS[0].x, ISLAND_POINTS[0].y); + ISLAND_POINTS.forEach(p => this.cliffGraphics.lineTo(p.x, p.y)); + // Backwards bottom loop + for (let i = ISLAND_POINTS.length - 1; i >= 0; i--) { + this.cliffGraphics.lineTo(ISLAND_POINTS[i].x, ISLAND_POINTS[i].y + CLIFF_HEIGHT * 0.7); + } + this.cliffGraphics.closePath(); + this.cliffGraphics.fillPath(); + + // 3. Highlight line (Style 32: Sharp 5px Edge) + this.cliffGraphics.lineStyle(5, 0x241711, 1); + this.cliffGraphics.beginPath(); + this.cliffGraphics.moveTo(ISLAND_POINTS[0].x, ISLAND_POINTS[0].y); + ISLAND_POINTS.forEach(p => this.cliffGraphics.lineTo(p.x, p.y)); + this.cliffGraphics.strokePath(); + + // --- 1.3 FOAM SYSTEM (Animated Waves) --- + this.foamGraphics = this.add.graphics().setDepth(-120); + this.foamTime = 0; + + // --- 1.4 GROUND (The Grass with Mask) --- + // Create Geometry Mask from Graphics + const maskGfx = this.make.graphics(); + maskGfx.fillStyle(0xffffff); + maskGfx.beginPath(); + maskGfx.moveTo(ISLAND_POINTS[0].x, ISLAND_POINTS[0].y); + ISLAND_POINTS.forEach(p => maskGfx.lineTo(p.x, p.y)); + maskGfx.closePath(); + maskGfx.fillPath(); + this.islandMask = maskGfx.createGeometryMask(); + + // Create Ground only as big as needed (Island + Jitter buffer) to save memory + // TILED GRID SYSTEM: Create ground as a grid of smaller images + // This avoids memory issues while keeping textures sharp + // Using class-level GROUND_TILE_SIZE constant + const groundWidth = ISLAND_W + 200; + const groundHeight = ISLAND_H + 200; + const tilesX = Math.ceil(groundWidth / this.GROUND_TILE_SIZE); + const tilesY = Math.ceil(groundHeight / this.GROUND_TILE_SIZE); + + // Container to hold all ground tiles + this.groundContainer = this.add.container(0, 0); + this.groundContainer.setDepth(-100); + + // Calculate starting position (top-left corner of the grid) + const startX = WORLD_W / 2 - groundWidth / 2; + const startY = WORLD_H / 2 - groundHeight / 2; + + // Create grid of tiles + for (let row = 0; row < tilesY; row++) { + for (let col = 0; col < tilesX; col++) { + const x = startX + col * this.GROUND_TILE_SIZE; + const y = startY + row * this.GROUND_TILE_SIZE; + + const tile = this.add.image(x, y, 'ground_base'); + tile.setOrigin(0, 0); // Top-left origin for precise grid alignment + tile.setDisplaySize(this.GROUND_TILE_SIZE, this.GROUND_TILE_SIZE); + + this.groundContainer.add(tile); + } + } + + // Apply mask to entire container + this.groundContainer.setMask(this.islandMask); + + console.log(`Ground Grid: ${tilesX}x${tilesY} tiles (${tilesX * tilesY} total)`); + + // --- PHYSICS BOUNDS UPDATE --- + const BUFFER = 60; // Extra buffer to stay away from the jagged edge + this.physics.world.setBounds( + ISLAND_X + BUFFER, + ISLAND_Y + BUFFER, + ISLAND_W - BUFFER * 2, + ISLAND_H - BUFFER * 2 + ); - // C. The Actual Ground (Trava) - this.ground = this.add.tileSprite(WORLD_W/2, WORLD_H/2, ISLAND_W, ISLAND_H, 'ground_base'); - this.ground.setDepth(-100); - this.ground.setTileScale(1.0); - - // --- BRIDGE HOOK (Expansion Architecture) --- - // Placeholder for future bridge connection - // const bridgeX = ISLAND_X + ISLAND_W; // Right edge - // const bridgeY = ISLAND_Y + ISLAND_H / 2; - - // --- SCALE TEST --- - // Za testiranje velikosti teksture: - // Originalna velikost je verjetno majhna (npr. 512px). - // Če želimo, da je vzorec večji, moramo povečati setTileScale. - - // Trenutno: 1.0 (Originalna velikost) - // Če je trava "preveč drobna", povečaj to številko (npr. 2.0). - // Če je trava "preveč zrnata", zmanjšaj (npr. 0.5). - this.ground.setTileScale(1.0); - // Note: We need to update tilePosition in update() loop to match camera scroll! // --- 2. RIVER SYSTEM (REMOVED) --- - + // --- NEW: STATIC WATER POND (Ribnik) --- // Removed permanently per user request // --- CELLAR ENTRANCE (Hole) --- // Na poziciji Kai-a (WORLD_W / 2, WORLD_H / 2) - this.hole = this.add.image(WORLD_W / 2, WORLD_H / 2, 'hole'); - this.hole.setDepth(-48); // On ground, below pond/items - this.physics.add.existing(this.hole, true); // Static body for trigger - + // --- CELLAR ENTRANCE (Hole) --- + // Na poziciji Kai-a (WORLD_W / 2, WORLD_H / 2) + // Replaced Image with Graphics to avoid texture generation issues + this.hole = this.add.graphics({ x: WORLD_W / 2, y: WORLD_H / 2 }); + this.hole.fillStyle(0x111111, 1); + this.hole.fillCircle(0, 0, 60); + this.hole.setDepth(-48); // On ground + + // Physics for hole (need a body for overlap) + this.holeZone = this.add.zone(WORLD_W / 2, WORLD_H / 2, 120, 120); + this.physics.add.existing(this.holeZone, true); + // --- REALISTIC TREE (Next to Pond) --- // REMOVED PER USER REQUEST @@ -228,82 +408,153 @@ export default class GrassSceneClean extends Phaser.Scene { fill: '#ffffff', stroke: '#000000', strokeThickness: 4 - }).setScrollFactor(0).setDepth(1000); // UI always on top - + }).setScrollFactor(0).setDepth(10000); // UI: Always on top at 10000 + // --- INTRO SEQUENCE STATE --- this.introStarted = false; - const GRASS_COUNT = 0; // Disabled per user request (was 2000) - const SPREAD = 4000; // 4000px radius okoli centra - - // Parametri za izločanje trave (Pond & Hole) - const pondX = WORLD_W / 2 + 400; - const pondY = WORLD_H / 2 + 200; - const pondRadius = 600; // POVEČANO: Da odstranimo travo tudi okoli ribnika (Clearance) - const holeX = WORLD_W / 2; - const holeY = WORLD_H / 2; - const holeRadius = 80; // Radius of hole + // === TESTNA TRAVA: Single test grass === + const groundY = WORLD_H / 2; // Ground center Y + const testGrassX = WORLD_W / 2; + const testGrassY = 5600; // LOGIKA: All anchored at 5600 - for (let i = 0; i < GRASS_COUNT; i++) { - let x = (WORLD_W / 2) + (Math.random() * SPREAD * 2 - SPREAD); - let y = (WORLD_H / 2) + (Math.random() * SPREAD * 2 - SPREAD); - - // 1. PREVERJANJE: Če je trava v ribniku (Pond) - if (Phaser.Math.Distance.Between(x, y, pondX, pondY) < pondRadius) { - continue; - } + // let testGrass = this.grassGroup.create(testGrassX, testGrassY, 'visoka_trava_v2'); + /* + testGrass.setOrigin(0.5, 1.0); // PIVOT: Bottom-center + // testGrass.y += 40; // Removed - using direct Y position instead + testGrass.setScale(0.12); // TRAVA: 0.12 scale = ~120px height (knee height) + testGrass.setDepth(testGrass.y); // DEPTH RESET: Y-based sorting + testGrass.setAlpha(1); // ALPHA CHECK: Fully visible + testGrass.setVisible(true); // VISIBLE CHECK: Explicitly on + testGrass.setMask(this.islandMask); - // 2. PREVERJANJE: Če je trava v luknji (Hole) - if (Phaser.Math.Distance.Between(x, y, holeX, holeY) < holeRadius) { - continue; - } - // Randomizacija - samo divja trava - let key = Math.random() > 0.5 ? 'grass_wild' : 'grass_wild_v2'; - - // Ustvari travo in jo dodaj v grupo - let grass = this.grassGroup.create(x, y, key); - - // POMEMBNO: Origin spodaj na sredini, da raste iz tal! - grass.setOrigin(0.5, 1.0); - - // Shranimo targetScale v objekt, da ga uporabimo v tweenu - grass.targetScale = 0.5 + Math.random() * 0.5; - - // Začetno stanje: skrita - grass.setScale(0); - - grass.setAngle(Math.random() * 20 - 10); - grass.setAlpha(0.8 + Math.random() * 0.2); - grass.setDepth(y); // Y-sort - - // Physics body (circle for better feel) - if (grass.body) { - grass.body.setCircle(grass.width / 4); - grass.body.setOffset(grass.width / 4, grass.height / 2); // Adjusted for bottom origin - } - } + // DEBUG: Test visibility and object creation + console.log('=== EMERGENCY GRASS TEST ==='); + console.log('Position:', testGrass.x, testGrass.y); + console.log('Depth:', testGrass.depth); + console.log('Alpha:', testGrass.alpha); + console.log('Visible:', testGrass.visible); + console.log('Texture key:', testGrass.texture.key); - // --- TREE PLANTATION (Initial Phase) --- - const TREE_COUNT = 0; // Disabled per user request (was 50) + // === TABELA VSEH OBJEKTOV === + console.log('\n=== TABELA OBJEKTOV V SCENI ==='); + console.log('┌─────────────────────┬──────────────┬─────────┬────────────────┬──────────┬─────────┐'); + console.log('│ Ime objekta │ Orig. Size │ Scale │ Final Height │ Y Pos │ Depth │'); + console.log('├─────────────────────┼──────────────┼─────────┼────────────────┼──────────┼─────────┤'); + console.log(`│ visoka_trava_v2 │ 1024x1024 │ 0.12 │ ${1024 * 0.12}px │ 5600 │ y-based │`); + console.log(`│ drevo (Trees) │ 432px height │ 1.5 │ ${432 * 1.5}px │ 5600 │ y-based │`); + console.log(`│ Kai_Dreads │ 854px height │ 1.0 │ 854px │ 5600 │ y-based │`); + console.log(`│ sleeping_bag │ TBD │ 0.3 │ TBD │ 5600 │ y-based │`); + console.log('└─────────────────────┴──────────────┴─────────┴────────────────┴──────────┴─────────┘'); + console.log('\n=== KATEGORIJE DEFINICIJE (FINAL) ==='); + console.log('TRAVA (1024px orig): scale=0.12 → ~123px (knee height)'); + console.log('DREVESA (432px orig): scale=1.5 → 648px (taller than Kai)'); + console.log('KAI (854px): scale=1.0 (reference)'); + console.log('ALL: Y=5600, depth=y-based, origin(0.5,1.0)'); + console.log('==========================================\n'); + */ + console.log('VSA TRAVA ODSTRANJENA'); + + // --- TREE PLANTATION (Stardew Style) --- + this.treesGroup = this.physics.add.group({ + immovable: true, + allowGravity: false + }); + + this.grassGroup = this.physics.add.group({ immovable: true, allowGravity: false }); + this.farmGroup = this.physics.add.group({ immovable: true, allowGravity: false }); + + + // === DREVESA: Old code commented out === + // const TREE_COUNT = 12; + // const treeKeys = ['drevo_faza_1', 'drevo_faza_2', 'drevo_veliko']; + + // === VSA DREVESA ODSTRANJENA === + /* for (let i = 0; i < TREE_COUNT; i++) { - let x = (WORLD_W / 2) + (Math.random() * SPREAD * 2 - SPREAD); - let y = (WORLD_H / 2) + (Math.random() * SPREAD * 2 - SPREAD); + // Place trees only on edges + const edge = Math.floor(Math.random() * 4); + let x, y; - // Avoid Pond - if (Phaser.Math.Distance.Between(x, y, pondX, pondY) < pondRadius) continue; - // Avoid Hole - if (Phaser.Math.Distance.Between(x, y, holeX, holeY) < holeRadius + 50) continue; + switch (edge) { + case 0: // Top edge + x = ISLAND_X + Math.random() * ISLAND_W; + y = ISLAND_Y + 100 + Math.random() * 200; + break; + case 1: // Right edge + x = ISLAND_X + ISLAND_W - 100 - Math.random() * 200; + y = ISLAND_Y + Math.random() * ISLAND_H; + break; + case 2: // Bottom edge + x = ISLAND_X + Math.random() * ISLAND_W; + y = ISLAND_Y + ISLAND_H - 100 - Math.random() * 200; + break; + case 3: // Left edge + x = ISLAND_X + 100 + Math.random() * 200; + y = ISLAND_Y + Math.random() * ISLAND_H; + break; + } - let tree = this.physics.add.image(x, y, 'drevo_faza_1'); - tree.setOrigin(0.5, 0.95); // Base of trunk - tree.setDepth(y); - tree.setScale(0.8 + Math.random() * 0.4); - tree.body.setImmovable(true); - tree.body.setSize(40, 30); - tree.body.setOffset(tree.width/2 - 20, tree.height - 40); + let key = Phaser.Utils.Array.GetRandom(treeKeys); + let tree = this.treesGroup.create(x, 5600, key); // Y=5600 anchored + tree.setOrigin(0.5, 1.0); + tree.setDepth(tree.y); + tree.setScale(1.5); // Trees 432px → 648px (taller than Kai) + tree.setMask(this.islandMask); + + tree.health = 3; + tree.isChopping = false; + + if (tree.body) { + tree.body.setSize(60, 40); + tree.body.setOffset(tree.width / 2 - 30, tree.height - 50); + } + + tree.setInteractive(); + tree.on('pointerdown', (pointer) => { + const dist = Phaser.Math.Distance.Between(this.kai.x, this.kai.y, tree.x, tree.y); + if (dist < 150) { + this.chopTree(tree); + } + }); } + */ + // === DREVESA: Trees on edges with proper sinking === + const TREE_COUNT = 12; + const treeKeys = ['drevo_faza_1', 'drevo_faza_2', 'drevo_veliko']; + + // === VISUAL TEST: Trees & Grass === + // Plant 5 random trees near spawn for testing + for (let i = 0; i < 5; i++) { + let x = WORLD_W / 2 + (Math.random() - 0.5) * 600; + let y = WORLD_H / 2 + (Math.random() - 0.5) * 600; + + let key = Phaser.Utils.Array.GetRandom(treeKeys); + let tree = this.treesGroup.create(x, y, key); + + // STYLE 32: Tree Logic + // Base = 1 Tile (128px). Canopy = 3x3. Anchor = Bottom Center. + tree.setOrigin(0.5, 1.0); + tree.setScale(1.5); // Approx 3x3 tiles canopy size + + // Shadow (Ellipse) + let shadow = this.add.ellipse(x, y, 100, 40, 0x000000, 0.4); + shadow.setDepth(y - 1); // Always just below tree + tree.shadow = shadow; // Link for potential updates + + // Physics Body (Trunk only - ROOT COLLISION FIX) + if (tree.body) { + // MALI COLLISION BOX NA KORENINAH + tree.body.setSize(40, 20); // Zelo majhen box (40x20) + tree.body.setOffset(tree.width / 2 - 20, tree.height - 30); // Čisto na dnu + tree.body.setImmovable(true); + } + } + + + // --- INTRO LISTENER --- // Klik na podlago sproži rast trave in čiščenje amnezije @@ -325,7 +576,7 @@ export default class GrassSceneClean extends Phaser.Scene { this.trnje.on('pointerdown', () => { this.clearAmnesia(); }); - + // --- NEW: RAIN CATCHER --- this.rainCatcher = this.physics.add.image(startX + 150, startY + 50, 'rain_catcher'); this.rainCatcher.setScale(0.8); @@ -348,39 +599,39 @@ export default class GrassSceneClean extends Phaser.Scene { this.editorEnabled = true; // Enabled by default per user request this.selectedTile = 'path_tile_0'; this.editorGroup = this.add.group(); // Saved tiles - + // Initialize Default State this.selectedTile = 'path_tile_0'; // this.editorEnabled = false; // Duplicate init removed - + // UI Palette (Hidden by default) // FIX: Use viewport dimensions for UI const VIEW_W = this.scale.width; const VIEW_H = this.scale.height; - + // --- EDITOR UI SETUP (Clean Sidebar) --- const SIDEBAR_W = 320; const PALETTE_X = VIEW_W - SIDEBAR_W; - + // UI Container Group (for toggling visibility) this.editorUI = this.add.group(); - + // 1. Sidebar Background (Clean Glass Look) let sidebarBg = this.add.rectangle(PALETTE_X + SIDEBAR_W / 2, VIEW_H / 2, SIDEBAR_W, VIEW_H, 0x222222, 0.95) .setScrollFactor(0).setDepth(2000).setStrokeStyle(2, 0x444444); this.editorUI.add(sidebarBg); - + // Title let sidebarTitle = this.add.text(PALETTE_X + 20, 20, "TILES PALETTE", { fontSize: '24px', fontFamily: 'Arial', color: '#ffffff', fontStyle: 'bold' }).setScrollFactor(0).setDepth(2002); this.editorUI.add(sidebarTitle); - + // 2. Layer Switcher (Tabs) this.currentLayer = 'ground'; const layerBtns = []; const tabsY = 60; - + const createLayerBtn = (label, mode, index) => { let x = PALETTE_X + 20 + (index * 90); let btnBg = this.add.rectangle(x + 40, tabsY + 15, 80, 30, 0x333333).setScrollFactor(0).setDepth(2002).setInteractive({ useHandCursor: true }); @@ -397,31 +648,31 @@ export default class GrassSceneClean extends Phaser.Scene { txt.setColor('#ffffff'); btnBg.setFillStyle(0x0077ff); }); - + this.editorUI.add(btnBg); this.editorUI.add(txt); return { txt, bg: btnBg }; }; - + layerBtns.push(createLayerBtn("Ground", 'ground', 0)); layerBtns.push(createLayerBtn("Deco", 'deco', 1)); layerBtns.push(createLayerBtn("Build", 'building', 2)); - + // Select first default layerBtns[0].txt.setColor('#ffffff'); layerBtns[0].bg.setFillStyle(0x0077ff); - + // 3. Palette Content (Scrollable) const contentY = 120; // Below tabs const itemContainer = this.add.container(PALETTE_X, contentY).setScrollFactor(0).setDepth(2001); - + // Mask for scrolling const maskShape = this.make.graphics(); maskShape.fillStyle(0xffffff); maskShape.fillRect(PALETTE_X, contentY, SIDEBAR_W, VIEW_H - contentY); const mask = maskShape.createGeometryMask(); itemContainer.setMask(mask); - + // Prepare Palette Items const paletteItems = []; for (let i = 0; i < 16; i++) paletteItems.push(`path_tile_${i}`); @@ -432,22 +683,22 @@ export default class GrassSceneClean extends Phaser.Scene { for (let i = 0; i <= 8; i++) paletteItems.push(`dead_nature_${i}`); ['bush_hiding_spot', 'drevo_faza_1', 'drevo_faza_2', 'drevo_srednje', 'drevo_veliko', 'grass_cluster_dense', 'grass_cluster_flowery', 'trava_sop'].forEach(k => paletteItems.push(k)); paletteItems.push('sotor', 'campfire', 'eraser_icon'); - + // Grid Layout let col = 0, row = 0; const CELL_SZ = 90; - + // Selector Highlight (Clean Blue Border) let selector = this.add.rectangle(0, 0, 80, 80).setStrokeStyle(4, 0x00aaff).setVisible(false); itemContainer.add(selector); - + paletteItems.forEach((key) => { let ix = 50 + (col * CELL_SZ); let iy = 50 + (row * CELL_SZ); - + let icon = this.add.image(ix, iy, key).setScale(0.3).setInteractive({ useHandCursor: true }); itemContainer.add(icon); - + icon.on('pointerdown', () => { this.selectedTile = key; selector.setPosition(ix, iy).setVisible(true); @@ -462,7 +713,7 @@ export default class GrassSceneClean extends Phaser.Scene { col++; if (col >= 3) { col = 0; row++; } }); - + // Scroll Logic let scrollY = 0; const MAX_SCROLL = Math.max(0, (row * CELL_SZ) + 150 - (VIEW_H - contentY)); @@ -474,11 +725,11 @@ export default class GrassSceneClean extends Phaser.Scene { itemContainer.y = contentY + scrollY; } }); - + // 4. Ghost Cursor this.ghostSprite = this.add.image(0, 0, this.selectedTile) .setAlpha(0.6).setDepth(3000).setVisible(false); // Topmost - + // Toggle Visibility Helpers const toggleEditor = (state) => { this.editorEnabled = state; @@ -488,15 +739,15 @@ export default class GrassSceneClean extends Phaser.Scene { console.log("Editor:", state); }; toggleEditor(false); // Start hidden per user request - + // Toggle Key this.input.keyboard.on('keydown-E', () => { toggleEditor(!this.editorEnabled); }); - + this.input.on('pointermove', (pointer) => { if (!this.editorEnabled) return; - + // Hide Ghost if over UI if (pointer.x > PALETTE_X) { this.ghostSprite.setVisible(false); @@ -504,32 +755,32 @@ export default class GrassSceneClean extends Phaser.Scene { } else if (this.selectedTile !== 'eraser_icon') { this.ghostSprite.setVisible(true); } - + // Snap calculation const SNAP = 128; const sx = Math.floor(pointer.worldX / SNAP) * SNAP + (SNAP / 2); const sy = Math.floor(pointer.worldY / SNAP) * SNAP + (SNAP / 2); this.ghostSprite.setPosition(sx, sy); }); - + // Painting Logic this.input.on('pointerdown', (pointer) => { if (!this.editorEnabled) return; // Ignore UI clicks if (pointer.x > PALETTE_X) return; - + // ERASER if (this.selectedTile === 'eraser_icon') return; // Handled by object click - + // Snap const SNAP = 128; const sx = Math.floor(pointer.worldX / SNAP) * SNAP + (SNAP / 2); const sy = Math.floor(pointer.worldY / SNAP) * SNAP + (SNAP / 2); - + // Remove existing tile at this spot to avoid stacking let existing = this.editorGroup.getChildren().find(c => Math.abs(c.x - sx) < 10 && Math.abs(c.y - sy) < 10); if (existing) existing.destroy(); - + let placedStub = this.add.image(sx, sy, this.selectedTile); placedStub.setInteractive(); placedStub.on('pointerdown', () => { @@ -546,7 +797,7 @@ export default class GrassSceneClean extends Phaser.Scene { } } }); - + // Layer Logic if (this.currentLayer === 'ground') { placedStub.setDepth(-40); @@ -555,7 +806,7 @@ export default class GrassSceneClean extends Phaser.Scene { placedStub.setDepth(sy); // Y-sort } this.editorGroup.add(placedStub); - + // AUTO-TILE UPDATE if (this.selectedTile.startsWith('water_tile_')) { this.updateAutotile(sx, sy); @@ -588,24 +839,52 @@ export default class GrassSceneClean extends Phaser.Scene { // Center offset: -1.5 * size to center the 4x4 block let px = startX + (c * GRID_SZ) + 200; let py = startY + (r * GRID_SZ) + 200; - + let tile = this.add.image(px, py, key); tile.setDepth(-40); // Ground level // Optional: make draggable? User said "naredi", maybe fixed? // tile.setInteractive({ draggable: true }); - + pIndex++; } } */ // --- 5. CHAR (Kai) --- - this.kai = this.physics.add.sprite(WORLD_W / 2, WORLD_H / 2, 'kai'); + // Calculate spawn position (e.g. center or saved) + const SPAWN_X = WORLD_W / 2; + const SPAWN_Y = WORLD_H / 2; + + this.kai = this.physics.add.sprite(SPAWN_X, SPAWN_Y, 'kai'); // Povečava na polno velikost (256px) - this.kai.setScale(1); + this.kai.setScale(1); this.kai.setCollideWorldBounds(true); this.kai.setOrigin(0.5, 0.9); + // RESPAWN SYSTEM + this.respawnPoint = { x: SPAWN_X, y: SPAWN_Y }; + + // --- SLEEPING BAG (Checkpoint) --- + // --- SLEEPING BAG ODSTRANJENA --- + /* + this.sleepingBag = this.physics.add.image(SPAWN_X + 100, 5600, 'sleeping_bag'); // Y=5600 + this.sleepingBag.setOrigin(0.5, 1.0); // AVTOMATSKI Y-OFFSET + this.sleepingBag.setScale(0.3); // SPALNA VREČA: Width of Kai's shoulders + this.sleepingBag.setDepth(this.sleepingBag.y); // DEPTH RESET: Y-based sorting + // Static body (immovable) but allow overlap + this.sleepingBag.body.setImmovable(true); + + // Add Overlap for Checkpoint + this.physics.add.overlap(this.kai, this.sleepingBag, () => { + if (this.lastCheckpointTime && this.time.now - this.lastCheckpointTime < 5000) return; + + this.saveCheckpoint(this.sleepingBag.x, this.sleepingBag.y); + this.lastCheckpointTime = this.time.now; + }); + */ + console.log('SPALNA VREČA ODSTRANJENA'); + + // Adjust Physics Body for larger size // Width ~40, Height ~30 (relative to scaled sprite) this.kai.body.setSize(50, 40); @@ -623,7 +902,7 @@ export default class GrassSceneClean extends Phaser.Scene { this.gronk.setImmovable(true); this.gronk.body.setSize(80, 60); this.gronk.body.setOffset(88, 190); // Adjusted for 256x256 frame - + // Gronk Animations this.anims.create({ key: 'gronk-idle', @@ -632,7 +911,7 @@ export default class GrassSceneClean extends Phaser.Scene { repeat: -1 }); this.gronk.play('gronk-idle'); - + // Interaction (Say Hello) this.gronk.setInteractive(); this.gronk.on('pointerdown', () => { @@ -642,8 +921,8 @@ export default class GrassSceneClean extends Phaser.Scene { */ // Colliders + this.physics.add.collider(this.kai, this.treesGroup); // this.physics.add.collider(this.kai, this.rainCatcher); - // this.physics.add.collider(this.kai, this.gronk); // --- ANIMATIONS --- // 0-3: Down, 4-7: Left, 8-11: Right, 12-15: Up @@ -678,6 +957,7 @@ export default class GrassSceneClean extends Phaser.Scene { // Camera setup logic this.cameras.main.startFollow(this.kai, true, 0.1, 0.1); + this.cameras.main.setRoundPixels(true); // Prevent jitter this.cursors = this.input.keyboard.createCursorKeys(); // Add WASD keys this.keys = this.input.keyboard.addKeys({ @@ -694,7 +974,25 @@ export default class GrassSceneClean extends Phaser.Scene { // Collider added later after Kai creation // --- 3. FOLIAGE (Trava - Šopi) --- - // Removed as requested + // === VISUAL TEST: Live World Vegetation (Style 32) === + const vegStartX = WORLD_W / 2 - 200; + const vegStartY = WORLD_H / 2 + 100; + + this.createGrass(vegStartX, vegStartY, 1); + this.createGrass(vegStartX + 64, vegStartY, 2); + this.createGrass(vegStartX + 128, vegStartY, 3); + this.createCannabis(vegStartX + 256, vegStartY, 7); + + for (let i = 0; i < 30; i++) { + let rx = vegStartX + (Math.random() - 0.5) * 500; + let ry = vegStartY + 50 + (Math.random() * 300); + this.createGrass(rx, ry, Phaser.Math.Between(1, 3)); + } + + // Overlap listener (Safe now as Kai exists) + this.physics.add.overlap(this.kai, this.grassGroup, (player, grass) => { + this.shakeGrass(grass); + }); // --- 4. ITEMS (Seno) --- // Removed as requested @@ -703,10 +1001,12 @@ export default class GrassSceneClean extends Phaser.Scene { // 3. COLLIDERS // Cellar Trigger - if (this.hole) { - this.physics.add.overlap(this.kai, this.hole, (player, hole) => { - // Trigger logic (e.g., console log or event) - // console.log("Standing on cellar entrance"); + // 3. COLLIDERS + // Cellar Trigger + if (this.holeZone) { + this.physics.add.overlap(this.kai, this.holeZone, (player, hole) => { + // Trigger logic (e.g., console log or event) + // console.log("Standing on cellar entrance"); }); } @@ -782,21 +1082,198 @@ export default class GrassSceneClean extends Phaser.Scene { this.fog2.setBlendMode(Phaser.BlendModes.SCREEN); this.fog2.setTint(0x00ff00); // GREEN */ + // --- 5. FARMING SYSTEM (FREE FORM) --- + this.farmGroup = this.physics.add.group({ immovable: true, allowGravity: false }); + + // --- FOG OF WAR (DEMO: 8x8 RADIUS) --- + this.fogGraphics = this.add.graphics().setDepth(9000); + + // --- FARMING INTERACTION (SPACE) --- + // Allow Kai to farm anywhere on the island + this.input.keyboard.on('keydown-SPACE', () => { + // 1. Check if overlapping grass (Harvest) + let overlapped = false; + this.physics.overlap(this.kai, this.grassGroup, (player, grass) => { + this.cutGrass(grass); + overlapped = true; + }); + + // 2. If not harvesting, TILL GROUND (Farm) + if (!overlapped) { + this.tillGround(); + } + }); + } + + // --- VEGETATION HELPERS (Style 32) --- + createGrass(x, y, stage) { + let key = 'grass_ref_1'; // Default + let grass = this.grassGroup.create(x, y, key); + + // ANCHOR FIX: setOrigin(0.5, 1.0) - NI IZJEM! + grass.setOrigin(0.5, 1.0); + + // GROWTH STAGES (Base logic: 1 Tile = 128px) + // Asset is ~1024px. BaseScale ~0.12 = 128px (1 Tile) + const baseScale = 0.12; + let scaleMultiplier = 0.8; // Default Stage 3 + + if (stage === 1) scaleMultiplier = 0.1; // 0.1 Tile + else if (stage === 2) scaleMultiplier = 0.3; // 0.3 Tile + else if (stage === 3) scaleMultiplier = 0.8; // 0.8 Tile + + // Combine with Jitter + const jitter = 0.9 + Math.random() * 0.2; + grass.setScale(baseScale * scaleMultiplier * jitter); + + // Physics: Small sensor for overlap + if (grass.body) { + grass.body.setCircle(10); + grass.body.setOffset(grass.width / 2 - 10, grass.height - 20); // At roots + grass.body.checkCollision.none = true; // No physical block, just overlap + } + } + + createCannabis(x, y, stage) { + // CANNABIS EXCEPTION: 7 Stages, up to 1.2 Tile + let key = 'grass_ref_2'; // Visual placeholder for Cannabis + let plant = this.grassGroup.create(x, y, key); + plant.setOrigin(0.5, 1.0); + plant.setTint(0x88ff88); // Lighter green distinction + + const baseScale = 0.12; + // Map 1-7 to 0.1 -> 1.2 + let scaleMultiplier = 0.1 + ((stage - 1) / 6) * 1.1; // linear map to 1.2 + + plant.setScale(baseScale * scaleMultiplier); + } + + shakeGrass(grass) { + if (grass.isShaking) return; + grass.isShaking = true; + + // Simple Shimmy Tween + this.tweens.add({ + targets: grass, + angle: { from: -8, to: 8 }, + duration: 80, + yoyo: true, + repeat: 3, + onComplete: () => { + grass.isShaking = false; + grass.angle = 0; // Reset + } + }); + } + + // --- FARMING LOGIC --- + tillGround() { + // Snap to grid (Style 32: 128px) + const gridX = Math.floor(this.kai.x / this.TILE_SIZE) * this.TILE_SIZE + (this.TILE_SIZE / 2); + const gridY = Math.floor(this.kai.y / this.TILE_SIZE) * this.TILE_SIZE + (this.TILE_SIZE / 2); + + // Check if plot already exists + let exists = false; + this.farmGroup.getChildren().forEach(plot => { + if (Math.abs(plot.x - gridX) < 10 && Math.abs(plot.y - gridY) < 10) { + exists = true; + } + }); + + if (!exists) { + // DYNAMIC_PLANTING: Create Interactive Dirt Patch + // Using a tinted sprite or visual placeholder for 'Soil Slot' + const plot = this.add.rectangle(gridX, gridY, this.TILE_SIZE - 20, this.TILE_SIZE - 20, 0x4e342e); + plot.setDepth(-50); // Ground Level (Fixed) + plot.setStrokeStyle(2, 0x3e2723); + this.farmGroup.add(plot); + + // Interaction: Plant Seed + plot.setInteractive({ useHandCursor: true }); + plot.on('pointerdown', () => { + this.plantSeed(plot); + }); + + console.log(`Soil Slot created at ${gridX}, ${gridY}`); + } + } + + // --- PLANTING SYSTEM (Real-Farm) --- + plantSeed(plot) { + if (plot.hasPlant) return; // Slot occupied + + // Check Inventory (Mock) + // if (this.inventory.seeds['potato'] <= 0) return; + + console.log("Planting Potato Seed..."); + plot.hasPlant = true; + + // Create Plant Sprite (Sprout Stage) + const plant = this.physics.add.sprite(plot.x, plot.y, 'grass_ref_1'); // Placeholder for Potato + plant.setOrigin(0.5, 1.0); // Anchor Bottom + plant.setDepth(plant.y); // Y-SORT (No floating!) + + // STAGES_SYSTEM: 0=Sprout, 1=Growing, 2=Harvest + plant.growthStage = 0; + plant.setScale(0.3); // Tiny Sprout + plant.setTint(0x88cc88); // Lighter green for sprout + + // COLLISION: Roots + plant.body.setSize(30, 15); + plant.body.setOffset(plant.width / 2 - 15, plant.height - 15); + plant.body.setImmovable(true); + this.physics.add.collider(this.kai, plant); // Kai can't walk through plant center + + // Simulate Growth (Timer) + this.time.delayedCall(3000, () => this.growPlant(plant)); + } + + growPlant(plant) { + if (!plant.scene || plant.growthStage >= 2) return; + + plant.growthStage++; + + // Visual Update + if (plant.growthStage === 1) { + plant.setScale(0.6); // Growing + plant.setTint(0x66bb66); + this.time.delayedCall(3000, () => this.growPlant(plant)); + } else if (plant.growthStage === 2) { + plant.setScale(1.0); // Harvest Ready (Mature) + plant.setTint(0xffffff); // Normal color + + // Interactive Harvest + plant.setInteractive({ useHandCursor: true }); + plant.on('pointerdown', () => { + console.log("Harvesting Potato!"); + plant.destroy(); + // Reset Plot? (Need link to plot) + }); + } } // --- INTRO SEQUENCE --- startIntroSequence() { console.log("Starting Intro Sequence: Grass Growth + Amnesia Clear"); - + // 1. Grass Growth Animation - this.grassGroup.getChildren().forEach((grass, index) => { - this.tweens.add({ + // 1. Grass Growth Animation + const targets = this.grassGroup.getChildren(); + console.log('Targets for tween:', targets); + + targets.forEach((grass, index) => { + if (!grass || !grass.scene) return; + + // Fix missing targetScale + const finalScale = grass.targetScale !== undefined ? grass.targetScale : (grass.scaleX || 0.12); + + this.tweens.add({ targets: grass, - scaleX: grass.targetScale, // Use stored target scale - scaleY: grass.targetScale, + scaleX: finalScale, // Use stored target scale + scaleY: finalScale, duration: 800 + Math.random() * 800, delay: Math.random() * 1500, // Staggered start - ease: 'Back.out', + ease: 'Back.out', }); }); @@ -804,6 +1281,198 @@ export default class GrassSceneClean extends Phaser.Scene { this.clearAmnesia(); } + // --- TREE CHOPPING SYSTEM --- + chopTree(tree) { + if (tree.isChopping || tree.health <= 0) return; + + tree.isChopping = true; + tree.health--; + + // 1. Play Hit Sound (Placeholder/Logic) + console.log("SFX: Wood Hit!"); + // this.sound.play('tree_hit'); // User should add tree_hit.mp3 + + // 1. Shake Animation (Hit) + this.tweens.add({ + targets: tree, + angle: { from: -3, to: 3 }, + duration: 50, + yoyo: true, + repeat: 2, + onComplete: () => { + tree.angle = 0; + tree.isChopping = false; + + // 2. Check if Dead + if (tree.health <= 0) { + this.fallTree(tree); + } + } + }); + } + + fallTree(tree) { + console.log("SFX: Tree Breaking..."); + // this.sound.play('tree_fall_break'); + + // Fall Animation + this.tweens.add({ + targets: tree, + angle: 90, + alpha: 0, + duration: 1000, + ease: 'Cubic.easeIn', + onComplete: () => { + const tx = tree.x; + const ty = tree.y; + + // SFX: Impact + console.log("SFX: THUD!"); + // this.sound.play('tree_thud'); + + // Visual: Screen Shake + this.cameras.main.shake(300, 0.005); + + tree.destroy(); + + // 3. AUTO-REPLANT (Spawn Grass Clump) + this.spawnReplant(tx, ty); // Use generic regrowth for consistency if desired, or keep as specialized spawn + } + }); + } + + spawnReplant(x, y) { + // Kept for immediate spawning logic if needed, but 'startRegrowthCycle' is preferred for delayed growth. + // Calling startRegrowthCycle with 0 delay would mimic this. + this.startRegrowthCycle(x, y, 'grass'); + } + + // --- GROWTH SYSTEM (Vegetation Cycle) --- + startRegrowthCycle(x, y, type) { + // 1. Create invisible Growth Spot + // We use a Zone/Circle to reserve the spot + console.log(`GrowthSpot created at ${x},${y}. Spawning in 60s.`); + + // 2. Wait 60 seconds + this.time.delayedCall(60000, () => { // 60s Timer + this.attemptRegrowth(x, y, type); + }); + } + + attemptRegrowth(x, y, type) { + // 3. Collision Check (Buildings) + // Check if any building is occupying this space (Radius ~40px) + // Since we don't have a specific buildingsGroup active here, we check 'obstaclesGroup' or similar if they existed. + // For now, we simulate "Success" if no specific blocker. + // If you had a 'buildingsGroup', you would do: + /* + let occupied = false; + this.physics.overlapCirc(x, y, 40).forEach(body => { + if (body.gameObject.isBuilding) occupied = true; + }); + if (occupied) return; // Stop growth + */ + + // 4. Spawn Object + if (type === 'grass') { + let key = Math.random() > 0.5 ? 'grass_ref_1' : 'grass_ref_2'; + let grass = this.grassGroup.create(x, y, key); + grass.setOrigin(0.5, 0.9); // Pivot Sunk + grass.setScale(0.1); + grass.setDepth(0.1); // Fixed Depth 0.1 + grass.swayOffset = Math.random() * 100; + grass.setMask(this.islandMask); // Apply Mask! + + // Physics + if (grass.body) { + grass.body.setCircle(20); + grass.body.setOffset(grass.width / 2 - 20, grass.height - 40); + grass.body.checkCollision.none = true; + } + + // Interaction + grass.setInteractive(); + grass.on('pointerdown', () => { + if (Phaser.Math.Distance.Between(this.kai.x, this.kai.y, grass.x, grass.y) < 120) { + this.cutGrass(grass); + } + }); + + // 5. Lerp Animation (Growth) + this.tweens.add({ + targets: grass, + scale: 0.4, // Target Scale Fixed 0.4 + duration: 2000, + ease: 'Cubic.out' + }); + } + else if (type === 'tree') { + // Logic for tree regrowth if that was part of the plan (User mentioned trees) + // Similar logic... + } + } + + // --- CHECKPOINT SYSTEM --- + saveCheckpoint(x, y) { + this.respawnPoint = { x, y }; + console.log("CHECKPOINT SET:", x, y); + + // Visual Feedback + const text = this.add.text(x, y - 100, "CHECKPOINT SET!", { + fontFamily: 'Arial', + fontSize: '24px', + color: '#00ff00', + stroke: '#000000', + strokeThickness: 4 + }).setOrigin(0.5); + + this.tweens.add({ + targets: text, + y: y - 150, + alpha: 0, + duration: 2000, + onComplete: () => text.destroy() + }); + + // SFX Placeholder + // this.sound.play('checkpoint_snd'); + } + + // --- GRASS CUTTING SYSTEM --- + cutGrass(grass) { + if (grass.isRegrowing) return; // Safety check + + // SFX: Cut + console.log("SFX: Grass Cut!"); + + // Add to inventory + this.inventory.grass++; + if (this.inventoryText) { + this.inventoryText.setText(`Trava: ${this.inventory.grass}`); + } + + // Capture position before destroy + const gx = grass.x; + const gy = grass.y; + + // Animation: Shrink and Destroy + this.tweens.add({ + targets: grass, + scale: 0, + alpha: 0, + duration: 200, + ease: 'Back.in', + onComplete: () => { + grass.destroy(); // Remove object completely + + // Start Regrowth Cycle (Growth Spot Logic) + this.startRegrowthCycle(gx, gy, 'grass'); + } + }); + } + + // regrowGrass removed as it is replaced by startRegrowthCycle + // --- AMNESIA SYSTEM --- clearAmnesia() { if (this.amnesiaBlur) { @@ -811,8 +1480,8 @@ export default class GrassSceneClean extends Phaser.Scene { this.amnesiaBlur = null; } if (this.amnesiaOverlay) { - this.amnesiaOverlay.destroy(); - this.amnesiaOverlay = null; + this.amnesiaOverlay.destroy(); + this.amnesiaOverlay = null; } } @@ -820,23 +1489,55 @@ export default class GrassSceneClean extends Phaser.Scene { /* Removed for cleanup */ update(time, delta) { - // --- PARALLAX & SCROLLING --- - // 1. Ground Infinite Scroll (REMOVED for Static Island) - /* - if (this.ground) { - this.ground.tilePositionX = this.cameras.main.scrollX; - this.ground.tilePositionY = this.cameras.main.scrollY; + // --- ANIMATE OCEAN --- + // (Parallax skipped for rectangles, logic removed to prevent errors) + // --- ANIMATE FOAM --- + if (this.foamGraphics && this.islandPoints) { + this.foamTime += delta * 0.002; + const pulse = Math.sin(this.foamTime) * 12; + + this.foamGraphics.clear(); + + // Outer Layer (Transparent White) + this.foamGraphics.lineStyle(12 + Math.abs(pulse), 0xffffff, 0.3 + Math.sin(this.foamTime) * 0.1); + this.foamGraphics.beginPath(); + this.foamGraphics.moveTo(this.islandPoints[0].x, this.islandPoints[0].y + 90 + pulse); + for (let i = 1; i < this.islandPoints.length; i++) { + this.foamGraphics.lineTo(this.islandPoints[i].x, this.islandPoints[i].y + 90 + pulse); + } + this.foamGraphics.closePath(); + this.foamGraphics.strokePath(); + + // Inner Dense Layer + this.foamGraphics.lineStyle(6 + Math.abs(pulse * 0.4), 0xe0f7fa, 0.4); + this.foamGraphics.beginPath(); + this.foamGraphics.moveTo(this.islandPoints[0].x, this.islandPoints[0].y + 80 + pulse * 0.5); + for (let i = 1; i < this.islandPoints.length; i++) { + this.foamGraphics.lineTo(this.islandPoints[i].x, this.islandPoints[i].y + 80 + pulse * 0.5); + } + this.foamGraphics.closePath(); + this.foamGraphics.strokePath(); } - */ - - // 2. River Flow Animation (REMOVED) - /* Removed for cleanup */ - // --- PLAYER MOVEMENT --- - const speed = 250; - this.kai.setVelocity(0); + // --- GRASS BENDING & SWAY EFFECT --- + this.grassGroup.getChildren().forEach(grass => { + if (grass.isShaking) return; // SKIP SWAY IF SHAKING (Physics override) - let moving = false; + const dist = Phaser.Math.Distance.Between(this.kai.x, this.kai.y, grass.x, grass.y); + + // Continuous Idle Sway (Sine Wave) + const sway = Math.sin((time * 0.002) + (grass.swayOffset || 0)) * 2; + + // Apply sway + if (dist > 60) { + grass.setAngle(sway); + } + // (If close, Shake Effect handles interaction via Overlap, so we don't need manual bend here) + }); + + // --- PLAYER MOVEMENT (SMOOTHENED) --- + const speed = 500; + const velocity = new Phaser.Math.Vector2(0, 0); // Input helpers const left = this.cursors.left.isDown || this.keys.left.isDown; @@ -845,51 +1546,80 @@ export default class GrassSceneClean extends Phaser.Scene { const down = this.cursors.down.isDown || this.keys.down.isDown; const space = this.cursors.space.isDown; - // --- GRASS PLUCKING MECHANIC (Trganje trave) --- - if (space) { - this.physics.overlap(this.kai, this.grassGroup, (player, grass) => { - // 1. Uniči travo - grass.destroy(); + if (left) velocity.x = -1; + else if (right) velocity.x = 1; - // 2. Dodaj v inventar - this.inventory.grass++; - this.inventoryText.setText('Trava: ' + this.inventory.grass); - }); - } + if (up) velocity.y = -1; + else if (down) velocity.y = 1; - if (left) { - this.kai.setVelocityX(-speed); - this.kai.play('walk-left', true); - moving = true; - } else if (right) { - this.kai.setVelocityX(speed); - this.kai.play('walk-right', true); - moving = true; - } + if (velocity.length() > 0) { + velocity.normalize().scale(speed); + this.kai.setVelocity(velocity.x, velocity.y); - if (up) { - this.kai.setVelocityY(-speed); - if (!left && !right) { - this.kai.play('walk-up', true); + // Animation logic + if (Math.abs(velocity.x) > Math.abs(velocity.y)) { + this.kai.play(velocity.x < 0 ? 'walk-left' : 'walk-right', true); + } else { + this.kai.play(velocity.y < 0 ? 'walk-up' : 'walk-down', true); } - moving = true; - } else if (down) { - this.kai.setVelocityY(speed); - if (!left && !right) { - this.kai.play('walk-down', true); - } - moving = true; - } - - if (this.kai.body.velocity.length() > 0) { - this.kai.body.velocity.normalize().scale(speed); } else { - this.kai.stop(); - // Optional: reset to idle frame? + this.kai.setVelocity(0, 0); + this.kai.anims.stop(); } - // --- Z-SORTING SYSTEM --- - // Player - this.kai.setDepth(this.kai.y); + // --- FOG OF WAR (Style 32: Sharp Edge) --- + if (this.fogGraphics && this.kai) { + this.fogGraphics.clear(); + + // 1. Draw Darkness (Big Black Rectangle) + this.fogGraphics.fillStyle(0x000000, 1.0); // Pitch black + this.fogGraphics.beginPath(); + // Outer Rectangle (World) + this.fogGraphics.moveTo(0, 0); + this.fogGraphics.lineTo(10000, 0); + this.fogGraphics.lineTo(10000, 10000); + this.fogGraphics.lineTo(0, 10000); + this.fogGraphics.lineTo(0, 0); + this.fogGraphics.closePath(); + + // 2. Cut Hole (Circle around Kai) + // Draw counter-clockwise to create a hole + const radius = 4 * 128; // 8x8 tiles diameter + const kx = this.kai.x; + const ky = this.kai.y; + + this.fogGraphics.moveTo(kx + radius, ky); + this.fogGraphics.arc(kx, ky, radius, 0, Math.PI * 2, true); + this.fogGraphics.closePath(); + this.fogGraphics.fillPath(); + + // 3. Sharp Border + this.fogGraphics.lineStyle(5, 0xffffff, 0.2); + this.fogGraphics.strokeCircle(kx, ky, radius); + } + + // --- Z-SORTING SYSTEM (Style 32: Y-Sort) --- + // "Agent, uporabi this.children.each(c => c.setDepth(c.y))" + this.children.each(c => { + // Filter: Only sort game entities (between Ground -100 and Fog 9000) + if (c.depth > -90 && c.depth < 8000) { + c.setDepth(c.y); + } + }); + + // --- TREE OCCLUSION (Alpha Transparency) --- + this.treesGroup.getChildren().forEach(tree => { + // Check if Kai is BEHIND the tree (Kai Y < Tree Y) + // And Kai is close enough horizontally (within canopy width) + const dx = Math.abs(this.kai.x - tree.x); + const dy = tree.y - this.kai.y; // Positive if Kai is above/behind + + // Occlusion Zone: Width 150px, Height 400px (Upwards) + if (Math.abs(dx) < 100 && dy > 0 && dy < 400) { + tree.setAlpha(0.5); // See-through + } else { + tree.setAlpha(1.0); // Opaque + } + }); } }