posodobitev
This commit is contained in:
209
TASKS.md
209
TASKS.md
@@ -230,10 +230,203 @@ Implementacija jedrnih mehanik iz novega koncepta "Krvava Žetev".
|
||||
- [x] Reputation System za Mutante (Dobri/Zlobni).
|
||||
|
||||
## 🌡️ Phase 13: Elements & Survival (Hardcore)
|
||||
- [ ] **Weather System v2.0**
|
||||
- [ ] **Letni Časi:** Zima (Sneg, Mraz), Poletje (Vročina, Suša).
|
||||
- [ ] **Temperature Logic:** Če `Temp < 0` in nimaš `WinterCoat` -> HP pada.
|
||||
- [ ] **Rastlinjak (Greenhouse):** Crafting Stekla (Mivka + Peč). Omogoča rast pozimi.
|
||||
- [x] **Weather System v2.0**
|
||||
- [x] **Letni Časi:** Zima (Sneg, Mraz), Poletje (Vročina, Suša).
|
||||
- [x] **Temperature Logic:** Če `Temp < 0` in nimaš `WinterCoat` -> HP pada.
|
||||
- [x] **Rastlinjak (Greenhouse):** Crafting Stekla (Mivka + Peč). Omogoča rast pozimi.
|
||||
- [ ] **Localization & Platforms**
|
||||
- [ ] JSON prevodi (SLO, EN, DE, IT, CN).
|
||||
- [ ] Language Selector v meniju.
|
||||
- [ ] **Steam Integration**: Achievements & Cloud Save.
|
||||
- [ ] **Entities & Items**
|
||||
- [ ] **Playtime Tracker**: Beleženje ur igranja (Persistent Stats).
|
||||
- [ ] **Osel (Donkey):** Jahanje in Inventory.
|
||||
- [ ] **Jablana (Apple Tree):** Trajnica, daje pridelek jeseni.
|
||||
- [x] Planting seeds
|
||||
- [x] Growth Stages (Time-based growth)
|
||||
- [x] Harvesting crops
|
||||
- [x] Watering mechanics
|
||||
- [x] **Advanced NPC AI**
|
||||
- [x] Pathfinding (A* or efficient grid traversal)
|
||||
- [x] Zombie Attacks Player (Player takes damage)
|
||||
- [x] Tamed Zombie Defense (Attacks enemies)
|
||||
- [x] Zombie Hordes (Night time events)
|
||||
- [x] **Economy**
|
||||
- [x] Merchant NPC (Trading interface)
|
||||
- [x] Selling crops/items for Gold
|
||||
- [x] Buying Seeds & Tools
|
||||
- [x] **Building System**
|
||||
- [x] Placing Walls/Fences (Snap to grid)
|
||||
- [x] Crafting Buildings (House, Barn)
|
||||
- [x] UI for selecting buildings
|
||||
|
||||
## 🔵 Phase 4: Polish & Visuals
|
||||
Lepotni popravki in vzdušje.
|
||||
|
||||
- [x] **Day/Night Cycle**
|
||||
- [x] Lighting overlay (Darkness at night)
|
||||
- [x] Dawn/Dusk transitions
|
||||
- [x] Night-only Zombie Spawns
|
||||
- [x] **Audio/SFX**
|
||||
- [x] Footsteps sounds
|
||||
- [x] Attack/Hit sounds
|
||||
- [x] Ambient nature sounds (Procedural Rain)
|
||||
- [x] Background Music
|
||||
- [x] **Visual FX**
|
||||
- [x] Particle effects (Leaves falling, blood particles)
|
||||
- [x] UI Animations (Smooth inventory opening)
|
||||
- [x] Weather (Rain, Fog)
|
||||
|
||||
## 🟣 Phase 5: Story & Quests
|
||||
Dodajanje globine in ciljev igri.
|
||||
|
||||
- [x] **Story Mode**
|
||||
- [x] Intro Sequence
|
||||
- [x] Main Questline
|
||||
- [x] **Boss Battles**
|
||||
- [x] "Zombie King" Boss
|
||||
- [x] Special Arenas
|
||||
- [x] **Quest System**
|
||||
- [x] NPC dialogue interaction
|
||||
- [x] Rewards & Notifications
|
||||
|
||||
## 🟠 Phase 6: Multiplayer & Export
|
||||
Možnost igranja s prijatelji.
|
||||
|
||||
- [x] **Local/LAN Multiplayer**
|
||||
- [x] Syncing Player Positions
|
||||
- [x] Visual Indicators
|
||||
- [x] **Mobile Support**
|
||||
- [x] Virtual Joystick
|
||||
- [x] Responsive Design
|
||||
- [x] **Export**
|
||||
- [x] Desktop (Electron)
|
||||
- [x] Android (Capacitor Guide)
|
||||
|
||||
## ⚪ Phase 7: World Structure (New Direction)
|
||||
Strukturiranje sveta s fiksnimi lokacijami za boljši gameplay flow.
|
||||
|
||||
- [x] **Zone Definition**
|
||||
- [x] Define Constants (FARM @ 20,20; CITY @ 65,65)
|
||||
- [x] Implement Terrain Overrides (Dirt for Farm, Pavement for City)
|
||||
- [x] **City Content**
|
||||
- [x] Generate Ruins (Walls, Rubble, Rooms)
|
||||
- [x] High-Level Zombie Spawners
|
||||
- [x] Better Loot tables in City
|
||||
- [x] **Farm Content**
|
||||
- [x] Safe Zone Logic (Night Spawns prevented near Farm)
|
||||
- [x] Starter Resources (Chest with seeds!)
|
||||
- [x] **Navigation**
|
||||
- [x] Add Signposts or Roads connecting areas
|
||||
- [x] **Pathfinding System**
|
||||
- [x] Web Worker Integration (Async processing)
|
||||
- [x] A* Algorithm Implementation
|
||||
- [x] Integration with NPCs
|
||||
- [x] **Asset Optimization**
|
||||
- [x] Loading Screen (Visual Progress Bar)
|
||||
- [x] Transparent Sprite Processing
|
||||
- [x] Custom Asset Integration (Rocks, Trees)
|
||||
- [x] Asset Scaling Fixes
|
||||
|
||||
## 🟢 Phase 8: Gameplay Loop & Content
|
||||
Fokus na igralnost, loot in napredovanje.
|
||||
|
||||
- [x] **City Content**
|
||||
- [x] Unique Loot in Ruins (Scrap metal, Chips)
|
||||
- [x] Elite Zombies in City
|
||||
- [x] **Combat Polish**
|
||||
- [x] Visual Feedback on Hit (White flash)
|
||||
- [x] Knockback effect
|
||||
- [x] **World Details**
|
||||
- [x] Roads connecting Farm and City
|
||||
- [x] Signposts
|
||||
|
||||
## 🧬 Phase 9: Antigravity Transformation (Design Overhaul)
|
||||
Implementacija arhitekturnih stebrov po zgledu Stardew Valley.
|
||||
|
||||
- [x] **Core Engine Setup** (`Antigravity.js`)
|
||||
- [x] Global Namespace & Config
|
||||
- [x] Centralized Update Loop
|
||||
- [x] **Rendering Pipeline**
|
||||
- [x] NEAREST Filter enforce
|
||||
- [x] Tile Padding/Extrude (No bleeding)
|
||||
- [x] Pixel-Perfect Math.round positioning
|
||||
- [x] **UI/Drawing Integration**: Združitev UI/Drawing modulov za enoten API.
|
||||
- [x] **Depth Sorting v2.0**
|
||||
- [x] Y-Sorting za vse entitete
|
||||
|
||||
## 🌈 Phase 10: Visual Overhaul & Realism (Current)
|
||||
Ekskluzivni vizualni popravki za potopitveno izkušnjo.
|
||||
|
||||
- [x] **Realistic Tools (3D Voxel)**: Sekira, Kramp, Motika, Meč, Zalivalka (v celoti proceduralno generirano).
|
||||
- [x] **Realistic Crops**:
|
||||
- [x] Pšenica (4 faze, zlati snopi).
|
||||
- [x] Koruza (Visoka rast, 4 faze, regeneracija).
|
||||
- [x] **Inventory Icons Update**: Unikatne ikone za semena in pridelke namesto generičnih krogov.
|
||||
- [x] **Sound Fixes**: Implementacija manjkajočih zvokov (npr. `playDig`).
|
||||
- [x] **Advanced World Details**:
|
||||
- [x] Boljša voda (animacija).
|
||||
- [x] Več dekoracij (ograje, poti).
|
||||
|
||||
## 🧟 Phase 11: Zombie Roots Integration (New Mechanics)
|
||||
Implementacija jedrnih mehanik iz novega koncepta "Krvava Žetev".
|
||||
|
||||
- [x] **Zombie Worker AI**
|
||||
- [x] `WORK_FARM`: Zombi avtomatsko zaliva/žanje v določenem radiusu.
|
||||
- [x] `WORK_MINE`: Zombi koplje kamenje/rudo.
|
||||
- [x] **Decay System**: Zombi s časom izgublja energijo/HP.
|
||||
- [x] **Death Drop**: Gnojilo (Fertilizer) + XP ob smrti.
|
||||
- [x] **Grave System**
|
||||
- [x] Izdelava Groba (Crafting) (via command).
|
||||
- [x] Počitek: Zombi v grobu se regenerira (počasneje razpada).
|
||||
- [x] **Expansion System (Micro Farm start)**
|
||||
- [x] Zaklepanje con (megla/neprehodno).
|
||||
- [x] Naloga: "Pošlji zombije očistit cono".
|
||||
- [x] **Hybrid Skill & Language**
|
||||
- [x] Skill Tree UI za Hibrida.
|
||||
- [x] Prevajalnik dialogov (Level 1: "...hggh", Level 10: "Nevarnost!").
|
||||
- [x] **Economy: Minting & Crafting**
|
||||
- [x] **Blueprint System**: Drop chance pri kopanju (`unlockRecipe(id)`).
|
||||
- [x] **Workstation Logic**:
|
||||
- [x] Workbench (Crafting UI v2.0).
|
||||
- [x] Furnace (Input slot -> Fuel -> Output slot timer).
|
||||
- [x] Talilnica (Furnace) za rudo -> palice.
|
||||
- [x] Kovnica (Mint) za palice -> kovanci.
|
||||
- [x] Kovnica (Mint) za palice -> zlatniki.
|
||||
- [x] **Building Expansion**
|
||||
- [x] **Barn**: Objekt za shranjevanje živali.
|
||||
- [x] **Silos**: Objekt za shranjevanje hrane (poveča kapaciteto).
|
||||
- [x] **Starter House**: Nadgradnje (Level 1 -> Level 2 dodata prostor).
|
||||
- [x] **Collection Album (Zbirateljstvo)**
|
||||
- [x] UI Knjiga (z nalepkami/slikami).
|
||||
- [x] Tracking System: Odklepanje vnosov ob pobiranju itemov.
|
||||
- [x] **Arheologija**: Naključna možnost za najdbo Artefakta pri kopanju zemlje.
|
||||
- [x] **World Events & Entities**
|
||||
- [x] **Nočna Sova**: Dostava Quest Itemov/Daril (vezano na Friendship system).
|
||||
- [x] **Netopirji**: Vizualni efekt (roji) za napoved eventov.
|
||||
- [x] **Mutanti**: Troli in Vilinci (AI + Spawn Logic).
|
||||
- [x] **Živali**: Mutirane (npr. krave) in Normalne živali.
|
||||
|
||||
## 🧬 Phase 12: Exploration & Legacy (Endgame)
|
||||
- [x] **Livestock System**
|
||||
- [x] Hlev za živali.
|
||||
- [x] Loot Tables: Normalno vs. Mutirano (Mleko vs. Svetleče Mleko).
|
||||
- [x] **Ocean System**
|
||||
- [x] Potapljanje (animacija, kisik bar).
|
||||
- [x] Čoln (Vehicle controller).
|
||||
- [x] Generacija Otokov (Island Nodes).
|
||||
- [x] **Legacy System (Generacije)**
|
||||
- [x] Age Counter (Leta/Letni časi).
|
||||
- [x] Marriage Logic + Child Spawn.
|
||||
- [x] **Inheritance**: Prenos inventarja/farme na novega lika ob smrti.
|
||||
- [x] **Fractions**
|
||||
- [x] Reputation System za Mutante (Dobri/Zlobni).
|
||||
|
||||
## 🌡️ Phase 13: Elements & Survival (Hardcore)
|
||||
- [x] **Weather System v2.0**
|
||||
- [x] **Letni Časi:** Zima (Sneg, Mraz), Poletje (Vročina, Suša).
|
||||
- [x] **Temperature Logic:** Če `Temp < 0` in nimaš `WinterCoat` -> HP pada.
|
||||
- [x] **Rastlinjak (Greenhouse):** Crafting Stekla (Mivka + Peč). Omogoča rast pozimi.
|
||||
- [ ] **Localization & Platforms**
|
||||
- [ ] JSON prevodi (SLO, EN, DE, IT, CN).
|
||||
- [ ] Language Selector v meniju.
|
||||
@@ -249,10 +442,14 @@ Implementacija jedrnih mehanik iz novega koncepta "Krvava Žetev".
|
||||
|
||||
## 🎬 Phase 14: Kickstarter Prep (Vertical Slice)
|
||||
Priprava poliranega dema za javnost.
|
||||
- [ ] **Demo Mode**: Omejitev igranja na 3 in-game dneve.
|
||||
- [x] **Demo Mode**: Omejitev igranja na 3 in-game dneve.
|
||||
- [ ] **UI Polish**: Zamenjava placeholder UI z "Rustikalnim/Post-apo" stilom.
|
||||
- [ ] **Trailer Tools**: Skripta za gladko premikanje kamere (za snemanje).
|
||||
- [ ] **Visual Polish**: Dodajanje "Juice" efektov (Particles, Screenshake, Lighting).
|
||||
- [x] **Visual Polish**: Dodajanje "Juice" efektov (Particles, Screenshake, Lighting).
|
||||
|
||||
## 🎨 Phase 15: Polish & Release Prep
|
||||
- [ ] **Concept Integration**
|
||||
- [ ] Poenotenje vseh sistemov pod `Antigravity` namespace (Future Refactor)
|
||||
|
||||
---
|
||||
**PROJECT STATUS: PLANNING COMPLETE SAGA** 🌍
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
<script src="src/systems/CollectionSystem.js"></script>
|
||||
<script src="src/systems/HybridSkillSystem.js"></script>
|
||||
<script src="src/systems/OceanSystem.js"></script>
|
||||
<script src="src/systems/VisualEffectsSystem.js"></script>
|
||||
|
||||
<!-- Multiplayer -->
|
||||
<!-- <script src="https://cdn.socket.io/4.7.2/socket.io.min.js"></script> -->
|
||||
|
||||
@@ -10,7 +10,8 @@ class BuildingSystem {
|
||||
house: { name: 'House', cost: { wood: 20, stone: 20, gold: 50 }, w: 1, h: 1 }, // Visual is bigger but anchor is 1 tile
|
||||
barn: { name: 'Barn', cost: { wood: 50, stone: 10 }, w: 1, h: 1 },
|
||||
silo: { name: 'Silo', cost: { wood: 30, stone: 30 }, w: 1, h: 1 },
|
||||
stable: { name: 'Stable', cost: { wood: 40, stone: 20 }, w: 1, h: 1 }
|
||||
stable: { name: 'Stable', cost: { wood: 40, stone: 20 }, w: 1, h: 1 },
|
||||
greenhouse: { name: 'Greenhouse', cost: { glass: 20, wood: 15 }, w: 2, h: 2 } // Winter farming
|
||||
};
|
||||
|
||||
// Textures init
|
||||
|
||||
128
src/systems/VisualEffectsSystem.js
Normal file
128
src/systems/VisualEffectsSystem.js
Normal file
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* VISUAL EFFECTS SYSTEM
|
||||
* Handles juice effects: screenshake, particles, lighting
|
||||
*/
|
||||
class VisualEffectsSystem {
|
||||
constructor(scene) {
|
||||
this.scene = scene;
|
||||
this.camera = scene.cameras.main;
|
||||
this.isShaking = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Screenshake effect
|
||||
* @param {number} intensity - Shake strength (default 0.005)
|
||||
* @param {number} duration - Duration in ms (default 300)
|
||||
*/
|
||||
screenshake(intensity = 0.005, duration = 300) {
|
||||
if (this.isShaking) return;
|
||||
|
||||
this.isShaking = true;
|
||||
this.camera.shake(duration, intensity);
|
||||
|
||||
this.scene.time.delayedCall(duration, () => {
|
||||
this.isShaking = false;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Hit particles (sparks)
|
||||
*/
|
||||
createHitParticles(x, y, color = 0xFFFFFF) {
|
||||
const particles = this.scene.add.particles(x, y, 'particle_white', {
|
||||
speed: { min: 100, max: 200 },
|
||||
angle: { min: 0, max: 360 },
|
||||
scale: { start: 0.5, end: 0 },
|
||||
lifespan: 300,
|
||||
quantity: 8,
|
||||
tint: color
|
||||
});
|
||||
|
||||
this.scene.time.delayedCall(500, () => {
|
||||
particles.destroy();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Explosion particles
|
||||
*/
|
||||
createExplosion(x, y, color = 0xFF4444) {
|
||||
const particles = this.scene.add.particles(x, y, 'particle_white', {
|
||||
speed: { min: 200, max: 400 },
|
||||
angle: { min: 0, max: 360 },
|
||||
scale: { start: 1, end: 0 },
|
||||
lifespan: 600,
|
||||
quantity: 20,
|
||||
tint: color,
|
||||
gravityY: 300
|
||||
});
|
||||
|
||||
this.scene.time.delayedCall(800, () => {
|
||||
particles.destroy();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Dust particles (for movement)
|
||||
*/
|
||||
createDustPuff(x, y) {
|
||||
const particles = this.scene.add.particles(x, y, 'particle_white', {
|
||||
speed: { min: 30, max: 60 },
|
||||
angle: { min: 0, max: 360 },
|
||||
scale: { start: 0.3, end: 0 },
|
||||
lifespan: 400,
|
||||
quantity: 5,
|
||||
tint: 0xCCBBAA,
|
||||
alpha: { start: 0.5, end: 0 }
|
||||
});
|
||||
|
||||
this.scene.time.delayedCall(500, () => {
|
||||
particles.destroy();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Flash effect (for damage, powerups)
|
||||
*/
|
||||
flash(color = 0xFFFFFF, duration = 100) {
|
||||
this.camera.flash(duration, ...this.hexToRGB(color));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fade effect
|
||||
*/
|
||||
fadeOut(duration = 1000, callback) {
|
||||
this.camera.fadeOut(duration, 0, 0, 0);
|
||||
if (callback) {
|
||||
this.scene.time.delayedCall(duration, callback);
|
||||
}
|
||||
}
|
||||
|
||||
fadeIn(duration = 1000) {
|
||||
this.camera.fadeIn(duration, 0, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility: Hex to RGB
|
||||
*/
|
||||
hexToRGB(hex) {
|
||||
return [
|
||||
(hex >> 16) & 255,
|
||||
(hex >> 8) & 255,
|
||||
hex & 255
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Create simple white pixel texture for particles
|
||||
*/
|
||||
static createParticleTexture(scene) {
|
||||
if (scene.textures.exists('particle_white')) return;
|
||||
|
||||
const graphics = scene.make.graphics({ x: 0, y: 0, add: false });
|
||||
graphics.fillStyle(0xFFFFFF, 1);
|
||||
graphics.fillCircle(4, 4, 4);
|
||||
graphics.generateTexture('particle_white', 8, 8);
|
||||
graphics.destroy();
|
||||
}
|
||||
}
|
||||
@@ -73,6 +73,11 @@ class WeatherSystem {
|
||||
|
||||
// Check for Season Change
|
||||
this.checkSeasonChange();
|
||||
|
||||
// DEMO MODE: 3-day limit
|
||||
if (this.dayCount > 3) {
|
||||
this.triggerDemoEnd();
|
||||
}
|
||||
}
|
||||
|
||||
// Update Phase
|
||||
@@ -348,4 +353,77 @@ class WeatherSystem {
|
||||
overlay.fillRect(0, 0, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
updateTemperature(delta) {
|
||||
// Calculate base temperature from season
|
||||
const seasonTemps = {
|
||||
spring: 15,
|
||||
summer: 30,
|
||||
autumn: 10,
|
||||
winter: -5
|
||||
};
|
||||
|
||||
this.baseTemp = seasonTemps[this.currentSeason] || 20;
|
||||
|
||||
// Time of day variation
|
||||
const timeVar = Math.sin((this.gameTime / 24) * Math.PI * 2) * 5;
|
||||
this.currentTemp = this.baseTemp + timeVar;
|
||||
|
||||
// Temperature damage logic
|
||||
this.tempCheckTimer += delta;
|
||||
if (this.tempCheckTimer >= this.tempDamageInterval) {
|
||||
this.tempCheckTimer = 0;
|
||||
this.checkTemperatureDamage();
|
||||
}
|
||||
}
|
||||
|
||||
checkTemperatureDamage() {
|
||||
if (!this.scene.player) return;
|
||||
|
||||
const player = this.scene.player;
|
||||
const inventory = this.scene.inventorySystem;
|
||||
|
||||
// Check for winter coat protection
|
||||
const hasWinterCoat = inventory && inventory.hasItem('winter_coat');
|
||||
const hasSummerHat = inventory && inventory.hasItem('summer_hat');
|
||||
|
||||
// Cold damage (Winter)
|
||||
if (this.currentTemp < 0 && !hasWinterCoat) {
|
||||
player.takeDamage(5);
|
||||
this.scene.events.emit('show-floating-text', {
|
||||
x: player.sprite.x,
|
||||
y: player.sprite.y - 40,
|
||||
text: '❄️ Freezing!',
|
||||
color: '#88D4FF'
|
||||
});
|
||||
}
|
||||
|
||||
// Heat damage (Summer)
|
||||
if (this.currentTemp > 35 && !hasSummerHat) {
|
||||
player.takeDamage(3);
|
||||
this.scene.events.emit('show-floating-text', {
|
||||
x: player.sprite.x,
|
||||
y: player.sprite.y - 40,
|
||||
text: '🔥 Overheating!',
|
||||
color: '#FF8844'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getTemperature() {
|
||||
return Math.round(this.currentTemp);
|
||||
}
|
||||
|
||||
triggerDemoEnd() {
|
||||
console.log('🎮 DEMO END - 3 Days Completed!');
|
||||
|
||||
// Pause game
|
||||
this.scene.physics.pause();
|
||||
|
||||
// Show demo end screen
|
||||
const uiScene = this.scene.scene.get('UIScene');
|
||||
if (uiScene) {
|
||||
uiScene.showDemoEndScreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user