# cytopiateam/cytopia architecture

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

- Interactive diagram: https://gitdiagram.com/cytopiateam/cytopia
- Repository: https://github.com/cytopiateam/cytopia

## Overview

Cytopia is a pixel-art city-building game with a custom SDL2-based isometric renderer and a mod-focused design. The documented player workflow is interacting through the custom UI, using camera controls and terrain tools, and viewing the city through the renderer. Procedural terrain generation, audio, and a separate Qt tile editor are additional capabilities. The supplied tree exposes no game implementation files beyond src/, so subsystem paths and connections below reflect README-level documentation, not inspected runtime calls.

Main entry points: [`src`](https://github.com/cytopiateam/cytopia/tree/master/src) (Game runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game runtime"]
  node_runtime["Game runtime"]
end

subgraph group_world["World tools"]
  node_terrain["Terrain tools"]
  node_generation["Terrain generation"]
end

subgraph group_presentation["Presentation"]
  node_ui["Custom UI"]
  node_camera["Camera controls"]
  node_renderer["Isometric renderer"]
  node_audio["Game audio"]
end

subgraph group_authoring["Content authoring"]
  node_tileeditor["Qt tile editor"]
  node_tiledata["TileData JSON"]
end

node_player(("Player"))
node_sdl["SDL2"]
node_audioout["Audio output"]

node_player -->|"interacts"| node_ui
node_ui -->|"controls"| node_runtime
node_player -->|"operates"| node_camera
node_camera -->|"updates view"| node_renderer
node_runtime -->|"renders city"| node_renderer
node_renderer -->|"uses"| node_sdl
node_player -->|"manipulates"| node_terrain
node_generation -->|"generates terrain"| node_runtime
node_tileeditor -->|"edits"| node_tiledata
node_runtime -->|"plays"| node_audio
node_audio -->|"outputs"| node_audioout

click node_runtime "https://github.com/cytopiateam/cytopia/tree/master/src"
click node_ui "https://github.com/cytopiateam/cytopia/tree/master/src"
click node_camera "https://github.com/cytopiateam/cytopia/tree/master/src"
click node_renderer "https://github.com/cytopiateam/cytopia/tree/master/src"
click node_terrain "https://github.com/cytopiateam/cytopia/tree/master/src"
click node_generation "https://github.com/cytopiateam/cytopia/tree/master/src"
click node_tileeditor "https://github.com/cytopiateam/cytopia/tree/master/src"
click node_audio "https://github.com/cytopiateam/cytopia/tree/master/src"

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_runtime toneBlue
class node_terrain,node_generation toneAmber
class node_ui,node_camera,node_renderer,node_audio toneMint
class node_tileeditor,node_tiledata toneRose
class node_player,node_sdl,node_audioout toneIndigo
```

## Components

### Game runtime

- [Game runtime](https://github.com/cytopiateam/cytopia/tree/master/src): `src`

### World tools

- [Terrain tools](https://github.com/cytopiateam/cytopia/tree/master/src): `src`
- [Terrain generation](https://github.com/cytopiateam/cytopia/tree/master/src): `src`

### Presentation

- [Custom UI](https://github.com/cytopiateam/cytopia/tree/master/src): `src`
- [Camera controls](https://github.com/cytopiateam/cytopia/tree/master/src): `src`
- [Isometric renderer](https://github.com/cytopiateam/cytopia/tree/master/src): `src`
- [Game audio](https://github.com/cytopiateam/cytopia/tree/master/src): `src`

### Content authoring

- [Qt tile editor](https://github.com/cytopiateam/cytopia/tree/master/src): `src`
- **TileData JSON**

### Other components

- **Player**
- **SDL2**
- **Audio output**

## Connections

- Player → Custom UI: interacts
- Custom UI → Game runtime: controls
- Player → Camera controls: operates
- Camera controls → Isometric renderer: updates view
- Game runtime → Isometric renderer: renders city
- Isometric renderer → SDL2: uses
- Player → Terrain tools: manipulates
- Terrain generation → Game runtime: generates terrain
- Qt tile editor → TileData JSON: edits
- Game runtime → Game audio: plays
- Game audio → Audio output: outputs
