Skip to content

Repository files navigation

THE FOG v0.3.5

Hunt: Showdown meets S.T.A.L.K.E.R. in a 2D top-down world where mutated enemies force you to adapt, and every extraction is a desperate race against the fog.

A PvE extraction shooter with roguelite progression, built in Godot 4.7 with GDScript. Started as a diploma thesis at Collegium Da Vinci — now a long-term project in active development.

The FOG concept art


Core Pillars

  • Risk / Reward — deploy with gear you can lose, extract with loot you want to keep
  • Mutated Enemies — enemies spawn with visible mutations that alter their stats, abilities, and appearance; read them and pick the right weapon
  • Persistent Progression — skills and base never reset; only carried gear is at risk
  • Atmospheric Tension — lethal fog, flashlight-based safe zones, battery management

Game Loop

       BASE HUB                         EXPEDITION (15-30 min)
  +-----------------+              +---------------------------+
  | Craft & upgrade |  -------->   | Explore, fight, loot      |
  | Manage loadout  |              | Find extraction point     |
  | Upgrade skills  |              | Push deeper or extract?   |
  +-----------------+              +---------------------------+
         ^                                |            |
         |                          EXTRACT OK     DEATH
         |                          Keep loot    Lose loot
         +----------------------------------+------+

Key Systems

Combat

  • Melee & Ranged weapons with upper/lower body animation blending
  • Armor penetration — rifles pierce armor, shotguns devastate at close range, melee ignores ammo
  • Zone damage — HEAD (1.5x), BODY (1.0x), LIMB (0.8x), WEAK_POINT (2.0x)
  • Combat effects — hit stop, screen shake, slow-motion on critical hits

Enemy AI (LimboAI Behavior Trees)

  • Programmatic BT creation per enemy archetype via EnemyBTBuilder
  • Zombie — slow, simple patrol, relentless in groups
  • Mutant — fast, investigates last known position, flanking behavior
  • Special attacks — leap, acid spit, grab (phase-based: wind-up / execute / recovery)
  • Group coordinationGroupCoordinator singleton for flanking positions

Mutation System

  • 15 mutations across 5 body slots (head, torso, limbs, skin, special)
  • Mutations visually alter enemy appearance via a unified shader
  • Weapon vulnerabilities — armored enemies resist ranged (use melee), fast enemies resist melee (use ranged)
  • Priority mutations (Berserker Mode) override all other behaviors
  • Mutation Compendium — collect samples, research in the Laboratory, craft stat boosts

Fog Mechanics

  • World-space fog shader with configurable damage and density
  • Flashlight creates a safe cone — battery drains over time
  • Generator-powered base protection with tweened fog clearing radius

Base Hub

  • 5 buildings: Storage, Workshop, Armory, Medical Bay, Laboratory
  • BuildSpot state machine: Empty > Selecting > Collecting > Built
  • Resource donation with progress tracking and cancel refund
  • CraftingBuilding base class with shared crafting logic (Template Method pattern)

Inventory

  • DayZ-style grid inventory (4x6 slots, 20kg weight limit)
  • Drag-and-drop with item rotation
  • Equipment slots: primary/secondary weapons, flashlight, battery, 4 belt quick-slots
  • 12 loot container types across Industrial, Residential, and Military zones

Progression

  • Skill system with persistent level-ups (XP from expeditions)
  • Status effects — bleeding, burning, acid poisoning, regeneration, adrenaline
  • Mutation boosts — craftable consumables that grant temporary mutation-derived buffs

Tutorial

  • 14-step guided tutorial with channel-based input locking
  • Multi-phase steps (dialogue > objective > signal-based completion)
  • Skip option on first step; progress saved automatically

Tech Stack

Component Technology
Engine Godot 4.7
Language GDScript
AI Framework LimboAI v1.4.1 (Behavior Trees + HSM)
IK Plugin SoupIK (2D skeletal IK with negative scale)
Animation AnimationTree with condition-driven transitions
Shaders Unified enemy shader, world-space fog shader

Project Structure

scripts/
├── ai/                  # Enemy AI — BT builder, blackboard, tasks
│   └── bt_tasks/        # BTTask conditions, actions, special attacks
├── base/                # Base hub — buildings, build spots, state machines
├── characters/          # Player, enemy, game_character hierarchy
│   └── states/          # LimboHSM player states (idle, walk, slide, aim, attack)
├── combat/              # Projectiles, hitboxes, hurtboxes
├── components/          # Flashlight, battery, fog damage, kamikaze
├── constants/           # Enums, GameConstants, AIConstants, AnimationNames
├── inventory/           # Grid inventory logic + UI
├── loot/                # Loot containers and loot tables
├── managers/            # SaveManager, GameManager, ConfigurationManager
├── mutations/           # Mutation factories, registries, procedural pipeline
├── resources/           # WeaponResource, CharacterStats, ItemDatabase
├── systems/             # MutationSystem, CompendiumManager, SkillSystem
└── ui/                  # HUD, dialogue, crafting, expedition UI

resources/
├── weapons/             # .tres weapon definitions
├── mutations/           # .tres mutation definitions (head/torso/limbs/skin/special)
├── items/               # Item data resources
└── maps/                # Map generation data

Running the Project

  1. Install Godot 4.7 (standard build)
  2. Clone the repository
  3. Open project.godot in Godot
  4. Run the main scene or use test scenes:
    • scenes/base/base_hub.tscn — base hub with buildings, crafting, and tutorial
    • scenes/levels/open_world_map.tscn — full expedition with extraction
    • scenes/levels/test_scene.tscn — combat sandbox

Tests

./test.sh runs the headless verification harness (~6 s): parse-checks every script, loads every scene, deep-smokes the key playable scenes, and runs the unit-test suite. Every commit is expected to pass it.

Controls

Action Key
Move WASD
Slide / Dodge Space
Sprint Shift
Attack / Fire LMB / J
Aim (ranged) RMB (hold)
Interact E
Reload R
Inventory Tab / I
Attributes C
Flashlight T
Primary weapon 1
Secondary weapon 2
Quick slots 3-6
Holster Q
Firing mode F

Documentation

License

Source code is licensed under the MIT License. Art and content assets (assets/, Sprites References/, images/) are not covered by MIT — all rights reserved. Bundled addons keep their own licenses.

About

The FOG — 2D top-down PvE extraction shooter in a post-apocalyptic fog. Godot 4.7.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages