# 17cult-studios/rpggamev3 architecture

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

- Interactive diagram: https://gitdiagram.com/17cult-studios/rpggamev3
- Repository: https://github.com/17cult-studios/rpggamev3

## Overview

This is a terminal-based RPG with a TCP client/server mode. The player-facing loop connects to a server, updates and renders the game, sends changed player positions, and applies received map and actor updates. The client has separate world, actor, and rendering responsibilities; the server has map generation, NPC behavior, and TCP handling. Source excerpts are limited, so links between components are included only where calls or references are shown; the README provides no additional capability documentation.

Main entry points: [`RPG_Game/RPG_Game/main.cpp`](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/main.cpp) (Client Loop), [`RPG_Game/RPG_Game/Game.h`](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Game.h) (Game State), [`RPG_Game/RPG_Game/Renderer.cpp`](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Renderer.cpp) (ASCII Renderer), [`RPG_Game/Server/ServerTCP.cpp`](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/Server/ServerTCP.cpp) (TCP Server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client Runtime"]
  node_game["Game State<br/>[Game.h]"]
  node_clientapp["Client Loop<br/>[main.cpp]"]
  node_network["TCP Client<br/>[main.cpp]"]
end

subgraph group_world["World And Actors"]
  node_player["Player<br/>[Player.h]"]
  node_actor["Actor<br/>[Actor.h]"]
  node_character["Character<br/>[Character.h]"]
  node_npc["Client NPC<br/>[NPC.h]"]
  node_map["Client Map<br/>[Map.h]"]
end

subgraph group_render["Rendering"]
  node_buffer["Terminal Buffer<br/>[Buffer.h]"]
  node_renderer["ASCII Renderer<br/>[Renderer.cpp]"]
end

subgraph group_server["Server Runtime"]
  node_server["TCP Server<br/>[ServerTCP.cpp]"]
  node_servermap["Server Map<br/>[Server_Map.cpp]"]
  node_servernpc["Server NPC<br/>[Server_NPC.cpp]"]
  node_serverdata["Server Data Types<br/>[Data.h]"]
end

node_user(("Player"))

node_user -->|"plays"| node_clientapp
node_clientapp -->|"updates and renders"| node_game
node_clientapp -->|"connects and exchanges"| node_network
node_network -->|"applies map and actor data"| node_game
node_renderer -->|"draws into"| node_buffer
node_server -->|"references map subsystem"| node_servermap

click node_player "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Player.h"
click node_actor "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Actor.h"
click node_character "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Character.h"
click node_npc "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/NPC.h"
click node_map "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Map.h"
click node_game "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Game.h"
click node_clientapp "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/main.cpp"
click node_network "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/main.cpp"
click node_buffer "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Buffer.h"
click node_renderer "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Renderer.cpp"
click node_server "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/Server/ServerTCP.cpp"
click node_servermap "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/Server/Server_Map.cpp"
click node_servernpc "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/Server/Server_NPC.cpp"
click node_serverdata "https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/Server/Data.h"

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_game,node_clientapp,node_network toneBlue
class node_player,node_actor,node_character,node_npc,node_map toneAmber
class node_buffer,node_renderer toneMint
class node_server,node_servermap,node_servernpc,node_serverdata toneRose
class node_user toneIndigo
```

## Components

### Client Runtime

- [Game State](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Game.h): `RPG_Game/RPG_Game/Game.h`
- [Client Loop](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/main.cpp): `RPG_Game/RPG_Game/main.cpp`
- [TCP Client](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/main.cpp): `RPG_Game/RPG_Game/main.cpp`

### World And Actors

- [Player](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Player.h): `RPG_Game/RPG_Game/Player.h`
- [Actor](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Actor.h): `RPG_Game/RPG_Game/Actor.h`
- [Character](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Character.h): `RPG_Game/RPG_Game/Character.h`
- [Client NPC](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/NPC.h): `RPG_Game/RPG_Game/NPC.h`
- [Client Map](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Map.h): `RPG_Game/RPG_Game/Map.h`

### Rendering

- [Terminal Buffer](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Buffer.h): `RPG_Game/RPG_Game/Buffer.h`
- [ASCII Renderer](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/RPG_Game/Renderer.cpp): `RPG_Game/RPG_Game/Renderer.cpp`

### Server Runtime

- [TCP Server](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/Server/ServerTCP.cpp): `RPG_Game/Server/ServerTCP.cpp`
- [Server Map](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/Server/Server_Map.cpp): `RPG_Game/Server/Server_Map.cpp`
- [Server NPC](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/Server/Server_NPC.cpp): `RPG_Game/Server/Server_NPC.cpp`
- [Server Data Types](https://github.com/17cult-studios/rpggamev3/blob/main/RPG_Game/Server/Data.h): `RPG_Game/Server/Data.h`

### Other components

- **Player**

## Connections

- Player → Client Loop: plays (evidence: `RPG_Game/RPG_Game/main.cpp`)
- Client Loop → Game State: updates and renders (evidence: `RPG_Game/RPG_Game/main.cpp`)
- Client Loop → TCP Client: connects and exchanges (evidence: `RPG_Game/RPG_Game/main.cpp`)
- TCP Client → Game State: applies map and actor data (evidence: `RPG_Game/RPG_Game/main.cpp`)
- ASCII Renderer → Terminal Buffer: draws into (evidence: `RPG_Game/RPG_Game/Renderer.cpp`)
- TCP Server → Server Map: references map subsystem (evidence: `RPG_Game/Server/ServerTCP.cpp`)
