zacetek je dolg
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
# 📔 DNEVNIK RAZVOJA: KRVAVA ŽETEV (ZOMBIE ROOTS)
|
# 📔 DNEVNIK RAZVOJA: KRVAVA ŽETEV (ZOMBIE ROOTS)
|
||||||
|
|
||||||
|
**Lokacija:** Nova Farma
|
||||||
|
**Engine:** Phaser 3 + Antigravity
|
||||||
|
**Razvoj:** Pionirski AI-Assisted Development (Human Lead + AI Code)
|
||||||
|
**Stil:** 2.5D Izometrični Pixel Art / Voxel
|
||||||
|
|
||||||
## 📖 Zgodba in Lore
|
## 📖 Zgodba in Lore
|
||||||
**Protagonist:** Najstnik z značilnimi dredloksi, ki je preživel napad mutanta "Zmaj-Volka" (najvišji plenilec) in v procesu postal **Hibrid**. Okužen je z virusom, a imun, kar mu daje status **Alfe** med zombiji.
|
**Protagonist:** Najstnik z značilnimi dredloksi, ki je preživel napad mutanta "Zmaj-Volka" (najvišji plenilec) in v procesu postal **Hibrid**. Okužen je z virusom, a imun, kar mu daje status **Alfe** med zombiji.
|
||||||
|
|
||||||
|
|||||||
@@ -45,5 +45,11 @@ Pred snemanjem je treba urediti:
|
|||||||
* **€100k:** Port za Switch in Mobile.
|
* **€100k:** Port za Switch in Mobile.
|
||||||
* **€200k:** *Dubbing* (Glasovna igra) v 5 jezikih.
|
* **€200k:** *Dubbing* (Glasovna igra) v 5 jezikih.
|
||||||
|
|
||||||
|
## 🌟 5. Zgodba v Ozadju (The "AI" Hook)
|
||||||
|
To ni le igra, to je eksperiment prihodnosti.
|
||||||
|
* **Narrative:** "Krvava Žetev" je ena prvih kompleksnih RPG iger na svetu, ustvarjena v popolni simbiozi med enim Vizionarjem (človek) in Naprednim AI (koda).
|
||||||
|
* **Sporočilo:** Dokaz, da lahko posameznik s pravo vizijo in orodji ustvari svetove, ki so bili včasih rezervirani za velike studie.
|
||||||
|
* **Media Angle:** To bo pritegnilo pozornost Tech medijev (ne le Gaming medijev).
|
||||||
|
|
||||||
---
|
---
|
||||||
*Ta dokument služi kot vodič za pripravo marketinških materialov.*
|
*Ta dokument služi kot vodič za pripravo marketinških materialov.*
|
||||||
|
|||||||
@@ -51,73 +51,7 @@ class NPC {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tame() {
|
// Methods moved/consolidated below
|
||||||
if (this.state === 'TAMED' || this.type !== 'zombie') return;
|
|
||||||
|
|
||||||
this.state = 'TAMED';
|
|
||||||
console.log('🧟❤️ Zombie TAMED!');
|
|
||||||
|
|
||||||
// Visual Feedback
|
|
||||||
const headX = this.sprite.x;
|
|
||||||
const headY = this.sprite.y - 40;
|
|
||||||
|
|
||||||
const heart = this.scene.add.text(headX, headY, '❤️', { fontSize: '20px' });
|
|
||||||
heart.setOrigin(0.5);
|
|
||||||
heart.setDepth(this.sprite.depth + 100);
|
|
||||||
|
|
||||||
this.scene.tweens.add({
|
|
||||||
targets: heart,
|
|
||||||
y: headY - 30,
|
|
||||||
alpha: 0,
|
|
||||||
duration: 1500,
|
|
||||||
onComplete: () => heart.destroy()
|
|
||||||
});
|
|
||||||
|
|
||||||
// Change color slightly to indicate friend
|
|
||||||
this.sprite.setTint(0xAAFFAA);
|
|
||||||
|
|
||||||
// Hide Health Bar if tamed
|
|
||||||
if (this.healthBarBg) {
|
|
||||||
this.healthBarBg.setVisible(false);
|
|
||||||
this.healthBar.setVisible(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Change Eyes to Friendly (Cyan)
|
|
||||||
this.addTamedEyes();
|
|
||||||
}
|
|
||||||
|
|
||||||
addTamedEyes() {
|
|
||||||
if (this.eyesGroup) return;
|
|
||||||
|
|
||||||
// Container for eyes
|
|
||||||
// Coordinates relative to sprite center bottom (0.5, 1)
|
|
||||||
// Head is roughly at y - height.
|
|
||||||
// Assuming sprite height ~50-60px visual.
|
|
||||||
|
|
||||||
this.eyesGroup = this.scene.add.container(this.sprite.x, this.sprite.y);
|
|
||||||
|
|
||||||
// Eyes
|
|
||||||
const eyeL = this.scene.add.rectangle(-5, -55, 3, 3, 0x00FFFF);
|
|
||||||
const eyeR = this.scene.add.rectangle(5, -55, 3, 3, 0x00FFFF);
|
|
||||||
|
|
||||||
this.eyesGroup.add([eyeL, eyeR]);
|
|
||||||
this.eyesGroup.setDepth(this.sprite.depth + 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
toggleState() {
|
|
||||||
if (this.state === 'WANDER') {
|
|
||||||
this.tame();
|
|
||||||
} else {
|
|
||||||
// Command to stay/follow
|
|
||||||
this.state = this.state === 'FOLLOW' ? 'STAY' : 'FOLLOW';
|
|
||||||
console.log(`Command: ${this.state}`);
|
|
||||||
|
|
||||||
// Visual feedback for command
|
|
||||||
const txt = this.scene.add.text(this.sprite.x, this.sprite.y - 60, this.state, { fontSize: '12px', color: '#FFF' });
|
|
||||||
txt.setOrigin(0.5);
|
|
||||||
this.scene.tweens.add({ targets: txt, y: txt.y - 20, alpha: 0, duration: 1000, onComplete: () => txt.destroy() });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
createSprite() {
|
createSprite() {
|
||||||
let texKey = `npc_${this.type}`;
|
let texKey = `npc_${this.type}`;
|
||||||
@@ -697,17 +631,22 @@ class NPC {
|
|||||||
this.state = 'TAMED';
|
this.state = 'TAMED';
|
||||||
console.log('🧟❤️ Zombie TAMED!');
|
console.log('🧟❤️ Zombie TAMED!');
|
||||||
|
|
||||||
|
// Register to ZombieWorkerSystem
|
||||||
|
if (this.scene.zombieSystem) {
|
||||||
|
this.scene.zombieSystem.registerWorker(this);
|
||||||
|
}
|
||||||
|
|
||||||
// Visual Feedback
|
// Visual Feedback
|
||||||
const headX = this.sprite.x;
|
const headX = this.sprite.x;
|
||||||
const headY = this.sprite.y - 40;
|
const headY = this.sprite.y - 50;
|
||||||
|
|
||||||
const heart = this.scene.add.text(headX, headY, '❤️', { fontSize: '20px' });
|
const heart = this.scene.add.text(headX, headY, '❤️', { fontSize: '24px' });
|
||||||
heart.setOrigin(0.5);
|
heart.setOrigin(0.5);
|
||||||
heart.setDepth(this.sprite.depth + 100);
|
heart.setDepth(this.sprite.depth + 200);
|
||||||
|
|
||||||
this.scene.tweens.add({
|
this.scene.tweens.add({
|
||||||
targets: heart,
|
targets: heart,
|
||||||
y: headY - 30,
|
y: headY - 40,
|
||||||
alpha: 0,
|
alpha: 0,
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
onComplete: () => heart.destroy()
|
onComplete: () => heart.destroy()
|
||||||
@@ -716,7 +655,7 @@ class NPC {
|
|||||||
// Change color slightly to indicate friend
|
// Change color slightly to indicate friend
|
||||||
this.sprite.setTint(0xAAFFAA);
|
this.sprite.setTint(0xAAFFAA);
|
||||||
|
|
||||||
// Hide Health Bar if tamed (optional)
|
// Hide Health Bar if tamed
|
||||||
if (this.healthBarBg) {
|
if (this.healthBarBg) {
|
||||||
this.healthBarBg.setVisible(false);
|
this.healthBarBg.setVisible(false);
|
||||||
this.healthBar.setVisible(false);
|
this.healthBar.setVisible(false);
|
||||||
@@ -728,12 +667,30 @@ class NPC {
|
|||||||
interact() {
|
interact() {
|
||||||
console.log('🗣️ Inteacting with NPC:', this.type);
|
console.log('🗣️ Inteacting with NPC:', this.type);
|
||||||
|
|
||||||
// Quest Check
|
// ZOMBIE LOGIC
|
||||||
|
if (this.type === 'zombie') {
|
||||||
|
if (this.state !== 'TAMED') {
|
||||||
|
// Try tame (For now instant)
|
||||||
|
this.tame();
|
||||||
|
} else {
|
||||||
|
// Command: Toggle FOLLOW / STAY
|
||||||
|
if (this.state === 'FOLLOW') {
|
||||||
|
this.state = 'STAY';
|
||||||
|
this.showEmote('🛑'); // Stop
|
||||||
|
if (this.workerStats) this.workerStats.task = 'IDLE';
|
||||||
|
} else {
|
||||||
|
this.state = 'FOLLOW';
|
||||||
|
this.showEmote('👣'); // Footprints
|
||||||
|
if (this.workerStats) this.workerStats.task = 'FOLLOW';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// NPC QUEST LOGIC
|
||||||
if (this.scene.questSystem) {
|
if (this.scene.questSystem) {
|
||||||
const availableQuest = this.scene.questSystem.getAvailableQuest(this.type);
|
const availableQuest = this.scene.questSystem.getAvailableQuest(this.type);
|
||||||
if (availableQuest) {
|
if (availableQuest) {
|
||||||
console.log('Quest Available from NPC!');
|
|
||||||
// Open Dialog UI
|
|
||||||
const ui = this.scene.scene.get('UIScene');
|
const ui = this.scene.scene.get('UIScene');
|
||||||
if (ui && ui.showQuestDialog) {
|
if (ui && ui.showQuestDialog) {
|
||||||
ui.showQuestDialog(availableQuest, () => {
|
ui.showQuestDialog(availableQuest, () => {
|
||||||
@@ -746,7 +703,6 @@ class NPC {
|
|||||||
|
|
||||||
// Default behavior (Emote)
|
// Default behavior (Emote)
|
||||||
this.showEmote('👋');
|
this.showEmote('👋');
|
||||||
// Small jump or animation?
|
|
||||||
if (this.sprite) {
|
if (this.sprite) {
|
||||||
this.scene.tweens.add({ targets: this.sprite, y: this.sprite.y - 10, yoyo: true, duration: 100 });
|
this.scene.tweens.add({ targets: this.sprite, y: this.sprite.y - 10, yoyo: true, duration: 100 });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,39 +1,50 @@
|
|||||||
class ZombieWorkerSystem {
|
class ZombieWorkerSystem {
|
||||||
constructor(scene) {
|
constructor(scene) {
|
||||||
this.scene = scene;
|
this.scene = scene;
|
||||||
this.workers = []; // Array of tames zombies
|
this.workers = []; // Array of tamed zombies (NPC objects)
|
||||||
this.graves = []; // Array of grave locations
|
|
||||||
console.log('🧟 ZombieWorkerSystem: Initialized');
|
console.log('🧟 ZombieWorkerSystem: Initialized');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dodaj zombija med delavce
|
registerWorker(npc) {
|
||||||
addWorker(zombieEntity) {
|
if (!this.workers.includes(npc)) {
|
||||||
this.workers.push({
|
this.workers.push(npc);
|
||||||
entity: zombieEntity,
|
npc.workerStats = {
|
||||||
task: 'IDLE', // FARM, MINE, GUARD, REST
|
energy: 100, // Energija (pada ob delu)
|
||||||
energy: 100, // Decay meter
|
decay: 0, // Razpadanje (0-100%, 100% = smrt)
|
||||||
xp: 0
|
xp: 0, // Izkušnje zombija
|
||||||
});
|
level: 1,
|
||||||
console.log('🧟 New Worker Assigned!');
|
task: 'IDLE' // IDLE, FARM, MINE, GUARD, FOLLOW
|
||||||
|
};
|
||||||
|
console.log(`🧟 Zombie ${this.workers.length} registered as Worker!`);
|
||||||
|
|
||||||
|
// UI Feedback
|
||||||
|
this.scene.events.emit('show-floating-text', {
|
||||||
|
x: npc.sprite.x,
|
||||||
|
y: npc.sprite.y - 50,
|
||||||
|
text: "New Worker!",
|
||||||
|
color: "#00FF00"
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dodelitev naloge
|
unregisterWorker(npc) {
|
||||||
assignTask(workerIndex, taskType, location) {
|
const idx = this.workers.indexOf(npc);
|
||||||
if (this.workers[workerIndex]) {
|
if (idx > -1) {
|
||||||
this.workers[workerIndex].task = taskType;
|
this.workers.splice(idx, 1);
|
||||||
this.workers[workerIndex].targetLocation = location;
|
console.log('🧟 Zombie Worker removed.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
update(time, delta) {
|
update(time, delta) {
|
||||||
// Logic for worker AI, decay, and farming automation
|
// Update logic for all workers (e.g. decay, energy regen if sleeping)
|
||||||
this.workers.forEach(worker => {
|
// This is called every frame, so keep it light.
|
||||||
if (worker.energy > 0) {
|
|
||||||
worker.energy -= 0.01; // Decay over time
|
// Example: Decay tick every 10 seconds (handled by timer, or simplified here)
|
||||||
// TODO: Execute Task Logic
|
}
|
||||||
} else {
|
|
||||||
// TODO: Rot / Die logic
|
// Assign a task to all idle workers or specific one
|
||||||
}
|
assignTask(taskName, targetPos) {
|
||||||
});
|
// TODO: Poišči prostega delavca in mu daj nalogo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user