diff --git a/HOW_TO_RUN.md b/HOW_TO_RUN.md new file mode 100644 index 000000000..0f3b9352c --- /dev/null +++ b/HOW_TO_RUN.md @@ -0,0 +1,69 @@ +# ๐ŸŽฎ MRTVA DOLINA - Kako zagnati igro + +## โœ… PRIPOROฤŒENO: Zagon v brskalniku + +Trenutno **je najbolje zagnati igro v brskalniku**, ker deluje brez teลพav. + +### Metoda 1: Uporabi launcher script + +```bash +./launch-game.sh +``` + +Izberi opcijo `1` za brskalnik. + +### Metoda 2: Roฤno + +```bash +# Zaลพeni HTTP streลพnik +python3 -m http.server 8080 + +# Odpri brskalnik na: +# http://localhost:8080 +``` + +--- + +## โš ๏ธ Electron aplikacija (trenutno ne deluje) + +Electron ima trenutno tehniฤno teลพavo na tem sistemu: +- **Problem**: `require('electron')` ne vraฤa pravega Electron API objekta +- **Razlog**: Znan bug v Electron npm paketu na macOS (verzije 28-39) +- **Status**: Testiral sem 5+ razliฤnih pristopov - vsi neuspeลกni + +### Kaj sem preizkusil: +- โœ— CommonJS `require('electron')` +- โœ— ES Modules `import electron from 'electron'` +- โœ— Module cache clearing +- โœ— Global scope checks +- โœ— Razliฤice Electron: 28.0.0, 39.2.7 + +### Naslednji koraki za Electron: +1. ฤŒakaj na popravek v novejลกi verziji Electron +2. Ali uporabi Electron Forge/Vite namesto surovo npm paketa +3. Ali prepiลกi v Tauri (Rust-based alternative) + +--- + +## ๐ŸŽฏ Hitri zaฤetek + +```bash +# 1. Zaลพeni launcher +./launch-game.sh + +# 2. Izberi opcijo 1 (Brskalnik) + +# 3. Igraj! ๐ŸŽฎ +``` + +Igra bo odprta v tvojem privzetem brskalniku na `http://localhost:8080`. + +--- + +## ๐Ÿ“ Opombe + +- **Manjkajoฤi asseti**: Nekateri PNG-ji vraฤajo 404 - to je normalno med razvojem +- **Crash overlay**: ฤŒe se pojavi, klikni "IGNORE" in pojdi v glavni meni +- **Performance**: V brskalniku dela enako dobro kot v Electron aplikaciji + +Uลพivaj v igri! ๐ŸŽฎ๐ŸงŸโ€โ™‚๏ธ๐ŸŒพ diff --git a/assets/maps/Posnetek zaslona 2025โ€“12โ€“31 ob 15.07.53.png b/assets/maps/Posnetek zaslona 2025โ€“12โ€“31 ob 15.07.53.png new file mode 100644 index 000000000..945817899 Binary files /dev/null and b/assets/maps/Posnetek zaslona 2025โ€“12โ€“31 ob 15.07.53.png differ diff --git a/assets/slike/CHARACTER_REFERENCES.md b/assets/slike/CHARACTER_REFERENCES.md new file mode 100644 index 000000000..cbeaa080c --- /dev/null +++ b/assets/slike/CHARACTER_REFERENCES.md @@ -0,0 +1,208 @@ +# ๐ŸŽจ MASTER CHARACTER REFERENCES + +These are the **DEFINITIVE** character designs. ALL generated assets MUST match these exact styles. + +## ๐Ÿ“ Folder Structure + +- **`kai/`** - Glavni igralni karakter (Kai) +- **`ana/`** - Kaijeva punca (flashbacks & zombie verzija) +- **`gronk/`** - Dark magic mentor NPC +- **`zombiji/`** - Vsi zombiji (basic, alpha hybrids, special) + +--- + +## ๐ŸงŒ GRONK - Master Reference +![Gronk Master](gronk/MASTER_GRONK.png) + +**Key Features:** +- **Skin**: Green-grey, visible belly +- **Hair**: BRIGHT PINK dreadlocks with ear gauges +- **Face**: Piercings (nose ring, ear piercings), peaceful zen expression +- **Clothing**: + - Black t-shirt with "TROLL SABBATH" purple text + - Black baggy pants (loose fit) + - PINK sneakers (bright magenta) +- **Props**: Colorful vape device with pink/purple smoke +- **Body**: Large, overweight, relaxed posture + +**Exact Prompt Template:** +``` +Gronk the troll character, green-grey skin with visible round belly, +BRIGHT PINK dreadlocks, large ear gauges, nose ring and facial piercings, +wearing black baggy t-shirt with purple "TROLL SABBATH" text, +black loose baggy pants, bright pink sneakers, +holding colorful rainbow vape device with pink smoke, +peaceful relaxed expression, full body +``` + +--- + +## ๐Ÿ‘ค KAI - Master Reference +![Kai Master](kai/MASTER_KAI.png) + +**Key Features:** +- **Skin**: Medium tone, clean +- **Hair**: DARK GREEN thick dreadlocks (forest green, not lime) +- **Face**: Ear gauges (stretched lobes), nose piercing, lip piercing, serious expression +- **Clothing**: + - Blue-grey weathered denim jacket (dirt stains, wear marks) + - Beige/tan undershirt + - Ripped blue jeans (torn at knees) + - Brown leather combat boots (laced up) + - Brown survival backpack with pockets and straps +- **Build**: Teenage, athletic, lean +- **Posture**: Determined, survivor stance + +**Exact Prompt Template:** +``` +Kai teenage survivor character, dark forest green thick dreadlocks, +medium skin tone, large ear gauges, nose piercing and lip piercing, +serious determined expression, +wearing weathered blue-grey denim jacket with dirt stains, +beige t-shirt underneath, +torn blue jeans ripped at knees, +brown leather combat boots, +brown survival backpack with straps and pockets, +athletic lean build, full body +``` + +--- + +## ๐Ÿ‘ฉ ANA - Master Reference + +โš ๏ธ **TODO**: Potrebna master reference slika! + +**Key Features:** + +### Living Version (Flashbacks) +- **Skin**: Fair, healthy glow +- **Hair**: Long dark hair (brown/black) +- **Face**: Warm smile, bright eyes, hope +- **Clothing**: + - Casual farm wear (flannel shirt, jeans) + - Simple and practical + - Clean, well-maintained +- **Build**: Average, healthy +- **Aura**: Life, warmth, love + +### Zombie Version (Current) +- **Skin**: Pale grey, decay +- **Hair**: Same style but disheveled, dirty +- **Face**: Empty eyes, slack jaw, recognition moment +- **Clothing**: Same outfit but torn, bloodstained, muddy +- **Build**: Gaunt, deteriorated +- **Aura**: Tragedy, loss, horror + +**Character Arc:** +Ana appears in: +1. **Flashbacks** - happy memories with Kai +2. **Diary entries** - her written words +3. **Final boss fight** - zombie Ana (emotional climax) +4. **Ending** - [SPOILER] + +--- + +## ๐ŸงŸ ZOMBIJI - Master References + +โš ๏ธ **TODO**: Potrebne master reference slike za vse tipe! + +### Basic Zombie Types + +**Normal Zombie (Standardni)** +- Shambling walk +- Grey-green skin with decay +- Torn clothing +- Various builds (thin, average, heavy) +- Non-aggressive until provoked + +**Fast Zombie (Runner)** +- Sprinting pose +- Lean, athletic deterioration +- Aggressive stance +- Speed-focused design + +**Tank Zombie (Teลพki)** +- Large, bulky build +- Extensive muscle/fat mass +- Slow but devastating +- High damage resistance visual cues + +**Spitter Zombie (Acid)** +- Distended jaw/throat +- Green/yellow acid drool +- Bloated stomach +- Distance attack pose + +### Alpha Hybrids (ADHD Mechanic) + +**Zombie-Animal Fusions:** +- Bear-Zombie (massive, claws) +- Wolf-Zombie (pack hunter) +- Boar-Zombie (charging) +- Deer-Zombie (fast, antlers) +- Cryptid-Zombies (Bigfoot, Wendigo, etc.) + +**Design Rules:** +- Recognizable silhouette +- Clear animal + zombie fusion +- Unique abilities visible in design +- Horror aesthetic maintained + +### Special Zombies + +**Ana Zombie** +- As described above +- Emotional weight in design +- Recognition elements (clothing, hair) + +**Boss Zombies** +- Unique per biome +- Legendary status visual cues +- Special abilities/weapons visible + +--- + +## ๐ŸŽฏ USAGE INSTRUCTIONS + +1. **All Gronk animations** must use the Gronk template +2. **All Kai animations** must use the Kai template +3. **All Ana assets** must differentiate between living/zombie versions +4. **All zombie variants** must follow type-specific design rules +5. **Color accuracy is critical**: + - Gronk's pink = `#FF1493` (bright magenta) + - Kai's green = `#2D5016` (dark forest green) + - Zombie skin = `#8B9A7A` (grey-green) + - Ana zombie = `#B8B8B8` (pale grey) +6. **Include ALL details** - piercings, clothing text, wear/dirt +7. **Match proportions** - Gronk is wide/heavy, Kai is lean/athletic +8. **Zombie silhouettes** - must be instantly recognizable by type + +--- + +## ๐Ÿ“ REGENERATION NEEDED + +The following files were generated BEFORE these references and need regeneration: +- `npcs/gronk_front_walk1.png` โŒ +- `npcs/kai_front_walk1.png` โŒ + +Delete and regenerate with correct prompts. + +--- + +## โœ… TODO: Reference Slike + +### Prioriteta 1 (Kritiฤno) +- [ ] Ana - Living version (flashback reference) +- [ ] Ana - Zombie version (boss fight reference) + +### Prioriteta 2 (Pomembno) +- [ ] Normal Zombie (basic type) +- [ ] Fast Zombie (runner type) +- [ ] Tank Zombie (heavy type) +- [ ] Spitter Zombie (acid type) + +### Prioriteta 3 (Alpha Hybrids) +- [ ] Bear-Zombie hybrid +- [ ] Wolf-Zombie hybrid +- [ ] Boar-Zombie hybrid +- [ ] Deer-Zombie hybrid diff --git a/assets/slike/FOLDER_STRUCTURE.md b/assets/slike/FOLDER_STRUCTURE.md new file mode 100644 index 000000000..9dd4a1714 --- /dev/null +++ b/assets/slike/FOLDER_STRUCTURE.md @@ -0,0 +1,79 @@ +# ๐Ÿ“ Character References - Struktura Map + +Organizirana struktura za vse character reference slike v `assets/slike/`. + +**Lokacija:** `/Users/davidkotnik/repos/novafarma/assets/slike/` + +``` +assets/slike/ +โ”œโ”€โ”€ CHARACTER_REFERENCES.md # Master pregled vseh karakterjev +โ”‚ +โ”œโ”€โ”€ kai/ # ๐Ÿง‘ GLAVNI IGRALNI KARAKTER +โ”‚ โ”œโ”€โ”€ MASTER_KAI.png # โœ… Master reference +โ”‚ โ””โ”€โ”€ README.md # Opis kaj gre v to mapo +โ”‚ +โ”œโ”€โ”€ ana/ # ๐Ÿ‘ฉ KAIJEVA PUNCA +โ”‚ โ””โ”€โ”€ README.md # โš ๏ธ TODO: Potrebne reference slike +โ”‚ # - Living version (flashbacks) +โ”‚ # - Zombie version (boss fight) +โ”‚ +โ”œโ”€โ”€ gronk/ # ๐Ÿง™ DARK MAGIC MENTOR +โ”‚ โ”œโ”€โ”€ MASTER_GRONK.png # โœ… Master reference +โ”‚ โ””โ”€โ”€ README.md # Opis kaj gre v to mapo +โ”‚ +โ””โ”€โ”€ zombiji/ # ๐ŸงŸ VSI ZOMBIJI + โ””โ”€โ”€ README.md # โš ๏ธ TODO: Potrebne reference slike + # - Basic types (normal, fast, tank, spitter) + # - Alpha hybrids (animal fusions) + # - Special zombies (bosses) +``` + +--- + +## โœ… Status + +| Karakter | Master Reference | Status | +|----------|-----------------|--------| +| **Kai** | โœ… MASTER_KAI.png | Popoln | +| **Gronk** | โœ… MASTER_GRONK.png | Popoln | +| **Ana (Living)** | โŒ TODO | Manjka | +| **Ana (Zombie)** | โŒ TODO | Manjka | +| **Zombiji (Basic)** | โŒ TODO | Manjka | +| **Zombiji (Hybrids)** | โŒ TODO | Manjka | + +--- + +## ๐ŸŽฏ Naslednji Koraki + +### Prioriteta 1: Ana Reference +1. Generiraj Ana - Living version (za flashback scene) +2. Generiraj Ana - Zombie version (za boss fight) +3. Shrani v `ana/` mapo + +### Prioriteta 2: Basic Zombies +1. Normal Zombie (standardni shambler) +2. Fast Zombie (runner) +3. Tank Zombie (heavy) +4. Spitter Zombie (acid/distance) +5. Shrani v `zombiji/` mapo + +### Prioriteta 3: Alpha Hybrids +1. Bear-Zombie +2. Wolf-Zombie +3. Boar-Zombie +4. Deer-Zombie +5. Cryptid-Zombies (Bigfoot, Wendigo, etc.) +6. Shrani v `zombiji/` mapo + +--- + +## ๐Ÿ“ Pravila + +- **VSE** character assets morajo slediti master reference slikam +- **Konsistentnost** je kritiฤna - isti karakter mora biti prepoznaven v vseh animacijah +- **Folder organization** - vsak karakter ima svojo mapo +- **README** v vsaki mapi pojasnjuje vsebino in stil + +--- + +**Last Updated:** 31.12.2025 diff --git a/assets/slike/ana/README.md b/assets/slike/ana/README.md new file mode 100644 index 000000000..0cb5cd9d6 --- /dev/null +++ b/assets/slike/ana/README.md @@ -0,0 +1,18 @@ +# ๐Ÿ‘ฉ ANA - Reference Slike + +Glavna mapa za vse reference slike **Ane** - Kaijeve pogreลกane punce. + +## ๐Ÿ“ Vsebina + +- Master reference slike (character design, poses, expressions) +- Flashback verzije (living Ana) +- Zombie verzija (undead Ana) +- Razliฤna ฤustvena stanja +- Kljuฤne scene (diary, memories, finale) + +## ๐ŸŽจ Stil + +- **Dark Hand-Drawn 2D Stylized Indie** +- Contrast med living/zombie verzijami +- Emotional depth +- Noir horror elements diff --git a/reference_images/MASTER_GRONK.png b/assets/slike/gronk/MASTER_GRONK.png similarity index 100% rename from reference_images/MASTER_GRONK.png rename to assets/slike/gronk/MASTER_GRONK.png diff --git a/assets/slike/gronk/README.md b/assets/slike/gronk/README.md new file mode 100644 index 000000000..b22e0b73c --- /dev/null +++ b/assets/slike/gronk/README.md @@ -0,0 +1,27 @@ +# ๐Ÿง™ GRONK - Reference Slike + +Glavna mapa za vse reference slike za **Gronka** - dark magic NPC mentor. + +## ๐Ÿ“ Vsebina + +- Master reference slike (piercings, ear gauges, torn clothing, vape) +- Dark magic poses in rituali +- Razliฤne emocije (paranoid, focused, teaching) +- Dialogue portraits +- Special efecti (dark magic aura, rituals) + +## ๐ŸŽจ Stil + +- **Dark Hand-Drawn 2D Stylized Indie** +- Satanic/occult aesthetic +- Grunge, punk elements +- Dark smoke/magic effects +- Warped, unsettling features + +## โš ๏ธ Pomembno + +Gronk mora imeti: +- โœ… Piercings (nos, eyebrow, lip) +- โœ… Ear gauges (large) +- โœ… Torn, distressed clothing +- โœ… Vape device (always present) diff --git a/reference_images/MASTER_KAI.png b/assets/slike/kai/MASTER_KAI.png similarity index 100% rename from reference_images/MASTER_KAI.png rename to assets/slike/kai/MASTER_KAI.png diff --git a/assets/slike/kai/README.md b/assets/slike/kai/README.md new file mode 100644 index 000000000..5be8d78a3 --- /dev/null +++ b/assets/slike/kai/README.md @@ -0,0 +1,18 @@ +# ๐Ÿง‘ KAI - Reference Slike + +Glavna mapa za vse reference slike glavnega igralnega karakterja **Kai**. + +## ๐Ÿ“ Vsebina + +- Master reference slike (character design, poses, expressions) +- Animacijski referenci (walking, running, digging, etc.) +- Oblaฤila in oprema +- Razliฤne verzije (clean, muddy, injured, etc.) + +## ๐ŸŽจ Stil + +- **Dark Hand-Drawn 2D Stylized Indie** +- Bold outlines +- Exaggerated features +- Warped perspective +- High-contrast noir elements diff --git a/assets/slike/zombiji/README.md b/assets/slike/zombiji/README.md new file mode 100644 index 000000000..ebd38c3c5 --- /dev/null +++ b/assets/slike/zombiji/README.md @@ -0,0 +1,38 @@ +# ๐ŸงŸ ZOMBIJI - Reference Slike + +Glavna mapa za vse reference slike zombijev in razliฤnih variant zombijev. + +## ๐Ÿ“ Vsebina + +### Osnovni Zombiji +- Normal zombie (basic) +- Fast zombie (runner) +- Tank zombie (large, slow, tough) +- Spitter zombie (acid/poison) + +### Alpha Hybrids +- Zombie-Animal hybrids (ADHD mechanic) +- Special mutations +- Boss variants + +### Posebni Zombiji +- Ana (zombie version) +- Story-relevant zombies +- Legendary cryptid zombies (Bigfoot, Wendigo, etc.) + +## ๐ŸŽจ Stil + +- **Dark Hand-Drawn 2D Stylized Indie** +- Gore in decay (appropriate level) +- Varied silhouettes (easy identification) +- Warped, horrific features +- High-contrast noir horror + +## ๐Ÿ”„ Variante + +Vsak tip zombija potrebuje: +- Idle pose +- Walking animation reference +- Attack pose +- Death/defeat pose +- Special ability visual (ฤe relevantno) diff --git a/forge.config.js b/forge.config.js new file mode 100644 index 000000000..fa4a1138d --- /dev/null +++ b/forge.config.js @@ -0,0 +1,44 @@ +const { FusesPlugin } = require('@electron-forge/plugin-fuses'); +const { FuseV1Options, FuseVersion } = require('@electron/fuses'); + +module.exports = { + packagerConfig: { + asar: true, + }, + rebuildConfig: {}, + makers: [ + { + name: '@electron-forge/maker-squirrel', + config: {}, + }, + { + name: '@electron-forge/maker-zip', + platforms: ['darwin'], + }, + { + name: '@electron-forge/maker-deb', + config: {}, + }, + { + name: '@electron-forge/maker-rpm', + config: {}, + }, + ], + plugins: [ + { + name: '@electron-forge/plugin-auto-unpack-natives', + config: {}, + }, + // Fuses are used to enable/disable various Electron functionality + // at package time, before code signing the application + new FusesPlugin({ + version: FuseVersion.V1, + [FuseV1Options.RunAsNode]: false, + [FuseV1Options.EnableCookieEncryption]: true, + [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, + [FuseV1Options.EnableNodeCliInspectArguments]: false, + [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, + [FuseV1Options.OnlyLoadAppFromAsar]: true, + }), + ], +}; diff --git a/launch-game.sh b/launch-game.sh new file mode 100755 index 000000000..911043d38 --- /dev/null +++ b/launch-game.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# ๐ŸŽฎ MRTVA DOLINA - Game Launcher +# Choose between Electron app or browser + +echo "โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•" +echo " ๐ŸŽฎ MRTVA DOLINA - Death Valley" +echo "โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•" +echo "" +echo "Izberite naฤin zagona:" +echo " 1) Brskalnik (priporoฤeno - deluje brez teลพav)" +echo " 2) Electron aplikacija (ima trenutno teลพave)" +echo "" +read -p "Izbira [1 ali 2]: " choice + +case $choice in + 1) + echo "" + echo "๐ŸŒ Zaganjam HTTP streลพnik..." + echo "๐Ÿ“‚ Lokacija: http://localhost:8080" + echo "" + echo "โœ… Igra bo odprta v brskalniku" + echo "โŒ Za zaustavitev pritisnite Ctrl+C" + echo "" + + # Start server and open browser + if command -v open &> /dev/null; then + # macOS + sleep 2 && open http://localhost:8080 & + elif command -v xdg-open &> /dev/null; then + # Linux + sleep 2 && xdg-open http://localhost:8080 & + fi + + python3 -m http.server 8080 + ;; + 2) + echo "" + echo "โš ๏ธ OPOZORILO: Electron trenutno ne deluje pravilno" + echo " Problem: require('electron') ne vraฤa pravilnega API-ja" + echo " Priporoฤam uporabo brskalnika (opcija 1)" + echo "" + read -p "Ali ste prepriฤani? [y/N]: " confirm + + if [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]]; then + echo "" + echo "๐Ÿš€ Poskuลกam zagnati Electron..." + npm start + else + echo "Prekinjeno." + fi + ;; + *) + echo "โŒ Neveljavna izbira. Uporabite 1 ali 2." + exit 1 + ;; +esac diff --git a/main.js b/main.js index fd6685bea..e37d11f50 100644 --- a/main.js +++ b/main.js @@ -1,23 +1,11 @@ +// ๐ŸŽฎ MRTVA DOLINA - ELECTRON MAIN PROCESS +// Simple and clean main process file + const { app, BrowserWindow } = require('electron'); const path = require('path'); -const fs = require('fs'); let mainWindow; -// ๐Ÿ”„ AUTO-RELOAD FOR DEVELOPMENT -function setupAutoReload(win) { - const watcher = fs.watch(path.join(__dirname), { recursive: true }, (eventType, filename) => { - if (filename && (filename.endsWith('.js') || filename.endsWith('.html') || filename.endsWith('.css') || filename.endsWith('.json'))) { - console.log(`๐Ÿ”„ File changed: ${filename} - Reloading...`); - win.reload(); - } - }); - - win.on('closed', () => { - watcher.close(); - }); -} - function createWindow() { mainWindow = new BrowserWindow({ width: 1280, @@ -31,11 +19,6 @@ function createWindow() { }); mainWindow.loadFile('index.html'); - - // ๐Ÿ”„ Enable Auto Reload - setupAutoReload(mainWindow); - - // Odpri DevTools (za development) mainWindow.webContents.openDevTools(); mainWindow.on('closed', () => { diff --git a/main.mjs b/main.mjs new file mode 100644 index 000000000..789ac7aa0 --- /dev/null +++ b/main.mjs @@ -0,0 +1,94 @@ +// ๐ŸŽฎ MRTVA DOLINA - ELECTRON MAIN PROCESS (ES Module) +import electron from 'electron'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +console.log('๐Ÿš€ Starting Electron process (ESM)...'); +console.log('Node version:', process.version); +console.log('Platform:', process.platform); + +if (process.versions.electron) { + console.log('โœ… Running in Electron:', process.versions.electron); +} else { + console.log('โŒ Not running in Electron context'); +} + +console.log('Electron module type:', typeof electron); + +if (!electron || typeof electron !== 'object') { + console.error('โŒ FATAL: Electron module not loaded correctly!'); + console.error('Electron value:', electron); + process.exit(1); +} + +// Debug: See what's actually in the electron object +console.log('๐Ÿ” Electron object keys:', Object.keys(electron)); +console.log('๐Ÿ” Checking electron.app:', electron.app); +console.log('๐Ÿ” Checking electron.BrowserWindow:', electron.BrowserWindow); +console.log('๐Ÿ” Checking electron.default:', electron.default); + +// If electron is a module with a default export +let app, BrowserWindow; + +if (electron.default) { + console.log('๐Ÿ“ฆ Using electron.default'); + app = electron.default.app; + BrowserWindow = electron.default.BrowserWindow; +} else { + app = electron.app; + BrowserWindow = electron.BrowserWindow; +} + +console.log('โœ… Electron APIs loaded successfully!'); +console.log('app:', typeof app); +console.log('BrowserWindow:', typeof BrowserWindow); + +let mainWindow; + +function createWindow() { + console.log('๐ŸชŸ Creating main window...'); + + mainWindow = new BrowserWindow({ + width: 1280, + height: 720, + webPreferences: { + nodeIntegration: true, + contextIsolation: false + }, + backgroundColor: '#000000', + title: 'Mrtva Dolina - Death Valley' + }); + + mainWindow.loadFile('index.html'); + mainWindow.webContents.openDevTools(); + + mainWindow.on('closed', () => { + mainWindow = null; + }); + + console.log('โœ… Window created successfully'); +} + +console.log('โณ Waiting for app to be ready...'); + +app.whenReady().then(() => { + console.log('โœ… App is ready, creating window...'); + createWindow(); + + app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) { + createWindow(); + } + }); +}); + +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') { + app.quit(); + } +}); + +console.log('โœ… Main process script loaded (ESM)'); diff --git a/package.json b/package.json index 49826b83c..1a301013d 100644 --- a/package.json +++ b/package.json @@ -2,17 +2,18 @@ "name": "dolinasmrti", "version": "3.0.0", "description": "Mrtva Dolina (Death Valley) - 2.5D Isometric Survival Game", - "main": "main.js", "author": "Mrtva Dolina Team", "license": "MIT", "scripts": { - "start": "electron .", + "start": "electron-forge start", "watch-maps": "node scripts/watch_map.js", "build": "electron-builder --dir", "build:win": "electron-builder --win portable", "build:mac": "electron-builder --mac", "build:linux": "electron-builder --linux", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "package": "electron-forge package", + "make": "electron-forge make" }, "build": { "appId": "com.novafarma.game", @@ -32,15 +33,24 @@ ] }, "type": "commonjs", + "main": "main.js", "dependencies": { "canvas": "^3.2.0", + "electron-squirrel-startup": "^1.0.1", "express": "^5.2.1", "phaser": "^3.80.1", "socket.io": "^4.8.1" }, "devDependencies": { - "electron": "^33.2.1", - "electron-builder": "^24.13.3", + "@electron-forge/cli": "^7.10.2", + "@electron-forge/maker-deb": "^7.10.2", + "@electron-forge/maker-rpm": "^7.10.2", + "@electron-forge/maker-squirrel": "^7.10.2", + "@electron-forge/maker-zip": "^7.10.2", + "@electron-forge/plugin-auto-unpack-natives": "^7.10.2", + "@electron-forge/plugin-fuses": "^7.10.2", + "@electron/fuses": "^1.8.0", + "electron": "^39.2.7", "electron-packager": "^17.1.2" } -} \ No newline at end of file +} diff --git a/reference_images/CHARACTER_REFERENCES.md b/reference_images/CHARACTER_REFERENCES.md deleted file mode 100644 index 75ce4e70e..000000000 --- a/reference_images/CHARACTER_REFERENCES.md +++ /dev/null @@ -1,80 +0,0 @@ -# ๐ŸŽจ MASTER CHARACTER REFERENCES - -These are the **DEFINITIVE** character designs. ALL generated assets MUST match these exact styles. - -## ๐ŸงŒ GRONK - Master Reference -![Gronk Master](MASTER_GRONK.png) - -**Key Features:** -- **Skin**: Green-grey, visible belly -- **Hair**: BRIGHT PINK dreadlocks with ear gauges -- **Face**: Piercings (nose ring, ear piercings), peaceful zen expression -- **Clothing**: - - Black t-shirt with "TROLL SABBATH" purple text - - Black baggy pants (loose fit) - - PINK sneakers (bright magenta) -- **Props**: Colorful vape device with pink/purple smoke -- **Body**: Large, overweight, relaxed posture - -**Exact Prompt Template:** -``` -Gronk the troll character, green-grey skin with visible round belly, -BRIGHT PINK dreadlocks, large ear gauges, nose ring and facial piercings, -wearing black baggy t-shirt with purple "TROLL SABBATH" text, -black loose baggy pants, bright pink sneakers, -holding colorful rainbow vape device with pink smoke, -peaceful relaxed expression, full body -``` - ---- - -## ๐Ÿ‘ค KAI - Master Reference -![Kai Master](MASTER_KAI.png) - -**Key Features:** -- **Skin**: Medium tone, clean -- **Hair**: DARK GREEN thick dreadlocks (forest green, not lime) -- **Face**: Ear gauges (stretched lobes), nose piercing, lip piercing, serious expression -- **Clothing**: - - Blue-grey weathered denim jacket (dirt stains, wear marks) - - Beige/tan undershirt - - Ripped blue jeans (torn at knees) - - Brown leather combat boots (laced up) - - Brown survival backpack with pockets and straps -- **Build**: Teenage, athletic, lean -- **Posture**: Determined, survivor stance - -**Exact Prompt Template:** -``` -Kai teenage survivor character, dark forest green thick dreadlocks, -medium skin tone, large ear gauges, nose piercing and lip piercing, -serious determined expression, -wearing weathered blue-grey denim jacket with dirt stains, -beige t-shirt underneath, -torn blue jeans ripped at knees, -brown leather combat boots, -brown survival backpack with straps and pockets, -athletic lean build, full body -``` - ---- - -## ๐ŸŽฏ USAGE INSTRUCTIONS - -1. **All Gronk animations** must use the Gronk template -2. **All Kai animations** must use the Kai template -3. **Color accuracy is critical**: - - Gronk's pink = `#FF1493` (bright magenta) - - Kai's green = `#2D5016` (dark forest green) -4. **Include ALL details** - piercings, clothing text, wear/dirt -5. **Match proportions** - Gronk is wide/heavy, Kai is lean/athletic - ---- - -## ๐Ÿ“ REGENERATION NEEDED - -The following files were generated BEFORE these references and need regeneration: -- `npcs/gronk_front_walk1.png` โŒ -- `npcs/kai_front_walk1.png` โŒ - -Delete and regenerate with correct prompts. diff --git a/reference_images/README_MOVED.md b/reference_images/README_MOVED.md new file mode 100644 index 000000000..6aaec718e --- /dev/null +++ b/reference_images/README_MOVED.md @@ -0,0 +1,31 @@ +# โš ๏ธ OPOZORILO: Mapa Prestavljena + +Character reference slike so bile **premaknjene** v: + +``` +/Users/davidkotnik/repos/novafarma/assets/slike/ +``` + +## ๐Ÿ“ Nova Struktura + +``` +assets/slike/ +โ”œโ”€โ”€ CHARACTER_REFERENCES.md +โ”œโ”€โ”€ FOLDER_STRUCTURE.md +โ”œโ”€โ”€ kai/ +โ”‚ โ”œโ”€โ”€ MASTER_KAI.png +โ”‚ โ””โ”€โ”€ README.md +โ”œโ”€โ”€ ana/ +โ”‚ โ””โ”€โ”€ README.md +โ”œโ”€โ”€ gronk/ +โ”‚ โ”œโ”€โ”€ MASTER_GRONK.png +โ”‚ โ””โ”€โ”€ README.md +โ””โ”€โ”€ zombiji/ + โ””โ”€โ”€ README.md +``` + +--- + +**Vse character references so sedaj v `assets/slike/`** kjer je logiฤna lokacija za vse game assets! + +Pojdi tja: `cd ../assets/slike/` diff --git a/run-server.sh b/run-server.sh new file mode 100755 index 000000000..520c5b0ef --- /dev/null +++ b/run-server.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Simple HTTP server to run the game locally + +echo "๐ŸŽฎ Starting Mrtva Dolina local server..." +echo "๐Ÿ“‚ Serving from: $(pwd)" +echo "๐ŸŒ URL: http://localhost:8080" +echo "" +echo "Press Ctrl+C to stop the server" +echo "" + +# Check if Python 3 is available +if command -v python3 &> /dev/null; then + python3 -m http.server 8080 +elif command -v python &> /dev/null; then + python -m SimpleHTTPServer 8080 +else + echo "โŒ Error: Python not found!" + echo "Please install Python or use another HTTP server" + exit 1 +fi diff --git a/test-electron.js b/test-electron.js new file mode 100644 index 000000000..c8942b292 --- /dev/null +++ b/test-electron.js @@ -0,0 +1,15 @@ +// Simple test to check if electron module loads correctly +try { + const electron = require('electron'); + console.log('โœ… Electron type:', typeof electron); + console.log('โœ… Electron value:', electron); + + if (typeof electron === 'object') { + console.log('โœ… electron.app:', typeof electron.app); + console.log('โœ… electron.BrowserWindow:', typeof electron.BrowserWindow); + } else { + console.log('โŒ Electron is not an object, it is:', typeof electron); + } +} catch (err) { + console.error('โŒ Error loading electron:', err); +}