# andymwat/ti-84-ce-doom architecture

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

- Interactive diagram: https://gitdiagram.com/andymwat/ti-84-ce-doom
- Repository: https://github.com/andymwat/ti-84-ce-doom

## Overview

TI-84-CE-DooM is a C raycaster game for the TI-84 CE. The documented player workflow is to use calculator keys to move and adjust the view while the game renders a first-person scene, with simple wall collisions. The sampled main module contains level setup, movement, ray/face intersection, screen rendering, and an overhead map; graphics assets and math helpers are separate modules. The README documents controls and features, but the main.c excerpt omits parts of the runtime loop, so unshown call relationships are not inferred.

Main entry points: [`DOOM/src/gfx/gfx_group.h`](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/gfx_group.h) (Asset Declarations), [`DOOM/src/main.c`](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c) (Wall Renderer), [`DOOM/src/helpers.c`](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/helpers.c) (Vector and Math Helpers), [`DOOM/src/gfx/doomak2.c`](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/doomak2.c) (Gun Sprite Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Game Runtime"]
  node_runtime["Game Setup<br/>[main.c]"]
  node_input["Input and Movement<br/>[main.c]"]
  node_level["Level and Objects<br/>[main.c]"]
  node_collision["Ray Collision<br/>[main.c]"]
end

subgraph group_rendering["Rendering"]
  node_view["Wall Renderer<br/>[main.c]"]
  node_map["Overhead Map<br/>[main.c]"]
  node_sprites["Object Sprites<br/>[main.c]"]
end

subgraph group_support["Math Support"]
  node_helpers["Vector and Math Helpers<br/>[helpers.c]"]
  node_lookup["Square Root Table<br/>[lookup_table.h]"]
end

subgraph group_assets["Graphics Assets"]
  node_asset_header["Asset Declarations<br/>[gfx_group.h]"]
  node_gun_asset["Gun Sprite Data<br/>[doomak2.c]"]
  node_enemy_asset["Enemy Sprite Data<br/>[enemy1.c]"]
  node_palette["Color Palette<br/>[gfx_group.c]"]
end

node_player(("Calculator Player"))

node_player -->|"presses keys"| node_input
node_runtime -->|"loads level"| node_level
node_input -->|"checks movement"| node_collision
node_input -->|"rotates view"| node_helpers
node_view -->|"casts rays"| node_collision
node_view -->|"adjusts projection"| node_helpers
node_view -->|"draws map"| node_map
node_sprites -->|"checks visibility"| node_collision
node_runtime -->|"uses sprite definitions"| node_asset_header
node_asset_header -->|"declares image data"| node_gun_asset
node_asset_header -->|"declares image data"| node_enemy_asset
node_asset_header -->|"declares palette"| node_palette

click node_runtime "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c"
click node_input "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c"
click node_level "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c"
click node_collision "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c"
click node_view "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c"
click node_map "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c"
click node_sprites "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c"
click node_helpers "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/helpers.c"
click node_lookup "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/lookup_table.h"
click node_asset_header "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/gfx_group.h"
click node_gun_asset "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/doomak2.c"
click node_enemy_asset "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/enemy1.c"
click node_palette "https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/gfx_group.c"

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,node_input,node_level,node_collision toneBlue
class node_view,node_map,node_sprites toneAmber
class node_helpers,node_lookup toneMint
class node_asset_header,node_gun_asset,node_enemy_asset,node_palette toneRose
class node_player toneIndigo
```

## Components

### Game Runtime

- [Game Setup](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c): `DOOM/src/main.c`
- [Input and Movement](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c): `DOOM/src/main.c`
- [Level and Objects](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c): `DOOM/src/main.c`
- [Ray Collision](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c): `DOOM/src/main.c`

### Rendering

- [Wall Renderer](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c): `DOOM/src/main.c`
- [Overhead Map](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c): `DOOM/src/main.c`
- [Object Sprites](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/main.c): `DOOM/src/main.c`

### Math Support

- [Vector and Math Helpers](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/helpers.c): `DOOM/src/helpers.c`
- [Square Root Table](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/lookup_table.h): `DOOM/src/lookup_table.h`

### Graphics Assets

- [Asset Declarations](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/gfx_group.h): `DOOM/src/gfx/gfx_group.h`
- [Gun Sprite Data](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/doomak2.c): `DOOM/src/gfx/doomak2.c`
- [Enemy Sprite Data](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/enemy1.c): `DOOM/src/gfx/enemy1.c`
- [Color Palette](https://github.com/andymwat/ti-84-ce-doom/blob/master/DOOM/src/gfx/gfx_group.c): `DOOM/src/gfx/gfx_group.c`

### Other components

- **Calculator Player**

## Connections

- Calculator Player → Input and Movement: presses keys (evidence: `README.md`)
- Game Setup → Level and Objects: loads level (evidence: `DOOM/src/main.c`)
- Input and Movement → Ray Collision: checks movement (evidence: `DOOM/src/main.c`)
- Input and Movement → Vector and Math Helpers: rotates view (evidence: `DOOM/src/main.c`)
- Wall Renderer → Ray Collision: casts rays (evidence: `DOOM/src/main.c`)
- Wall Renderer → Vector and Math Helpers: adjusts projection (evidence: `DOOM/src/main.c`)
- Wall Renderer → Overhead Map: draws map (evidence: `DOOM/src/main.c`)
- Object Sprites → Ray Collision: checks visibility (evidence: `DOOM/src/main.c`)
- Game Setup → Asset Declarations: uses sprite definitions (evidence: `DOOM/src/main.c`)
- Asset Declarations → Gun Sprite Data: declares image data (evidence: `DOOM/src/gfx/gfx_group.h`)
- Asset Declarations → Enemy Sprite Data: declares image data (evidence: `DOOM/src/gfx/gfx_group.h`)
- Asset Declarations → Color Palette: declares palette (evidence: `DOOM/src/gfx/gfx_group.h`)
