FEATURES: - Created animals/ folder structure (wild, domestic, infected) - Implemented proximity-based memory trigger system - Pulsating heart UI when Kai remembers family dog - Emotional storytelling without dialogue NEW FILES: - src/entities/Animal.js - Animal class with proximity detection - src/ui/MemoryHeartUI.js - Pulsating heart with Slovenian text - docs/systems/ANIMAL_MEMORY_SYSTEM.md - Full documentation - scripts/organize_all_tools.py - Tool organization script TOOLS ORGANIZATION: - Moved 84 additional tools to items/tools/ - Final count: 427 tools organized by material tier • wood: 36 tools • stone: 60 tools • iron: 36 tools • gold: 36 tools • special: 259 tools GAMESCENE INTEGRATION: - Added Animal and MemoryHeartUI imports - Preload heart icon and heartbeat audio - Update animals each frame for proximity detection - Example domestic dog spawns at (600, 600) EMOTIONAL IMPACT: When Kai approaches a domestic dog, a pulsating heart appears with text 'Spominjaš se...' (You remember...) - creating a powerful moment of nostalgia for his lost family pet.
2.4 KiB
2.4 KiB
🐕 Animal System & Emotional Memories
Created: January 20, 2026
Overview
Emotional storytelling system where proximity to domestic animals triggers Kai's memories of his family, displayed through a pulsating heart UI element.
Structure
assets/slike/animals/
├── wild/ # Wild animals (hostile/neutral)
├── domestic/ # Domestic animals (trigger memories)
└── infected/ # Infected animals (hostile)
Components
1. Animal Entity (src/entities/Animal.js)
- Proximity detection (150px for domestic, 100px for others)
- Type system: wild, domestic, infected
- Memory trigger system
- Event emission for UI
2. Memory Heart UI (src/ui/MemoryHeartUI.js)
- Pulsating heart icon animation
- Slovenian text: "Spominjaš se..."
- Heartbeat sound effect (optional)
- Smooth fade in/out transitions
3. GameScene Integration
- Auto-loads heart icon and heartbeat sound
- Creates MemoryHeartUI instance
- Updates all animals each frame
- Example domestic dog at (600, 600)
How It Works
- Player approaches domestic animal (within 150px)
- Animal.js emits
animal:memory_triggeredevent - MemoryHeartUI receives event and shows pulsating heart
- Heart animation plays with scale + alpha tweens
- Optional heartbeat sound plays in loop
- Player moves away, heart fades out
Emotional Impact
When Kai sees a domestic dog, he remembers:
- His family's pet before the outbreak
- Happier times
- What he lost
This creates a powerful emotional moment without dialogue.
Usage
Add a new animal:
const dog = new Animal(this, x, y, 'dog_sprite', 'domestic');
dog.animalName = 'Rex';
this.animals.push(dog);
Event listening:
this.events.on('animal:memory_triggered', (data) => {
console.log(`Memory triggered by: ${data.animal.animalName}`);
});
Assets Needed
- ✅ Heart icon:
assets/slike/items/ui/*heart*.png - ✅ Heartbeat sound:
assets/audio/_NEW/369017__patobottos__heartbeats-61.wav - ⏳ Dog sprites: Add to
assets/slike/animals/domestic/ - ⏳ Wild animal sprites: Add to
assets/slike/animals/wild/ - ⏳ Infected animal sprites: Add to
assets/slike/animals/infected/
Future Enhancements
- Different memory types (family, friends, places)
- Memory flashbacks (cutscenes)
- Animal interaction system (pet, feed, etc.)
- Memory collection/journal system