# sumaylen/final-pcg-project architecture

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

- Interactive diagram: https://gitdiagram.com/sumaylen/final-pcg-project
- Repository: https://github.com/sumaylen/final-pcg-project

## Overview

This is a Unity PCG game project. The documented user workflow is to launch from MainMenu; the README warns that starting from another scene will not work. The tree shows two procedural-generation approaches (BSP and cellular automata), player and enemy systems, progression items, portals, and UI, but no source excerpts were supplied. Accordingly, the graph preserves these distinct areas without inferring calls or data flow between them.

Main entry points: [`Assets/Scenes/MainMenu.unity`](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scenes/MainMenu.unity) (Main menu)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scenes["Scenes"]
  node_main_menu["Main menu<br/>[MainMenu.unity]"]
  node_bsp_scene["BSP stage<br/>[Stage1_BSP.unity]"]
  node_ca_scene["CA stage<br/>[Stage2_CA.unity]"]
end

subgraph group_generation["Dungeon generation"]
  node_bsp_gen["BSP generator"]
  node_ca_gen["CA generator"]
  node_dungeon_builder["Dungeon builder<br/>[DungeonBuilder.cs]"]
  node_bsp_difficulty["BSP difficulty"]
  node_ca_difficulty["CA difficulty"]
end

subgraph group_actors["Player and enemies"]
  node_player_control["Player controls"]
  node_player_combat["Player combat<br/>[PlayerCombat.cs]"]
  node_player_health["Player health<br/>[PlayerHealth.cs]"]
  node_enemy_ai["Enemy AI<br/>[EnemyAI.cs]"]
  node_enemy_combat["Enemy melee"]
  node_enemy_health["Enemy health<br/>[EnemyHealth.cs]"]
  node_enemy_spawn_bsp["BSP enemy spawning<br/>[EnemySpawnerBSP.cs]"]
  node_enemy_spawn_ca["CA enemy spawning<br/>[EnemySpawnerCA.cs]"]
  node_player_spawn_bsp["BSP player spawning"]
  node_player_spawn_ca["CA player spawning<br/>[PlayerSpawnerCA.cs]"]
end

subgraph group_progression["Progression and items"]
  node_progression["Player progression"]
  node_upgrades["Upgrade system<br/>[UpgradeSystem.cs]"]
  node_drops["Item drops<br/>[ItemDrop.cs]"]
  node_keys_portals["Keys and portals"]
end

subgraph group_presentation["UI and audio"]
  node_game_ui["Game UI<br/>[GameManagerUI.cs]"]
  node_level_ui["Level-up UI<br/>[LevelUpUi.cs]"]
  node_minimap["Minimap<br/>[MiniMap.cs]"]
  node_music["Music manager<br/>[MusicManager.cs]"]
end

node_player_user(("Player"))

node_player_user -->|"launches"| node_main_menu

click node_main_menu "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scenes/MainMenu.unity"
click node_bsp_scene "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scenes/Stage1_BSP.unity"
click node_ca_scene "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scenes/Stage2_CA.unity"
click node_bsp_gen "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/BSPDungeonGenerator.cs"
click node_ca_gen "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/CADungeonGenerator.cs"
click node_dungeon_builder "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/DungeonBuilder.cs"
click node_bsp_difficulty "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/BSPDifficultyScaling.cs"
click node_ca_difficulty "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/CADifficultyScaling.cs"
click node_player_control "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerController.cs"
click node_player_combat "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerCombat.cs"
click node_player_health "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerHealth.cs"
click node_enemy_ai "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemyAI.cs"
click node_enemy_combat "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemyCombatMelee.cs"
click node_enemy_health "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemyHealth.cs"
click node_enemy_spawn_bsp "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemySpawnerBSP.cs"
click node_enemy_spawn_ca "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemySpawnerCA.cs"
click node_player_spawn_bsp "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerSpawnerBSP.cs"
click node_player_spawn_ca "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerSpawnerCA.cs"
click node_progression "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerProgression.cs"
click node_upgrades "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Other/UpgradeSystem.cs"
click node_drops "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Other/ItemDrop.cs"
click node_keys_portals "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Other/PortalController.cs"
click node_game_ui "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/User%20Interface/GameManagerUI.cs"
click node_level_ui "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/User%20Interface/LevelUpUi.cs"
click node_minimap "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/User%20Interface/MiniMap.cs"
click node_music "https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Other/MusicManager.cs"

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_menu,node_bsp_scene,node_ca_scene toneBlue
class node_bsp_gen,node_ca_gen,node_dungeon_builder,node_bsp_difficulty,node_ca_difficulty toneAmber
class node_player_control,node_player_combat,node_player_health,node_enemy_ai,node_enemy_combat,node_enemy_health,node_enemy_spawn_bsp,node_enemy_spawn_ca,node_player_spawn_bsp,node_player_spawn_ca toneMint
class node_progression,node_upgrades,node_drops,node_keys_portals toneRose
class node_game_ui,node_level_ui,node_minimap,node_music,node_player_user toneIndigo
```

## Components

### Scenes

- [Main menu](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scenes/MainMenu.unity): `Assets/Scenes/MainMenu.unity`
- [BSP stage](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scenes/Stage1_BSP.unity): `Assets/Scenes/Stage1_BSP.unity`
- [CA stage](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scenes/Stage2_CA.unity): `Assets/Scenes/Stage2_CA.unity`

### Dungeon generation

- [BSP generator](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/BSPDungeonGenerator.cs): `Assets/Scripts/PCG Map Generation/BSPDungeonGenerator.cs`
- [CA generator](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/CADungeonGenerator.cs): `Assets/Scripts/PCG Map Generation/CADungeonGenerator.cs`
- [Dungeon builder](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/DungeonBuilder.cs): `Assets/Scripts/PCG Map Generation/DungeonBuilder.cs`
- [BSP difficulty](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/BSPDifficultyScaling.cs): `Assets/Scripts/PCG Map Generation/BSPDifficultyScaling.cs`
- [CA difficulty](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/PCG%20Map%20Generation/CADifficultyScaling.cs): `Assets/Scripts/PCG Map Generation/CADifficultyScaling.cs`

### Player and enemies

- [Player controls](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerController.cs): `Assets/Scripts/Player/PlayerController.cs`
- [Player combat](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerCombat.cs): `Assets/Scripts/Player/PlayerCombat.cs`
- [Player health](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerHealth.cs): `Assets/Scripts/Player/PlayerHealth.cs`
- [Enemy AI](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemyAI.cs): `Assets/Scripts/Enemy/EnemyAI.cs`
- [Enemy melee](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemyCombatMelee.cs): `Assets/Scripts/Enemy/EnemyCombatMelee.cs`
- [Enemy health](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemyHealth.cs): `Assets/Scripts/Enemy/EnemyHealth.cs`
- [BSP enemy spawning](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemySpawnerBSP.cs): `Assets/Scripts/Enemy/EnemySpawnerBSP.cs`
- [CA enemy spawning](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Enemy/EnemySpawnerCA.cs): `Assets/Scripts/Enemy/EnemySpawnerCA.cs`
- [BSP player spawning](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerSpawnerBSP.cs): `Assets/Scripts/Player/PlayerSpawnerBSP.cs`
- [CA player spawning](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerSpawnerCA.cs): `Assets/Scripts/Player/PlayerSpawnerCA.cs`

### Progression and items

- [Player progression](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Player/PlayerProgression.cs): `Assets/Scripts/Player/PlayerProgression.cs`
- [Upgrade system](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Other/UpgradeSystem.cs): `Assets/Scripts/Other/UpgradeSystem.cs`
- [Item drops](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Other/ItemDrop.cs): `Assets/Scripts/Other/ItemDrop.cs`
- [Keys and portals](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Other/PortalController.cs): `Assets/Scripts/Other/PortalController.cs`

### UI and audio

- [Game UI](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/User%20Interface/GameManagerUI.cs): `Assets/Scripts/User Interface/GameManagerUI.cs`
- [Level-up UI](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/User%20Interface/LevelUpUi.cs): `Assets/Scripts/User Interface/LevelUpUi.cs`
- [Minimap](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/User%20Interface/MiniMap.cs): `Assets/Scripts/User Interface/MiniMap.cs`
- [Music manager](https://github.com/sumaylen/final-pcg-project/blob/main/Assets/Scripts/Other/MusicManager.cs): `Assets/Scripts/Other/MusicManager.cs`

### Other components

- **Player**

## Connections

- Player → Main menu: launches
