# exfabian/deltadojo-3ds architecture

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

- Interactive diagram: https://gitdiagram.com/exfabian/deltadojo-3ds
- Repository: https://github.com/exfabian/deltadojo-3ds

## Overview

DeltaDojo 3DS is an incomplete Nintendo 3DS port of DELTARUNE’s battle system. The principal workflow is the game loop: read player input, coordinate battle choices and turns, update the party and enemy, then render battle state across the two screens. The bullet controller and heart implement the dodge arena, while shared utilities provide collision and drawing helpers. The excerpts show only part of the loop, so links to unsampled input and combat interactions are omitted rather than inferred.

Main entry points: [`source/main.cpp`](https://github.com/exfabian/deltadojo-3ds/blob/master/source/main.cpp) (Battle loop), [`source/BulletController.cpp`](https://github.com/exfabian/deltadojo-3ds/blob/master/source/BulletController.cpp) (Bullet controller), [`source/utils.cpp`](https://github.com/exfabian/deltadojo-3ds/blob/master/source/utils.cpp) (Game utilities), [`source/PartyMember.cpp`](https://github.com/exfabian/deltadojo-3ds/blob/master/source/PartyMember.cpp) (Party actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_main["Battle loop<br/>[main.cpp]"]
  node_utils["Game utilities<br/>[utils.cpp]"]
end

subgraph group_combat["Combatants"]
  node_party["Party actions<br/>[PartyMember.cpp]"]
  node_enemy["Test enemy<br/>[MonsterParent.cpp]"]
end

subgraph group_dodge["Dodge arena"]
  node_heart["Heart movement<br/>[Heart.cpp]"]
  node_bullets["Bullet controller"]
  node_bullet["Bullet behavior"]
end

subgraph group_presentation["Presentation"]
  node_sprites["Sprite assets"]
  node_font["Battle font<br/>[big-shot.bcfnt]"]
end

node_player(("Player"))

node_player -->|"provides input"| node_main
node_main -->|"creates, updates"| node_party
node_main -->|"creates, updates"| node_enemy
node_main -->|"creates, draws"| node_heart
node_main -->|"creates, draws"| node_bullets
node_bullets -->|"creates, moves, draws"| node_bullet
node_bullets -->|"uses collision helpers"| node_utils
node_main -->|"loads graphics"| node_sprites
node_main -->|"loads font"| node_font

click node_main "https://github.com/exfabian/deltadojo-3ds/blob/master/source/main.cpp"
click node_party "https://github.com/exfabian/deltadojo-3ds/blob/master/source/PartyMember.cpp"
click node_enemy "https://github.com/exfabian/deltadojo-3ds/blob/master/source/MonsterParent.cpp"
click node_heart "https://github.com/exfabian/deltadojo-3ds/blob/master/source/Heart.cpp"
click node_bullets "https://github.com/exfabian/deltadojo-3ds/blob/master/source/BulletController.cpp"
click node_bullet "https://github.com/exfabian/deltadojo-3ds/blob/master/source/BulletController.cpp"
click node_utils "https://github.com/exfabian/deltadojo-3ds/blob/master/source/utils.cpp"
click node_sprites "https://github.com/exfabian/deltadojo-3ds/tree/master/romfs/gfx"
click node_font "https://github.com/exfabian/deltadojo-3ds/blob/master/romfs/big-shot.bcfnt"

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_main,node_utils toneBlue
class node_party,node_enemy toneAmber
class node_heart,node_bullets,node_bullet toneMint
class node_sprites,node_font toneRose
class node_player toneIndigo
```

## Components

### Game runtime

- [Battle loop](https://github.com/exfabian/deltadojo-3ds/blob/master/source/main.cpp): `source/main.cpp`
- [Game utilities](https://github.com/exfabian/deltadojo-3ds/blob/master/source/utils.cpp): `source/utils.cpp`

### Combatants

- [Party actions](https://github.com/exfabian/deltadojo-3ds/blob/master/source/PartyMember.cpp): `source/PartyMember.cpp`
- [Test enemy](https://github.com/exfabian/deltadojo-3ds/blob/master/source/MonsterParent.cpp): `source/MonsterParent.cpp`

### Dodge arena

- [Heart movement](https://github.com/exfabian/deltadojo-3ds/blob/master/source/Heart.cpp): `source/Heart.cpp`
- [Bullet controller](https://github.com/exfabian/deltadojo-3ds/blob/master/source/BulletController.cpp): `source/BulletController.cpp`
- [Bullet behavior](https://github.com/exfabian/deltadojo-3ds/blob/master/source/BulletController.cpp): `source/BulletController.cpp`

### Presentation

- [Sprite assets](https://github.com/exfabian/deltadojo-3ds/tree/master/romfs/gfx): `romfs/gfx`
- [Battle font](https://github.com/exfabian/deltadojo-3ds/blob/master/romfs/big-shot.bcfnt): `romfs/big-shot.bcfnt`

### Other components

- **Player**

## Connections

- Player → Battle loop: provides input (evidence: `source/main.cpp`)
- Battle loop → Party actions: creates, updates (evidence: `source/main.cpp`)
- Battle loop → Test enemy: creates, updates (evidence: `source/main.cpp`)
- Battle loop → Heart movement: creates, draws (evidence: `source/main.cpp`)
- Battle loop → Bullet controller: creates, draws (evidence: `source/main.cpp`)
- Bullet controller → Bullet behavior: creates, moves, draws (evidence: `source/BulletController.cpp`)
- Bullet controller → Game utilities: uses collision helpers (evidence: `source/BulletController.cpp`)
- Battle loop → Sprite assets: loads graphics (evidence: `source/main.cpp`)
- Battle loop → Battle font: loads font (evidence: `source/main.cpp`)
