# su-lee53/last_coast_source architecture

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

- Interactive diagram: https://gitdiagram.com/su-lee53/last_coast_source
- Repository: https://github.com/su-lee53/last_coast_source

## Overview

Last Coast is a Windows, four-player cooperative zombie-survival shooter with a DirectX 12 client and an IOCP/TCP server. The player-facing flow runs from login and room selection through a ready/loading transition into staged survival, defense, and escape gameplay. The server owns multiplayer sessions and authoritative gameplay; zombie behavior uses the shared AI runtime. Client rendering, asset/world conversion, and database-backed login are important supporting branches. Relationships not shown in sampled source are included only where the README documents them.

Main entry points: [`Game/Client/AI/AIManagerImpl.cpp`](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/AI/AIManagerImpl.cpp) (AI manager and agents), [`Game/Client/Client/NetworkManager.cpp`](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/NetworkManager.cpp) (Client networking), [`Game/Client/Client/LogInScene.cpp`](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/LogInScene.cpp) (Login and rooms), [`Game/Client/Client/LobbyScene.cpp`](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/LobbyScene.cpp) (Lobby and ready)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Game flow"]
  node_login["Login and rooms<br/>[LogInScene.cpp]"]
  node_lobby["Lobby and ready<br/>[LobbyScene.cpp]"]
  node_gameplay_stages["Survival stages<br/>[EscapeSequence.cpp]"]
  node_combat["Combat and checkpoints<br/>[CombatSystem.cpp]"]
end

subgraph group_client["Client runtime"]
  node_client_network["Client networking<br/>[NetworkManager.cpp]"]
  node_client_scenes["Client scenes and actors<br/>[GameScene.cpp]"]
  node_render["Render graph<br/>[RenderManager.cpp]"]
  node_render_passes["Render passes<br/>[RenderPass.h]"]
  node_client_assets["Resource loading"]
end

subgraph group_server["Server runtime"]
  node_server_network["IOCP networking<br/>[Network.cpp]"]
  node_sessions["Sessions and rooms<br/>[Session.cpp]"]
  node_packet_handlers["Packet handling<br/>[PacketHandlers.cpp]"]
  node_game_loop["Game loop<br/>[GameLoop.cpp]"]
  node_world["Authoritative world<br/>[GameWorld.cpp]"]
  node_zombies["Zombie simulation<br/>[ZombieManager.cpp]"]
  node_database[("SQL login store<br/>[DBManager.cpp]")]
end

subgraph group_ai["Zombie AI"]
  node_ai_runtime["AI manager and agents<br/>[AIManagerImpl.cpp]"]
  node_navmesh["NavMesh graph<br/>[NavMeshImpl.cpp]"]
  node_pathfinding["Time-sliced pathfinding<br/>[PathManager.cpp]"]
  node_ai_goals["Goals and perception"]
end

subgraph group_content["Content pipeline"]
  node_model_converter["Model converter"]
  node_world_exporter["World exporter"]
  node_runtime_data["Game data files"]
end

node_player(("Player"))
node_unreal_editor(("Unreal editor"))
node_dcc(("DCC tools"))

node_player -->|"starts session"| node_login
node_login -.->|"sends requests"| node_client_network
node_login -->|"enters room"| node_lobby
node_lobby -.->|"readies players"| node_client_network
node_lobby -->|"starts match"| node_gameplay_stages
node_client_network -->|"exchanges TCP packets"| node_server_network
node_server_network -.->|"manages connections"| node_sessions
node_sessions -.->|"dispatches packets"| node_packet_handlers
node_packet_handlers -.->|"submits gameplay"| node_game_loop
node_game_loop -.->|"updates world"| node_world
node_game_loop -.->|"updates zombies"| node_zombies
node_zombies -->|"creates agents"| node_ai_runtime
node_ai_runtime -->|"loads navigation"| node_navmesh
node_ai_runtime -->|"manages searches"| node_pathfinding
node_ai_runtime -.->|"updates behavior"| node_ai_goals
node_combat -.->|"drives checkpoints"| node_gameplay_stages
node_server_network -.->|"authenticates login"| node_database
node_client_network -.->|"delivers game events"| node_client_scenes
node_client_scenes -->|"renders scene"| node_render
node_render -->|"executes passes"| node_render_passes
node_client_scenes -.->|"loads resources"| node_client_assets
node_dcc -->|"provides assets"| node_model_converter
node_model_converter -->|"converts models"| node_runtime_data
node_unreal_editor -->|"exports world"| node_world_exporter
node_world_exporter -->|"writes world data"| node_runtime_data
node_runtime_data -.->|"feeds resources"| node_client_assets
node_runtime_data -->|"provides NavMesh"| node_navmesh

click node_login "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/LogInScene.cpp"
click node_lobby "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/LobbyScene.cpp"
click node_gameplay_stages "https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/EscapeSequence.cpp"
click node_combat "https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/CombatSystem.cpp"
click node_client_network "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/NetworkManager.cpp"
click node_client_scenes "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/GameScene.cpp"
click node_render "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/RenderManager.cpp"
click node_render_passes "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/RenderPass.h"
click node_client_assets "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/ResourceManager.cpp"
click node_server_network "https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/Network.cpp"
click node_sessions "https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/Session.cpp"
click node_packet_handlers "https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/PacketHandlers.cpp"
click node_game_loop "https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/GameLoop.cpp"
click node_world "https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/GameWorld.cpp"
click node_zombies "https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/ZombieManager.cpp"
click node_database "https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/DBManager.cpp"
click node_ai_runtime "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/AI/AIManagerImpl.cpp"
click node_navmesh "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/AI/NavMeshImpl.cpp"
click node_pathfinding "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/AI/PathManager.cpp"
click node_ai_goals "https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/AI/GoalZombieThink.cpp"
click node_model_converter "https://github.com/su-lee53/last_coast_source/blob/master/Tools/AssimpConverter/AssimpConverter/AssimpConverter.cpp"
click node_world_exporter "https://github.com/su-lee53/last_coast_source/blob/master/Tools/UnrealMapExporter/Source/ObjectSaveSystem/JsonSaveManager.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_login,node_lobby,node_gameplay_stages,node_combat toneBlue
class node_client_network,node_client_scenes,node_render,node_render_passes,node_client_assets toneAmber
class node_server_network,node_sessions,node_packet_handlers,node_game_loop,node_world,node_zombies,node_database toneMint
class node_ai_runtime,node_navmesh,node_pathfinding,node_ai_goals toneRose
class node_model_converter,node_world_exporter,node_runtime_data,node_player,node_unreal_editor,node_dcc toneIndigo
```

## Components

### Game flow

- [Login and rooms](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/LogInScene.cpp): `Game/Client/Client/LogInScene.cpp`
- [Lobby and ready](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/LobbyScene.cpp): `Game/Client/Client/LobbyScene.cpp`
- [Survival stages](https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/EscapeSequence.cpp): `Game/Server/Server/EscapeSequence.cpp`
- [Combat and checkpoints](https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/CombatSystem.cpp): `Game/Server/Server/CombatSystem.cpp`

### Client runtime

- [Client networking](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/NetworkManager.cpp): `Game/Client/Client/NetworkManager.cpp`
- [Client scenes and actors](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/GameScene.cpp): `Game/Client/Client/GameScene.cpp`
- [Render graph](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/RenderManager.cpp): `Game/Client/Client/RenderManager.cpp`
- [Render passes](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/RenderPass.h): `Game/Client/Client/RenderPass.h`
- [Resource loading](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/Client/ResourceManager.cpp): `Game/Client/Client/ResourceManager.cpp`

### Server runtime

- [IOCP networking](https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/Network.cpp): `Game/Server/Server/Network.cpp`
- [Sessions and rooms](https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/Session.cpp): `Game/Server/Server/Session.cpp`
- [Packet handling](https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/PacketHandlers.cpp): `Game/Server/Server/PacketHandlers.cpp`
- [Game loop](https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/GameLoop.cpp): `Game/Server/Server/GameLoop.cpp`
- [Authoritative world](https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/GameWorld.cpp): `Game/Server/Server/GameWorld.cpp`
- [Zombie simulation](https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/ZombieManager.cpp): `Game/Server/Server/ZombieManager.cpp`
- [SQL login store](https://github.com/su-lee53/last_coast_source/blob/master/Game/Server/Server/DBManager.cpp): `Game/Server/Server/DBManager.cpp`

### Zombie AI

- [AI manager and agents](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/AI/AIManagerImpl.cpp): `Game/Client/AI/AIManagerImpl.cpp`
- [NavMesh graph](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/AI/NavMeshImpl.cpp): `Game/Client/AI/NavMeshImpl.cpp`
- [Time-sliced pathfinding](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/AI/PathManager.cpp): `Game/Client/AI/PathManager.cpp`
- [Goals and perception](https://github.com/su-lee53/last_coast_source/blob/master/Game/Client/AI/GoalZombieThink.cpp): `Game/Client/AI/GoalZombieThink.cpp`

### Content pipeline

- [Model converter](https://github.com/su-lee53/last_coast_source/blob/master/Tools/AssimpConverter/AssimpConverter/AssimpConverter.cpp): `Tools/AssimpConverter/AssimpConverter/AssimpConverter.cpp`
- [World exporter](https://github.com/su-lee53/last_coast_source/blob/master/Tools/UnrealMapExporter/Source/ObjectSaveSystem/JsonSaveManager.cpp): `Tools/UnrealMapExporter/Source/ObjectSaveSystem/JsonSaveManager.cpp`
- **Game data files**

### Other components

- **Player**
- **Unreal editor**
- **DCC tools**

## Connections

- Player → Login and rooms: starts session
- Login and rooms → Client networking: sends requests
- Login and rooms → Lobby and ready: enters room
- Lobby and ready → Client networking: readies players
- Lobby and ready → Survival stages: starts match
- Client networking → IOCP networking: exchanges TCP packets
- IOCP networking → Sessions and rooms: manages connections
- Sessions and rooms → Packet handling: dispatches packets
- Packet handling → Game loop: submits gameplay
- Game loop → Authoritative world: updates world
- Game loop → Zombie simulation: updates zombies
- Zombie simulation → AI manager and agents: creates agents (evidence: `Game/Server/Server/ZombieManager.cpp`)
- AI manager and agents → NavMesh graph: loads navigation
- AI manager and agents → Time-sliced pathfinding: manages searches
- AI manager and agents → Goals and perception: updates behavior
- Combat and checkpoints → Survival stages: drives checkpoints
- IOCP networking → SQL login store: authenticates login
- Client networking → Client scenes and actors: delivers game events
- Client scenes and actors → Render graph: renders scene (evidence: `Game/Client/Client/RenderManager.cpp`)
- Render graph → Render passes: executes passes
- Client scenes and actors → Resource loading: loads resources
- DCC tools → Model converter: provides assets
- Model converter → Game data files: converts models
- Unreal editor → World exporter: exports world
- World exporter → Game data files: writes world data
- Game data files → Resource loading: feeds resources
- Game data files → NavMesh graph: provides NavMesh
