🎮 Popravil Electron app + organiziral character references
✅ Electron Forge Integration - Popravil Electron s Electron Forge (require bug fix) - Igra sedaj deluje v aplikaciji (npm start) - Dodal launch-game.sh launcher script - Dodal run-server.sh za browser fallback - Dokumentacija: HOW_TO_RUN.md ✅ Character References Organization - Premaknil reference slike iz reference_images/ v assets/slike/ - Ustvaril podmape: kai/, ana/, gronk/, zombiji/ - Dodal README.md v vsako podmapo - Posodobil CHARACTER_REFERENCES.md: * Nova folder struktura * Ana sekcija (living & zombie verzije) * Zombiji sekcija (basic, hybrids, special) * TODO lista za manjkajoče reference - Dodal FOLDER_STRUCTURE.md za vizualni pregled 📁 Nova struktura: assets/slike/kai|ana|gronk|zombiji/ Status: Production ready - igra deluje v Electron app! 🚀
This commit is contained in:
69
HOW_TO_RUN.md
Normal file
69
HOW_TO_RUN.md
Normal file
@@ -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! 🎮🧟♂️🌾
|
||||
BIN
assets/maps/Posnetek zaslona 2025–12–31 ob 15.07.53.png
Normal file
BIN
assets/maps/Posnetek zaslona 2025–12–31 ob 15.07.53.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
208
assets/slike/CHARACTER_REFERENCES.md
Normal file
208
assets/slike/CHARACTER_REFERENCES.md
Normal file
@@ -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
|
||||

|
||||
|
||||
**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
|
||||

|
||||
|
||||
**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
|
||||
79
assets/slike/FOLDER_STRUCTURE.md
Normal file
79
assets/slike/FOLDER_STRUCTURE.md
Normal file
@@ -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
|
||||
18
assets/slike/ana/README.md
Normal file
18
assets/slike/ana/README.md
Normal file
@@ -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
|
||||
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
27
assets/slike/gronk/README.md
Normal file
27
assets/slike/gronk/README.md
Normal file
@@ -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)
|
||||
|
Before Width: | Height: | Size: 554 KiB After Width: | Height: | Size: 554 KiB |
18
assets/slike/kai/README.md
Normal file
18
assets/slike/kai/README.md
Normal file
@@ -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
|
||||
38
assets/slike/zombiji/README.md
Normal file
38
assets/slike/zombiji/README.md
Normal file
@@ -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)
|
||||
44
forge.config.js
Normal file
44
forge.config.js
Normal file
@@ -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,
|
||||
}),
|
||||
],
|
||||
};
|
||||
57
launch-game.sh
Executable file
57
launch-game.sh
Executable file
@@ -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
|
||||
23
main.js
23
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', () => {
|
||||
|
||||
94
main.mjs
Normal file
94
main.mjs
Normal file
@@ -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)');
|
||||
22
package.json
22
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
# 🎨 MASTER CHARACTER REFERENCES
|
||||
|
||||
These are the **DEFINITIVE** character designs. ALL generated assets MUST match these exact styles.
|
||||
|
||||
## 🧌 GRONK - Master Reference
|
||||

|
||||
|
||||
**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
|
||||

|
||||
|
||||
**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.
|
||||
31
reference_images/README_MOVED.md
Normal file
31
reference_images/README_MOVED.md
Normal file
@@ -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/`
|
||||
20
run-server.sh
Executable file
20
run-server.sh
Executable file
@@ -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
|
||||
15
test-electron.js
Normal file
15
test-electron.js
Normal file
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user