# elliottwahl/steel-blossom-psp architecture

> Architecture diagram of the GitHub repository elliottwahl/steel-blossom-psp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/elliottwahl/steel-blossom-psp
- Repository: https://github.com/elliottwahl/steel-blossom-psp

## Overview

Steel Blossom is a controller-driven 2D action game for PSP and PS Vita. The intended play loop begins at the main menu, proceeds through waves of enemies, and ends when the player or wave progression reaches a terminal state. The source excerpts show player combat against enemies, enemy AI attacking the player, and wave definitions; however, they do not expose the screen-transition or wave-spawning code, so those connections are left out. The graph focuses on sampled runtime behavior and the principal gameplay subsystems.

Main entry points: [`src/entities/player/Player.cpp`](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/player/Player.cpp) (Player combat), [`src/core/AssetManager.cpp`](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/core/AssetManager.cpp) (Asset manager), [`src/core/Main.cpp`](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/core/Main.cpp) (Game loop), [`src/entities/ghoul/Ghoul.cpp`](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/ghoul/Ghoul.cpp) (Ghoul AI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_main["Game loop<br/>[Main.cpp]"]
end

subgraph group_screens["Screens and waves"]
  node_state["Screen state<br/>[GameState.h]"]
  node_menu["Main menu<br/>[MainMenu.cpp]"]
  node_wave_screen["Wave screen<br/>[WaveScreen.cpp]"]
  node_wave_manager["Wave definitions<br/>[WaveManager.cpp]"]
end

subgraph group_combat["Combat entities"]
  node_player["Player combat<br/>[Player.cpp]"]
  node_enemy_base["Enemy behavior<br/>[Enemy.cpp]"]
  node_ghoul["Ghoul AI<br/>[Ghoul.cpp]"]
  node_spitter["Spitter AI<br/>[Spitter.cpp]"]
  node_blood_king["Blood King<br/>[BloodKing.cpp]"]
  node_hoarder["Hoarder<br/>[Hoarder.cpp]"]
  node_widow["Widow<br/>[Widow.cpp]"]
  node_other_enemies["Other enemies"]
  node_health["Health tracking"]
end

subgraph group_resources["Shared resources"]
  node_assets["Asset manager<br/>[AssetManager.cpp]"]
end

node_controller(("Game controller"))

node_controller -->|"sends input"| node_main
node_main -->|"starts screen"| node_menu
node_main -->|"dispatches events"| node_state
node_main -->|"draws current"| node_state
node_main -->|"preloads assets"| node_assets
node_menu -->|"uses assets"| node_assets
node_player -->|"damages enemies"| node_enemy_base
node_player -->|"updates health"| node_health
node_enemy_base -->|"tracks health"| node_health
node_ghoul -->|"attacks player"| node_player
node_ghoul -->|"gets resources"| node_assets
node_spitter -->|"fires at player"| node_player
node_spitter -->|"gets resources"| node_assets
node_blood_king -->|"attacks player"| node_player
node_blood_king -->|"loads texture"| node_assets
node_hoarder -->|"attacks player"| node_player
node_hoarder -->|"gets resources"| node_assets
node_widow -->|"attacks player"| node_player
node_widow -->|"gets resources"| node_assets
node_wave_manager -->|"provides wave data"| node_wave_screen

click node_main "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/core/Main.cpp"
click node_state "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/screens/GameState.h"
click node_menu "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/screens/main%20menu/MainMenu.cpp"
click node_wave_screen "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/screens/wave/WaveScreen.cpp"
click node_wave_manager "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/screens/wave/WaveManager.cpp"
click node_player "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/player/Player.cpp"
click node_enemy_base "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/Enemy.cpp"
click node_ghoul "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/ghoul/Ghoul.cpp"
click node_spitter "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/spitter/Spitter.cpp"
click node_blood_king "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/blood%20king/BloodKing.cpp"
click node_hoarder "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/hoarder/Hoarder.cpp"
click node_widow "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/widow/Widow.cpp"
click node_other_enemies "https://github.com/elliottwahl/steel-blossom-psp/tree/main/src/entities"
click node_health "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/components/HealthComponent.cpp"
click node_assets "https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/core/AssetManager.cpp"

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_main toneBlue
class node_state,node_menu,node_wave_screen,node_wave_manager toneAmber
class node_player,node_enemy_base,node_ghoul,node_spitter,node_blood_king,node_hoarder,node_widow,node_other_enemies,node_health toneMint
class node_assets toneRose
class node_controller toneIndigo
```

## Components

### Game runtime

- [Game loop](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/core/Main.cpp): `src/core/Main.cpp`

### Screens and waves

- [Screen state](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/screens/GameState.h): `src/screens/GameState.h`
- [Main menu](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/screens/main%20menu/MainMenu.cpp): `src/screens/main menu/MainMenu.cpp`
- [Wave screen](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/screens/wave/WaveScreen.cpp): `src/screens/wave/WaveScreen.cpp`
- [Wave definitions](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/screens/wave/WaveManager.cpp): `src/screens/wave/WaveManager.cpp`

### Combat entities

- [Player combat](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/player/Player.cpp): `src/entities/player/Player.cpp`
- [Enemy behavior](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/Enemy.cpp): `src/entities/Enemy.cpp`
- [Ghoul AI](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/ghoul/Ghoul.cpp): `src/entities/ghoul/Ghoul.cpp`
- [Spitter AI](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/spitter/Spitter.cpp): `src/entities/spitter/Spitter.cpp`
- [Blood King](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/blood%20king/BloodKing.cpp): `src/entities/blood king/BloodKing.cpp`
- [Hoarder](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/hoarder/Hoarder.cpp): `src/entities/hoarder/Hoarder.cpp`
- [Widow](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/entities/widow/Widow.cpp): `src/entities/widow/Widow.cpp`
- [Other enemies](https://github.com/elliottwahl/steel-blossom-psp/tree/main/src/entities): `src/entities`
- [Health tracking](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/components/HealthComponent.cpp): `src/components/HealthComponent.cpp`

### Shared resources

- [Asset manager](https://github.com/elliottwahl/steel-blossom-psp/blob/main/src/core/AssetManager.cpp): `src/core/AssetManager.cpp`

### Other components

- **Game controller**

## Connections

- Game controller → Game loop: sends input
- Game loop → Main menu: starts screen
- Game loop → Screen state: dispatches events
- Game loop → Screen state: draws current
- Game loop → Asset manager: preloads assets
- Main menu → Asset manager: uses assets
- Player combat → Enemy behavior: damages enemies
- Player combat → Health tracking: updates health
- Enemy behavior → Health tracking: tracks health
- Ghoul AI → Player combat: attacks player
- Ghoul AI → Asset manager: gets resources
- Spitter AI → Player combat: fires at player
- Spitter AI → Asset manager: gets resources
- Blood King → Player combat: attacks player
- Blood King → Asset manager: loads texture
- Hoarder → Player combat: attacks player
- Hoarder → Asset manager: gets resources
- Widow → Player combat: attacks player
- Widow → Asset manager: gets resources
- Wave definitions → Wave screen: provides wave data
