# arinoxar/kotte architecture

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

- Interactive diagram: https://gitdiagram.com/arinoxar/kotte
- Repository: https://github.com/arinoxar/kotte

## Overview

This is a Kotte-based Bomberman game. The principal runtime is the Application frame loop: it gathers player intent, updates timed and ordinary gameplay, resolves bomb/blast facts, applies queued world mutations, then updates and draws presentation. The sampled code supports the game’s entity, map, collision, and rendering layers; README gameplay and feature descriptions remain unfilled placeholders, so they do not establish further implemented capabilities. Several subsystem links below rely on the frame-order comments or declarations rather than sampled call bodies.

Main entry points: [`kotte/src/application.cpp`](https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp) (Gameplay Updates), [`kotte/src/spatial_grid.cpp`](https://github.com/arinoxar/kotte/blob/master/kotte/src/spatial_grid.cpp) (Spatial Grid), [`kotte/src/main.cpp`](https://github.com/arinoxar/kotte/blob/master/kotte/src/main.cpp) (Game Entry), [`kotte/src/tile_map.cpp`](https://github.com/arinoxar/kotte/blob/master/kotte/src/tile_map.cpp) (Tile Map)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game Runtime"]
  node_player["Player Input<br/>[application.cpp]"]
  node_simulation["Gameplay Updates<br/>[application.cpp]"]
  node_bombs["Bombs &amp; Blasts<br/>[application.cpp]"]
  node_mutations["World Mutations<br/>[application.cpp]"]
  node_entry["Game Entry<br/>[main.cpp]"]
end

subgraph group_world["World Simulation"]
  node_worldmap["Tile Map<br/>[tile_map.cpp]"]
  node_entities[("Entity Store<br/>[entity_store.cpp]")]
  node_spatial["Spatial Grid<br/>[spatial_grid.cpp]"]
end

subgraph group_presentation["Presentation"]
  node_camera["Camera<br/>[camera.cpp]"]
  node_rendering["Render Extraction<br/>[application.cpp]"]
  node_renderer["Renderer<br/>[renderer.cpp]"]
  node_window["Window &amp; Frame<br/>[window.cpp]"]
end

subgraph group_foundation["Kotte Foundations"]
  node_random["Random Generator<br/>[random.hpp]"]
end

node_entry -->|"runs"| node_simulation
node_simulation -->|"collects intent"| node_player
node_simulation -->|"updates timed play"| node_bombs
node_simulation -->|"queues changes"| node_mutations
node_simulation -->|"queries collisions"| node_spatial
node_simulation -->|"resolves entities"| node_entities
node_bombs -->|"requests destruction"| node_mutations
node_mutations -->|"creates and destroys"| node_entities
node_mutations -->|"updates membership"| node_spatial
node_simulation -->|"reads map"| node_worldmap
node_worldmap -->|"uses randomness"| node_random
node_rendering -->|"queries visibility"| node_spatial
node_rendering -->|"submits commands"| node_renderer
node_renderer -->|"draws frame"| node_window
node_simulation -.->|"updates camera"| node_camera
node_rendering -.->|"projects view"| node_camera
node_entry -.->|"opens game window"| node_window

click node_player "https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp"
click node_simulation "https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp"
click node_bombs "https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp"
click node_mutations "https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp"
click node_worldmap "https://github.com/arinoxar/kotte/blob/master/kotte/src/tile_map.cpp"
click node_entities "https://github.com/arinoxar/kotte/blob/master/kotte/src/entity_store.cpp"
click node_spatial "https://github.com/arinoxar/kotte/blob/master/kotte/src/spatial_grid.cpp"
click node_random "https://github.com/arinoxar/kotte/blob/master/kotte/include/kotte/random.hpp"
click node_camera "https://github.com/arinoxar/kotte/blob/master/kotte/src/camera.cpp"
click node_rendering "https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp"
click node_renderer "https://github.com/arinoxar/kotte/blob/master/kotte/src/renderer.cpp"
click node_window "https://github.com/arinoxar/kotte/blob/master/kotte/src/window.cpp"
click node_entry "https://github.com/arinoxar/kotte/blob/master/kotte/src/main.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_player,node_simulation,node_bombs,node_mutations,node_entry toneBlue
class node_worldmap,node_entities,node_spatial toneAmber
class node_camera,node_rendering,node_renderer,node_window toneMint
class node_random toneRose
```

## Components

### Game Runtime

- [Player Input](https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp): `kotte/src/application.cpp`
- [Gameplay Updates](https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp): `kotte/src/application.cpp`
- [Bombs & Blasts](https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp): `kotte/src/application.cpp`
- [World Mutations](https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp): `kotte/src/application.cpp`
- [Game Entry](https://github.com/arinoxar/kotte/blob/master/kotte/src/main.cpp): `kotte/src/main.cpp`

### World Simulation

- [Tile Map](https://github.com/arinoxar/kotte/blob/master/kotte/src/tile_map.cpp): `kotte/src/tile_map.cpp`
- [Entity Store](https://github.com/arinoxar/kotte/blob/master/kotte/src/entity_store.cpp): `kotte/src/entity_store.cpp`
- [Spatial Grid](https://github.com/arinoxar/kotte/blob/master/kotte/src/spatial_grid.cpp): `kotte/src/spatial_grid.cpp`

### Presentation

- [Camera](https://github.com/arinoxar/kotte/blob/master/kotte/src/camera.cpp): `kotte/src/camera.cpp`
- [Render Extraction](https://github.com/arinoxar/kotte/blob/master/kotte/src/application.cpp): `kotte/src/application.cpp`
- [Renderer](https://github.com/arinoxar/kotte/blob/master/kotte/src/renderer.cpp): `kotte/src/renderer.cpp`
- [Window & Frame](https://github.com/arinoxar/kotte/blob/master/kotte/src/window.cpp): `kotte/src/window.cpp`

### Kotte Foundations

- [Random Generator](https://github.com/arinoxar/kotte/blob/master/kotte/include/kotte/random.hpp): `kotte/include/kotte/random.hpp`

## Connections

- Game Entry → Gameplay Updates: runs (evidence: `kotte/src/main.cpp`)
- Gameplay Updates → Player Input: collects intent (evidence: `kotte/src/application.cpp`)
- Gameplay Updates → Bombs & Blasts: updates timed play (evidence: `kotte/src/application.cpp`)
- Gameplay Updates → World Mutations: queues changes (evidence: `kotte/src/application.cpp`)
- Gameplay Updates → Spatial Grid: queries collisions (evidence: `kotte/src/application.cpp`)
- Gameplay Updates → Entity Store: resolves entities (evidence: `kotte/src/application.cpp`)
- Bombs & Blasts → World Mutations: requests destruction (evidence: `kotte/src/application.cpp`)
- World Mutations → Entity Store: creates and destroys (evidence: `kotte/src/application.cpp`)
- World Mutations → Spatial Grid: updates membership (evidence: `kotte/src/application.cpp`)
- Gameplay Updates → Tile Map: reads map (evidence: `kotte/src/application.cpp`)
- Tile Map → Random Generator: uses randomness
- Render Extraction → Spatial Grid: queries visibility (evidence: `kotte/src/application.cpp`)
- Render Extraction → Renderer: submits commands (evidence: `kotte/src/application.cpp`)
- Renderer → Window & Frame: draws frame (evidence: `kotte/src/renderer.cpp`)
- Gameplay Updates → Camera: updates camera
- Render Extraction → Camera: projects view
- Game Entry → Window & Frame: opens game window
