# udial/mega_unreal_madness_combat_zombie_mode_fan_game architecture

> Architecture diagram of the GitHub repository udial/mega_unreal_madness_combat_zombie_mode_fan_game, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game
- Repository: https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game

## Overview

1. **Overall shape**
   - This is a small, self-contained Python game project with a clear separation between **engine/core flow**, **scene orchestration**, **gameplay entities**, **simulation systems**, **UI**, and **data-driven content**.
   - There is no visible backend or network layer; everything appears to run locally from the package entry point.

2. **Entry point and runtime**
   - `Madness_Combat/__main__.py` is the executable entry point.
   - It likely boots the game runtime defined in `src/core/game.py`, which then drives the main update/render loop and hands control to the current scene.

3. **Core runtime boundary**
   - `src/core/` contains the application-level plumbing:
     - `game.py` for the main game loop and top-level state.
     - `scene_manager.py` for switching between scenes.
     - `base_scene.py` as the shared interface/contract for scenes.
   - This layer is the central control boundary: scenes implement gameplay states, while core manages lifecycle and transitions.

4. **Scene-based state management**
   - `src/scenes/` contains distinct game states:
     - `main_menu_scene.py`
     - `settings_scene.py`
     - `game_scene.py`
     - `game_over_scene.py`
   - The architecture is scene-driven: menu/settings/gameplay/game-over are separate states, likely swapped by the scene manager rather than mixed together.

5. **Gameplay scene as the simulation hub**
   - `game_scene.py` is the active play state where most systems and entities converge.
   - It is the most likely place where input, spawning, combat, collisions, AI, economy, and wave progression are coordinated each frame.

6. **Entity model**
   - `src/entities/` defines the in-world objects:
     - `player.py`, `zombie.py`, `bullet.py`
     - `weapon.py`, `barricade.py`, `wall.py`, `entry_point.py`
     - `base_entity.py` as the shared parent abstraction
   - These are the objects that systems operate on. The entity layer appears to hold state and behavior specific to game objects, while systems apply broader rules across them.

7. **System-based gameplay logic**
   - `src/systems/` contains the main rule processors:
     - **Input/movement/combat/collision/damage**: `input_system.py`, `movement_system.py`, `combat_system.py`, `collision_system.py`, `damage_system.py`
     - **AI and spawning**: `ai_system.py`, `spawn_manager.py`
     - **Progression and pacing**: `wave_manager.py`, `economy_manager.py`
     - **Equipment and purchasing**: `weapon_factory.py`, `shop_manager.py`
   - This suggests a classic entity-plus-systems architecture: entities represent game objects, systems update them according to gameplay rules.

8. **Data flow during gameplay**
   - Player input enters through the input system, which affects player actions and likely weapon firing.
   - Movement and AI systems update entity positions and decisions.
   - Spawn and wave managers introduce zombies according to wave data.
   - Collision and damage systems resolve interactions between bullets, zombies, walls, barricades, and the player.
   - Economy/shop systems likely gate upgrades or purchases using in-game currency earned through progression or combat.

9. **Content/data configuration**
   - `Madness_Combat/data/weapons.json` and `Madness_Combat/data/waves.json` are important content definitions.
   - `weapon_factory.py` and `wave_manager.py` probably load these JSON files to create runtime objects and wave schedules.
   - This makes weapons and enemy waves data-driven rather than hardcoded, which is a key architecture boundary for a diagram.

10. **User interface layer**
   - `src/ui/button.py` indicates lightweight UI support, probably used in menu/settings screens.
   - UI is separate from simulation and likely used for scene-level interaction rather than in-world behavior.

11. **Configuration**
   - `Madness_Combat/settings.py` holds global configuration shared across the game, such as window, gameplay, balancing, or asset settings.
   - This is likely a cross-cutting module consumed by the core loop, scenes, and systems.

12. **How to diagram it**
   - A useful architecture diagram would show:
     - **Entry point** → **Game runtime** → **Scene Manager** → active **Scene**
     - The active scene coordinating **Entities** and **Systems**
     - **JSON data files** feeding **Weapon Factory** and **Wave Manager**
     - **UI buttons** driving menu/settings scene transitions
     - **Core settings** providing shared configuration across modules
   - The main boundary to emphasize is: **core control flow** vs **scene-specific gameplay** vs **data-driven content**.

13. **Scope and dependencies**
   - The repo appears intentionally modular but not overengineered: one package, one game loop, a handful of scenes, and a system-based simulation layer.
   - No external APIs or services are visible, so the architecture is mostly about internal game-state orchestration and frame-by-frame simulation.

Main entry points: [`Madness_Combat/src/scenes/game_scene.py`](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/scenes/game_scene.py) (Game scene), [`Madness_Combat/src/entities/base_entity.py`](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/base_entity.py) (Base entity), [`Madness_Combat/src/core/scene_manager.py`](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/core/scene_manager.py) (Scene manager), [`Madness_Combat/src/systems/movement_system.py`](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/movement_system.py) (Movement)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_core["Core runtime"]
  node_n_entry(("Entry point<br/>[__main__.py]"))
  node_n_game["Game loop<br/>runtime<br/>[game.py]"]
  node_n_scene_mgr["Scene manager<br/>state routing<br/>[scene_manager.py]"]
  node_n_base_scene["Base scene<br/>scene contract<br/>[base_scene.py]"]
end

subgraph group_g_scenes["Scenes"]
  node_n_menu["Main menu<br/>scene<br/>[main_menu_scene.py]"]
  node_n_settings_scene["Settings<br/>scene<br/>[settings_scene.py]"]
  node_n_game_scene["Game scene<br/>[game_scene.py]"]
  node_n_game_over["Game over<br/>scene<br/>[game_over_scene.py]"]
end

subgraph group_g_gameplay["Gameplay"]
  node_n_base_entity["Base entity<br/>entity contract<br/>[base_entity.py]"]
  node_n_player["Player<br/>entity<br/>[player.py]"]
  node_n_zombie["Zombie<br/>entity<br/>[zombie.py]"]
  node_n_bullet(("Bullet<br/>entity<br/>[bullet.py]"))
  node_n_weapon["Weapon<br/>entity<br/>[weapon.py]"]
  node_n_barricade["Barricade<br/>entity<br/>[barricade.py]"]
  node_n_wall["Wall<br/>entity<br/>[wall.py]"]
  node_n_entry_point{{"Spawn point<br/>entity<br/>[entry_point.py]"}}
  node_n_input["Input system<br/>[input_system.py]"]
  node_n_move["Movement<br/>[movement_system.py]"]
  node_n_combat["Combat<br/>[combat_system.py]"]
  node_n_collision["Collision"]
  node_n_damage["Damage<br/>[damage_system.py]"]
  node_n_ai["AI system<br/>[ai_system.py]"]
  node_n_spawn["Spawner<br/>[spawn_manager.py]"]
  node_n_wave["Wave manager<br/>progression<br/>[wave_manager.py]"]
  node_n_economy["Economy<br/>progression<br/>[economy_manager.py]"]
  node_n_shop["Shop<br/>[shop_manager.py]"]
  node_n_factory["Weapon factory<br/>content loader<br/>[weapon_factory.py]"]
end

subgraph group_g_data["Data"]
  node_n_weapons_json["Weapons data<br/>json content<br/>[weapons.json]"]
  node_n_waves_json["Waves data<br/>json content<br/>[waves.json]"]
end

subgraph group_g_ui["UI"]
  node_n_button["Button<br/>ui widget<br/>[button.py]"]
end

subgraph group_g_config["Config"]
  node_n_settings["Settings<br/>config<br/>[settings.py]"]
end

node_n_entry -->|"boots"| node_n_game
node_n_game -->|"owns"| node_n_scene_mgr
node_n_scene_mgr -->|"uses"| node_n_base_scene
node_n_scene_mgr -->|"activates"| node_n_menu
node_n_scene_mgr -->|"activates"| node_n_settings_scene
node_n_scene_mgr -->|"activates"| node_n_game_scene
node_n_scene_mgr -->|"activates"| node_n_game_over
node_n_menu -->|"uses"| node_n_button
node_n_settings_scene -->|"uses"| node_n_button
node_n_game_scene -->|"updates"| node_n_input
node_n_game_scene -->|"updates"| node_n_move
node_n_game_scene -->|"updates"| node_n_combat
node_n_game_scene -->|"updates"| node_n_ai
node_n_game_scene -->|"updates"| node_n_spawn
node_n_game_scene -->|"updates"| node_n_wave
node_n_game_scene -->|"updates"| node_n_economy
node_n_game_scene -->|"uses"| node_n_shop
node_n_game_scene -->|"updates"| node_n_collision
node_n_collision -->|"feeds"| node_n_damage
node_n_damage -->|"affects"| node_n_player
node_n_damage -->|"affects"| node_n_zombie
node_n_damage -->|"affects"| node_n_barricade
node_n_combat -->|"uses"| node_n_weapon
node_n_combat -->|"creates"| node_n_bullet
node_n_input -->|"drives"| node_n_player
node_n_move -->|"moves"| node_n_player
node_n_move -->|"moves"| node_n_zombie
node_n_move -->|"moves"| node_n_bullet
node_n_move -->|"tracks"| node_n_entry_point
node_n_ai -->|"controls"| node_n_zombie
node_n_spawn -->|"spawns at"| node_n_entry_point
node_n_spawn -->|"loads"| node_n_waves_json
node_n_wave -->|"loads"| node_n_waves_json
node_n_factory -->|"loads"| node_n_weapons_json
node_n_factory -->|"builds"| node_n_weapon
node_n_shop -->|"uses"| node_n_factory
node_n_economy -->|"gates"| node_n_shop
node_n_base_entity -->|"parent"| node_n_player
node_n_base_entity -->|"parent"| node_n_zombie
node_n_base_entity -->|"parent"| node_n_bullet
node_n_base_entity -->|"parent"| node_n_weapon
node_n_base_entity -->|"parent"| node_n_barricade
node_n_base_entity -->|"parent"| node_n_wall
node_n_base_entity -->|"parent"| node_n_entry_point
node_n_settings -->|"configures"| node_n_game
node_n_settings -->|"configures"| node_n_game_scene
node_n_settings -->|"configures"| node_n_factory
node_n_settings -->|"configures"| node_n_wave

click node_n_entry "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/__main__.py"
click node_n_game "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/core/game.py"
click node_n_scene_mgr "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/core/scene_manager.py"
click node_n_base_scene "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/core/base_scene.py"
click node_n_menu "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/scenes/main_menu_scene.py"
click node_n_settings_scene "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/scenes/settings_scene.py"
click node_n_game_scene "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/scenes/game_scene.py"
click node_n_game_over "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/scenes/game_over_scene.py"
click node_n_base_entity "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/base_entity.py"
click node_n_player "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/player.py"
click node_n_zombie "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/zombie.py"
click node_n_bullet "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/bullet.py"
click node_n_weapon "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/weapon.py"
click node_n_barricade "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/barricade.py"
click node_n_wall "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/wall.py"
click node_n_entry_point "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/entry_point.py"
click node_n_input "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/input_system.py"
click node_n_move "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/movement_system.py"
click node_n_combat "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/combat_system.py"
click node_n_collision "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/collision_system.py"
click node_n_damage "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/damage_system.py"
click node_n_ai "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/ai_system.py"
click node_n_spawn "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/spawn_manager.py"
click node_n_wave "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/wave_manager.py"
click node_n_economy "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/economy_manager.py"
click node_n_shop "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/shop_manager.py"
click node_n_factory "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/weapon_factory.py"
click node_n_weapons_json "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/data/weapons.json"
click node_n_waves_json "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/data/waves.json"
click node_n_button "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/ui/button.py"
click node_n_settings "https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/settings.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_n_entry,node_n_game,node_n_scene_mgr,node_n_base_scene toneBlue
class node_n_menu,node_n_settings_scene,node_n_game_scene,node_n_game_over toneAmber
class node_n_base_entity,node_n_player,node_n_zombie,node_n_bullet,node_n_weapon,node_n_barricade,node_n_wall,node_n_entry_point,node_n_input,node_n_move,node_n_combat,node_n_collision,node_n_damage,node_n_ai,node_n_spawn,node_n_wave,node_n_economy,node_n_shop,node_n_factory toneMint
class node_n_weapons_json,node_n_waves_json toneRose
class node_n_button toneIndigo
class node_n_settings toneTeal
```

## Components

### Core runtime

Application entry, game loop, and scene switching.

- [Entry point](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/__main__.py): module · Executable package entry that starts the game. · `Madness_Combat/__main__.py`
- [Game loop](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/core/game.py): runtime · Top-level runtime and frame loop. · `Madness_Combat/src/core/game.py`
- [Scene manager](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/core/scene_manager.py): state routing · Owns active scene switching and lifecycle. · `Madness_Combat/src/core/scene_manager.py`
- [Base scene](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/core/base_scene.py): scene contract · Shared interface for game scenes. · `Madness_Combat/src/core/base_scene.py`

### Scenes

Top-level game states driven by the scene manager.

- [Main menu](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/scenes/main_menu_scene.py): scene · Initial menu and navigation state. · `Madness_Combat/src/scenes/main_menu_scene.py`
- [Settings](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/scenes/settings_scene.py): scene · Options and configuration scene. · `Madness_Combat/src/scenes/settings_scene.py`
- [Game scene](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/scenes/game_scene.py): scene · Active play state and simulation hub. · `Madness_Combat/src/scenes/game_scene.py`
- [Game over](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/scenes/game_over_scene.py): scene · End-state and restart flow. · `Madness_Combat/src/scenes/game_over_scene.py`

### Gameplay

Entities and systems that run the active match.

- [Base entity](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/base_entity.py): entity contract · Shared parent for in-world objects. · `Madness_Combat/src/entities/base_entity.py`
- [Player](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/player.py): entity · Controllable survivor character. · `Madness_Combat/src/entities/player.py`
- [Zombie](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/zombie.py): entity · Primary enemy unit. · `Madness_Combat/src/entities/zombie.py`
- [Bullet](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/bullet.py): entity · Projectile used in combat. · `Madness_Combat/src/entities/bullet.py`
- [Weapon](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/weapon.py): entity · Equipment and firing behavior. · `Madness_Combat/src/entities/weapon.py`
- [Barricade](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/barricade.py): entity · Placeable defensive structure. · `Madness_Combat/src/entities/barricade.py`
- [Wall](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/wall.py): entity · Static map obstacle. · `Madness_Combat/src/entities/wall.py`
- [Spawn point](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/entities/entry_point.py): entity · Enemy entry location. · `Madness_Combat/src/entities/entry_point.py`
- [Input system](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/input_system.py): system · Translates player input into actions. · `Madness_Combat/src/systems/input_system.py`
- [Movement](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/movement_system.py): system · Updates entity positions and motion. · `Madness_Combat/src/systems/movement_system.py`
- [Combat](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/combat_system.py): system · Handles attacks and firing logic. · `Madness_Combat/src/systems/combat_system.py`
- [Collision](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/collision_system.py): system · Detects and resolves overlaps. · `Madness_Combat/src/systems/collision_system.py`
- [Damage](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/damage_system.py): system · Applies health loss and deaths. · `Madness_Combat/src/systems/damage_system.py`
- [AI system](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/ai_system.py): system · Controls zombie behavior. · `Madness_Combat/src/systems/ai_system.py`
- [Spawner](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/spawn_manager.py): system · Creates enemies into the match. · `Madness_Combat/src/systems/spawn_manager.py`
- [Wave manager](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/wave_manager.py): progression · Schedules enemy waves and pacing. · `Madness_Combat/src/systems/wave_manager.py`
- [Economy](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/economy_manager.py): progression · Tracks currency and rewards. · `Madness_Combat/src/systems/economy_manager.py`
- [Shop](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/shop_manager.py): system · Handles purchases and upgrades. · `Madness_Combat/src/systems/shop_manager.py`
- [Weapon factory](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/systems/weapon_factory.py): content loader · Builds weapons from data definitions. · `Madness_Combat/src/systems/weapon_factory.py`

### Data

Data-driven content consumed by gameplay systems.

- [Weapons data](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/data/weapons.json): json content · Weapon definitions and tuning values. · `Madness_Combat/data/weapons.json`
- [Waves data](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/data/waves.json): json content · Wave schedules and spawn tables. · `Madness_Combat/data/waves.json`

### UI

Lightweight interface elements used by scenes.

- [Button](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/src/ui/button.py): ui widget · Basic clickable UI control. · `Madness_Combat/src/ui/button.py`

### Config

Shared game settings and balance constants.

- [Settings](https://github.com/udial/mega_unreal_madness_combat_zombie_mode_fan_game/blob/main/Madness_Combat/settings.py): config · Global configuration and tuning constants. · `Madness_Combat/settings.py`

## Connections

- Entry point → Game loop: boots · Package entry starts the main runtime.
- Game loop → Scene manager: owns · Game loop delegates active state to the scene manager.
- Scene manager → Base scene: uses · Scene manager works against the shared scene contract.
- Scene manager → Main menu: activates · Can switch into the main menu scene.
- Scene manager → Settings: activates · Can switch into the settings scene.
- Scene manager → Game scene: activates · Can switch into the active gameplay scene.
- Scene manager → Game over: activates · Can switch into the game over scene.
- Main menu → Button: uses · Menu interactions are built from UI buttons.
- Settings → Button: uses · Settings interactions are built from UI buttons.
- Game scene → Input system: updates · Gameplay starts with player input handling.
- Game scene → Movement: updates · Main scene advances movement each frame.
- Game scene → Combat: updates · Main scene coordinates combat resolution.
- Game scene → AI system: updates · Main scene advances enemy behavior.
- Game scene → Spawner: updates · Main scene introduces new enemies.
- Game scene → Wave manager: updates · Main scene advances wave progression.
- Game scene → Economy: updates · Main scene tracks rewards and currency.
- Game scene → Shop: uses · Gameplay scene exposes purchasing/upgrades.
- Game scene → Collision: updates · Main scene resolves physical interactions.
- Collision → Damage: feeds · Collisions drive damage application.
- Damage → Player: affects · Damage system can reduce player health.
- Damage → Zombie: affects · Damage system can kill zombies.
- Damage → Barricade: affects · Damage system can degrade defenses.
- Combat → Weapon: uses · Combat relies on weapon behavior.
- Combat → Bullet: creates · Combat produces projectiles.
- Input system → Player: drives · Input maps to player actions.
- Movement → Player: moves · Movement updates the player.
- Movement → Zombie: moves · Movement updates zombies.
- Movement → Bullet: moves · Movement advances projectiles.
- Movement → Spawn point: tracks · Movement logic may reference spawn locations.
- AI system → Zombie: controls · AI logic governs enemy decisions.
- Spawner → Spawn point: spawns at · Spawner uses map entry points.
- Spawner → Waves data: loads · Wave configuration drives spawn timing.
- Wave manager → Waves data: loads · Wave manager reads wave definitions.
- Weapon factory → Weapons data: loads · Weapon factory reads weapon definitions.
- Weapon factory → Weapon: builds · Factory instantiates weapon runtime objects.
- Shop → Weapon factory: uses · Shop creates or upgrades weapons through the factory.
- Economy → Shop: gates · Economy constrains purchases and upgrades.
- Base entity → Player: parent · Player extends the shared entity base.
- Base entity → Zombie: parent · Zombie extends the shared entity base.
- Base entity → Bullet: parent · Bullet extends the shared entity base.
- Base entity → Weapon: parent · Weapon extends the shared entity base.
- Base entity → Barricade: parent · Barricade extends the shared entity base.
- Base entity → Wall: parent · Wall extends the shared entity base.
- Base entity → Spawn point: parent · Spawn point extends the shared entity base.
- Settings → Game loop: configures · Global settings shape runtime behavior.
- Settings → Game scene: configures · Scene behavior is tuned via shared settings.
- Settings → Weapon factory: configures · Weapon creation can use global tuning.
- Settings → Wave manager: configures · Wave pacing can depend on global tuning.
