# carykh/utopia architecture

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

- Interactive diagram: https://gitdiagram.com/carykh/utopia
- Repository: https://github.com/carykh/utopia

## Overview

This is a Processing food-chain simulator. The README documents a user-facing workflow: move with WASD and Space, then press C to make the camera follow the highlighted creature nearest to the user. The tree names likely implementation areas for input, world, player, and creature systems, but no source excerpts show how they interact. Accordingly, the graph maps those components without asserting unverified calls or data flow; the documented controls do not identify their implementing module.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_utopia["Simulator<br/>[Utopia.pde]"]
  node_keyhandler["Key handler<br/>[KeyHandler.pde]"]
end

subgraph group_world["World"]
  node_map["Map<br/>[Map.pde]"]
  node_tile["Tile<br/>[Tile.pde]"]
end

subgraph group_creature["Creature systems"]
  node_player["Player<br/>[Player.pde]"]
  node_brain["Brain<br/>[Brain.pde]"]
  node_gut["Gut<br/>[Gut.pde]"]
  node_memory["Memory<br/>[Memory.pde]"]
  node_record["Record<br/>[Record.pde]"]
  node_trait["Trait<br/>[Trait.pde]"]
end

subgraph group_shared["Shared utilities"]
  node_arrayutils["Array utilities<br/>[ArrayUtils.pde]"]
end

node_user(("User"))

click node_utopia "https://github.com/carykh/utopia/blob/main/Utopia.pde"
click node_keyhandler "https://github.com/carykh/utopia/blob/main/KeyHandler.pde"
click node_map "https://github.com/carykh/utopia/blob/main/Map.pde"
click node_tile "https://github.com/carykh/utopia/blob/main/Tile.pde"
click node_player "https://github.com/carykh/utopia/blob/main/Player.pde"
click node_brain "https://github.com/carykh/utopia/blob/main/Brain.pde"
click node_gut "https://github.com/carykh/utopia/blob/main/Gut.pde"
click node_memory "https://github.com/carykh/utopia/blob/main/Memory.pde"
click node_record "https://github.com/carykh/utopia/blob/main/Record.pde"
click node_trait "https://github.com/carykh/utopia/blob/main/Trait.pde"
click node_arrayutils "https://github.com/carykh/utopia/blob/main/ArrayUtils.pde"

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_utopia,node_keyhandler,node_user toneBlue
class node_map,node_tile toneAmber
class node_player,node_brain,node_gut,node_memory,node_record,node_trait toneMint
class node_arrayutils toneRose
```

## Components

### Application

- [Simulator](https://github.com/carykh/utopia/blob/main/Utopia.pde): `Utopia.pde`
- [Key handler](https://github.com/carykh/utopia/blob/main/KeyHandler.pde): `KeyHandler.pde`

### World

- [Map](https://github.com/carykh/utopia/blob/main/Map.pde): `Map.pde`
- [Tile](https://github.com/carykh/utopia/blob/main/Tile.pde): `Tile.pde`

### Creature systems

- [Player](https://github.com/carykh/utopia/blob/main/Player.pde): `Player.pde`
- [Brain](https://github.com/carykh/utopia/blob/main/Brain.pde): `Brain.pde`
- [Gut](https://github.com/carykh/utopia/blob/main/Gut.pde): `Gut.pde`
- [Memory](https://github.com/carykh/utopia/blob/main/Memory.pde): `Memory.pde`
- [Record](https://github.com/carykh/utopia/blob/main/Record.pde): `Record.pde`
- [Trait](https://github.com/carykh/utopia/blob/main/Trait.pde): `Trait.pde`

### Shared utilities

- [Array utilities](https://github.com/carykh/utopia/blob/main/ArrayUtils.pde): `ArrayUtils.pde`

### Other components

- **User**
