# overlordsock/commander architecture

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

- Interactive diagram: https://gitdiagram.com/overlordsock/commander
- Repository: https://github.com/overlordsock/commander

## Overview

Commander is a Godot 4 game. The tree suggests a player-driven combat loop involving a world, enemies, weapons, and a HUD, with a commander subsystem tracking combat and applying mutations. The README confirms the game identity but documents no runtime flow or feature details. Source excerpts were unavailable, so the components below are identified from filenames and no call, data-flow, or scene-wiring relationships are asserted.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Gameplay"]
  node_player["Player<br/>[player.gd]"]
  node_world["World<br/>[world.gd]"]
  node_enemy["Enemy<br/>[enemy.gd]"]
  node_enemy_stats["Enemy Stats<br/>[enemy_stats.gd]"]
end

subgraph group_combat["Combat"]
  node_gun["Gun<br/>[gun.gd]"]
  node_bullet["Bullet<br/>[bullet.gd]"]
  node_hitbox["Hitbox<br/>[hitbox.gd]"]
end

subgraph group_commander["Commander System"]
  node_commander["Commander<br/>[commander.gd]"]
  node_combat_tracker["Combat Tracker<br/>[combatTracker.gd]"]
  node_combat_event["Combat Event<br/>[combatEvent.gd]"]
  node_performance_report["Performance Report"]
  node_mutation_base["Mutation Base<br/>[mutation.gd]"]
  node_mutation_bundle["Mutation Bundle<br/>[mutationBundle.gd]"]
  node_defensive_mutations["Defensive Mutations"]
  node_offensive_mutations["Offensive Mutations"]
  node_tactical_mutations["Tactical Mutations"]
end

subgraph group_interface["Game Interface"]
  node_menu["Menu UI<br/>[menu_ui.gd]"]
  node_healthbar["Health Bar<br/>[healthbar.gd]"]
end

subgraph group_effects["Combat Effects"]
  node_sparks["Sparks<br/>[sparks.gd]"]
end

click node_player "https://github.com/overlordsock/commander/blob/main/scripts/player.gd"
click node_world "https://github.com/overlordsock/commander/blob/main/scripts/world.gd"
click node_enemy "https://github.com/overlordsock/commander/blob/main/scripts/enemy.gd"
click node_enemy_stats "https://github.com/overlordsock/commander/blob/main/scripts/enemy_stats.gd"
click node_gun "https://github.com/overlordsock/commander/blob/main/scripts/gun.gd"
click node_bullet "https://github.com/overlordsock/commander/blob/main/scripts/bullet.gd"
click node_hitbox "https://github.com/overlordsock/commander/blob/main/scripts/hitbox.gd"
click node_commander "https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/commander.gd"
click node_combat_tracker "https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/combatTracker.gd"
click node_combat_event "https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/combatEvent.gd"
click node_performance_report "https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/performanceReport.gd"
click node_mutation_base "https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/mutations/mutation.gd"
click node_mutation_bundle "https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/mutations/mutationBundle.gd"
click node_defensive_mutations "https://github.com/overlordsock/commander/tree/main/scripts/commander_modules/mutations/defensive"
click node_offensive_mutations "https://github.com/overlordsock/commander/tree/main/scripts/commander_modules/mutations/offensive"
click node_tactical_mutations "https://github.com/overlordsock/commander/tree/main/scripts/commander_modules/mutations/tactical"
click node_menu "https://github.com/overlordsock/commander/blob/main/scripts/menu_ui.gd"
click node_healthbar "https://github.com/overlordsock/commander/blob/main/scripts/healthbar.gd"
click node_sparks "https://github.com/overlordsock/commander/blob/main/scripts/sparks.gd"

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_player,node_world,node_enemy,node_enemy_stats toneBlue
class node_gun,node_bullet,node_hitbox toneAmber
class node_commander,node_combat_tracker,node_combat_event,node_performance_report,node_mutation_base,node_mutation_bundle,node_defensive_mutations,node_offensive_mutations,node_tactical_mutations toneMint
class node_menu,node_healthbar toneRose
class node_sparks toneIndigo
```

## Components

### Gameplay

- [Player](https://github.com/overlordsock/commander/blob/main/scripts/player.gd): `scripts/player.gd`
- [World](https://github.com/overlordsock/commander/blob/main/scripts/world.gd): `scripts/world.gd`
- [Enemy](https://github.com/overlordsock/commander/blob/main/scripts/enemy.gd): `scripts/enemy.gd`
- [Enemy Stats](https://github.com/overlordsock/commander/blob/main/scripts/enemy_stats.gd): `scripts/enemy_stats.gd`

### Combat

- [Gun](https://github.com/overlordsock/commander/blob/main/scripts/gun.gd): `scripts/gun.gd`
- [Bullet](https://github.com/overlordsock/commander/blob/main/scripts/bullet.gd): `scripts/bullet.gd`
- [Hitbox](https://github.com/overlordsock/commander/blob/main/scripts/hitbox.gd): `scripts/hitbox.gd`

### Commander System

- [Commander](https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/commander.gd): `scripts/commander_modules/commander.gd`
- [Combat Tracker](https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/combatTracker.gd): `scripts/commander_modules/combatTracker.gd`
- [Combat Event](https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/combatEvent.gd): `scripts/commander_modules/combatEvent.gd`
- [Performance Report](https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/performanceReport.gd): `scripts/commander_modules/performanceReport.gd`
- [Mutation Base](https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/mutations/mutation.gd): `scripts/commander_modules/mutations/mutation.gd`
- [Mutation Bundle](https://github.com/overlordsock/commander/blob/main/scripts/commander_modules/mutations/mutationBundle.gd): `scripts/commander_modules/mutations/mutationBundle.gd`
- [Defensive Mutations](https://github.com/overlordsock/commander/tree/main/scripts/commander_modules/mutations/defensive): `scripts/commander_modules/mutations/defensive`
- [Offensive Mutations](https://github.com/overlordsock/commander/tree/main/scripts/commander_modules/mutations/offensive): `scripts/commander_modules/mutations/offensive`
- [Tactical Mutations](https://github.com/overlordsock/commander/tree/main/scripts/commander_modules/mutations/tactical): `scripts/commander_modules/mutations/tactical`

### Game Interface

- [Menu UI](https://github.com/overlordsock/commander/blob/main/scripts/menu_ui.gd): `scripts/menu_ui.gd`
- [Health Bar](https://github.com/overlordsock/commander/blob/main/scripts/healthbar.gd): `scripts/healthbar.gd`

### Combat Effects

- [Sparks](https://github.com/overlordsock/commander/blob/main/scripts/sparks.gd): `scripts/sparks.gd`
