# pranshul-thakur/doom-in-excel architecture

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

- Interactive diagram: https://gitdiagram.com/pranshul-thakur/doom-in-excel
- Repository: https://github.com/pranshul-thakur/doom-in-excel

## Overview

This repository embeds Doom in Excel: a PyXLL real-time function starts the game engine, receives frames, converts them into worksheet-friendly pixel values, and yields them for display. The included WAD supplies the game data, while the engine dependency is external. The graph reflects the sampled Python implementation and README; input handling is a stub, so no keyboard-input flow is shown.

Main entry points: [`doom.py`](https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py) (Doom RTD function), [`DOOM1.WAD`](https://github.com/pranshul-thakur/doom-in-excel/blob/main/DOOM1.WAD) (Doom WAD)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_spreadsheet["Excel interface"]
  node_excel["Excel host"]
  node_formatter["Cell formatter<br/>[doom.py]"]
end

subgraph group_bridge["Python bridge"]
  node_doom_func["Doom RTD function<br/>[doom.py]"]
  node_frame_callback["Frame callback<br/>[doom.py]"]
  node_frame_state["Frame buffer<br/>[doom.py]"]
  node_pixel_conversion["Pixel conversion<br/>[doom.py]"]
  node_thread_start["Engine startup<br/>[doom.py]"]
end

subgraph group_engine["Game runtime"]
  node_cydoomgeneric["cydoomgeneric"]
  node_wad["Doom WAD<br/>[DOOM1.WAD]"]
end

node_user(("Excel user"))

node_user -->|"uses"| node_excel
node_excel -->|"invokes"| node_doom_func
node_doom_func -->|"starts"| node_thread_start
node_thread_start -->|"initializes"| node_cydoomgeneric
node_thread_start -->|"loads"| node_wad
node_thread_start -->|"registers"| node_frame_callback
node_cydoomgeneric -->|"calls"| node_frame_callback
node_frame_callback -->|"updates"| node_frame_state
node_doom_func -->|"waits for"| node_frame_state
node_doom_func -->|"converts"| node_pixel_conversion
node_doom_func -->|"yields frames"| node_excel
node_excel -->|"formats cells"| node_formatter

click node_doom_func "https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py"
click node_formatter "https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py"
click node_frame_callback "https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py"
click node_frame_state "https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py"
click node_pixel_conversion "https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py"
click node_thread_start "https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py"
click node_wad "https://github.com/pranshul-thakur/doom-in-excel/blob/main/DOOM1.WAD"

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_excel,node_formatter,node_user toneBlue
class node_doom_func,node_frame_callback,node_frame_state,node_pixel_conversion,node_thread_start toneAmber
class node_cydoomgeneric,node_wad toneMint
```

## Components

### Excel interface

- **Excel host**
- [Cell formatter](https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py): `doom.py`

### Python bridge

- [Doom RTD function](https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py): `doom.py`
- [Frame callback](https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py): `doom.py`
- [Frame buffer](https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py): `doom.py`
- [Pixel conversion](https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py): `doom.py`
- [Engine startup](https://github.com/pranshul-thakur/doom-in-excel/blob/main/doom.py): `doom.py`

### Game runtime

- **cydoomgeneric**
- [Doom WAD](https://github.com/pranshul-thakur/doom-in-excel/blob/main/DOOM1.WAD): `DOOM1.WAD`

### Other components

- **Excel user**

## Connections

- Excel user → Excel host: uses (evidence: `README.md`)
- Excel host → Doom RTD function: invokes (evidence: `doom.py`)
- Doom RTD function → Engine startup: starts (evidence: `doom.py`)
- Engine startup → cydoomgeneric: initializes (evidence: `doom.py`)
- Engine startup → Doom WAD: loads (evidence: `doom.py`)
- Engine startup → Frame callback: registers (evidence: `doom.py`)
- cydoomgeneric → Frame callback: calls (evidence: `doom.py`)
- Frame callback → Frame buffer: updates (evidence: `doom.py`)
- Doom RTD function → Frame buffer: waits for (evidence: `doom.py`)
- Doom RTD function → Pixel conversion: converts (evidence: `doom.py`)
- Doom RTD function → Excel host: yields frames (evidence: `doom.py`)
- Excel host → Cell formatter: formats cells (evidence: `doom.py`)
