Files
novafarma/CHANGELOG.md
2025-12-08 17:31:18 +01:00

5.1 KiB

CHANGELOG - NovaFarma Development

[Session: 8.12.2025] - Phase 13 & Polish

IMPLEMENTIRANO

🏙️ City Content & Combat Polish

  • Unique City Loot

    • Added scrap_metal (5 units, 80% chance) to city chests
    • Added chips (electronics, 2 units, 60% chance) to city chests
    • Added scrap_metal (15 units) and chips (5 units, 90% chance) to elite chests
  • Combat Visual Feedback

    • NPC.takeDamage(amount, attacker) - Full implementation
    • White flash effect on hit (100ms)
    • 🎯 Knockback physics (0.5 tile pushback)
    • 💥 Floating damage text (-HP in red)
    • 🎨 Color-coded health bars (green → orange → red)
    • 💀 Fade-out death animation (300ms)

🌡️ Weather System v2.0 - Temperature & Survival

  • Seasonal Temperature System

    • Spring: 15°C (safe)
    • Summer: 30°C base
    • Autumn: 10°C (safe)
    • Winter: -5°C base
    • Day/night variation: ±5°C (sine wave)
  • Survival Mechanics

    • Cold damage: Temp < 0°C → -5 HP every 5s (without Winter Coat)
    • Heat damage: Temp > 35°C → -3 HP every 5s (without Summer Hat)
    • Protection items: winter_coat, summer_hat
    • Visual indicators: ❄️ Freezing! / 🔥 Overheating!
  • Greenhouse Building

    • Recipe: 20 Glass + 15 Wood
    • Size: 2x2 tiles
    • Purpose: Enables winter farming
    • Glass Crafting: Sand + Coal → Glass (Furnace, 3000ms)

🎮 Demo Mode

  • 3-day play limit
    • Triggers triggerDemoEnd() after Day 3
    • Pauses game physics
    • Shows demo end screen (via UIScene)
    • Call-to-action for full version

Visual Effects System

  • New System: VisualEffectsSystem.js
    • screenshake(intensity, duration) - Camera shake
    • createHitParticles(x, y, color) - Sparks on hit
    • createExplosion(x, y, color) - Explosion particles
    • createDustPuff(x, y) - Movement dust
    • flash(color, duration) - Screen flash
    • fadeOut(duration, callback) / fadeIn(duration) - Transitions
    • Particle texture generator: particle_white (8x8 white circle)

🏗️ Building System Updates

  • Added greenhouse to buildingsData
  • Cost: { glass: 20, wood: 15 }
  • Size: 2x2 grid placement

📁 FILES MODIFIED

src/
├── entities/
│   ├── NPC.js (+60 lines) - takeDamage(), die() methods
│   └── LootChest.js (+4 lines) - City loot tables
├── systems/
│   ├── WeatherSystem.js (+75 lines) - Temperature system, triggerDemoEnd()
│   ├── BuildingSystem.js (+1 line) - Greenhouse
│   └── VisualEffectsSystem.js (NEW, 130 lines) - Juice effects
├── scenes/
│   └── (UIScene.js will need showDemoEndScreen() method)
└── index.html (+1 line) - VisualEffectsSystem script tag

🎯 TASKS COMPLETED

Phase 8:

  • City Content (Scrap metal, Chips)
  • Elite Zombies (already active)
  • Combat Polish (White flash, Knockback)
  • World Details (Roads, Signposts - already done)

Phase 13:

  • Weather System v2.0
    • Seasonal temperatures
    • Temperature damage logic
    • Greenhouse building
    • Glass crafting recipe

Phase 14:

  • Demo Mode (3-day limit)
  • Visual Polish (VisualEffectsSystem)

🐛 KNOWN ISSUES

  1. NPC Sprite Transparency

    • AI-generated sprites show checkerboard pattern in some contexts
    • Chrome/Electron rendering issue with PNG alpha channels
    • Current workaround: Using AI sprites, considered low priority
  2. NPC.js Scaling

    • Had to revert scaling changes due to syntax errors
    • Individual NPC scales work but need careful editing
    • Current state: Reverted to last working Git version

📋 TODO NEXT SESSION

Phase 13 - Remaining:

  • Localization (JSON translations, Language selector)
  • Steam Integration (Achievements, Cloud Save)
  • Additional Entities (Donkey, Apple Tree, Seasonal Crops)
  • Bone Tools crafting
  • Gems as rare drops

Phase 14 - Remaining:

  • UI Polish (Rustic/Post-apo theme)
  • Trailer Tools (Camera smooth movement)

Phase 15:

  • Antigravity namespace refactor
  • Final polish & optimization

🎨 VISUAL IMPROVEMENTS

  • Combat feels more impactful (flash + knockback + damage numbers)
  • Temperature survival adds strategic layer (equipment management)
  • Greenhouse enables year-round farming
  • Visual effects ready for integration (screenshake on explosions, etc.)

💡 DESIGN DECISIONS

  1. Temperature Damage:

    • Chose 5-second intervals to avoid spam
    • Different damage for cold (-5 HP) vs heat (-3 HP)
    • Requires specific protective gear (encourages crafting)
  2. Demo Limit:

    • 3 days = ~15 minutes real-time (5min/day)
    • Enough to experience core gameplay loop
    • Hooks into WeatherSystem for clean trigger
  3. Visual Effects as Separate System:

    • Modular approach for easy integration
    • Can be called from any scene/entity
    • Particle textures generated procedurally

Session Duration: ~2h 45min
Lines of Code Added: ~270
Systems Enhanced: 5
New Systems Created: 1
Features Completed: 12

Next Milestone: Phase 13 completion (Localization + Entities)