# jacktulli/halo-64 architecture

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

- Interactive diagram: https://gitdiagram.com/jacktulli/halo-64
- Repository: https://github.com/jacktulli/halo-64

## Overview

Halo 64 is a Nintendo 64 adaptation of Halo: Combat Evolved multiplayer, with campaign and online cartridges also documented. The principal workflow runs from local player input and menu configuration into a game mode, then updates players, bots and world objects before presenting audiovisual feedback. The graph preserves the documented maps, game types, Firefight, campaign, and online play. Most links reflect README descriptions; unsampled implementation details are not inferred beyond those descriptions.

Main entry points: [`source/game/game.c`](https://github.com/jacktulli/halo-64/blob/main/source/game/game.c) (Game state), [`source/game/game_engine.c`](https://github.com/jacktulli/halo-64/blob/main/source/game/game_engine.c) (Game modes), [`source/interface/interface.c`](https://github.com/jacktulli/halo-64/blob/main/source/interface/interface.c) (Menus and settings), [`source/game/players.h`](https://github.com/jacktulli/halo-64/blob/main/source/game/players.h) (Players)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_input["Controller input"]
  node_mainloop["Game loop<br/>[main.c]"]
  node_game["Game state<br/>[game.c]"]
end

subgraph group_gameplay["Gameplay systems"]
  node_player["Players<br/>[players.h]"]
  node_modes["Game modes<br/>[game_engine.c]"]
  node_objects["World objects<br/>[objects.c]"]
  node_weapons["Weapons<br/>[weapons.c]"]
  node_ai["Bots and AI<br/>[ai.c]"]
  node_campaign["Campaign mode<br/>[n64_campaign.c]"]
end

subgraph group_presentation["Player experience"]
  node_menu["Menus and settings<br/>[interface.c]"]
  node_hud["HUD<br/>[hud.c]"]
  node_render["N64 renderer<br/>[n64_render.c]"]
  node_sound["Sound<br/>[n64_sound_game.c]"]
end

subgraph group_content["Content and persistence"]
  node_scenario["Map scenarios<br/>[scenario.c]"]
  node_saved["Saved settings<br/>[saved_game_files.c]"]
end

subgraph group_network["Online play"]
  node_online["Online game<br/>[n64_online_game.c]"]
end

node_link(("Halo 64 Link"))
node_mapfiles["Xbox map files"]
node_playersource(("Local players"))

node_playersource -->|"use controls"| node_input
node_input -->|"control"| node_player
node_player -->|"configure"| node_menu
node_menu -->|"start game"| node_mainloop
node_mainloop -->|"run"| node_game
node_game -->|"select mode"| node_modes
node_game -->|"load map"| node_scenario
node_scenario -->|"uses converted maps"| node_mapfiles
node_modes -->|"manage play"| node_player
node_modes -->|"include bots"| node_ai
node_modes -->|"campaign option"| node_campaign
node_game -->|"simulate world"| node_objects
node_objects -->|"use weapons"| node_weapons
node_game -->|"display status"| node_hud
node_game -->|"render scene"| node_render
node_game -->|"play sounds"| node_sound
node_menu -->|"save settings"| node_saved
node_menu -.->|"join online"| node_online
node_online -->|"connect through"| node_link

click node_player "https://github.com/jacktulli/halo-64/blob/main/source/game/players.h"
click node_input "https://github.com/jacktulli/halo-64/blob/main/source/input/input_abstraction.c"
click node_menu "https://github.com/jacktulli/halo-64/blob/main/source/interface/interface.c"
click node_mainloop "https://github.com/jacktulli/halo-64/blob/main/source/main/main.c"
click node_game "https://github.com/jacktulli/halo-64/blob/main/source/game/game.c"
click node_modes "https://github.com/jacktulli/halo-64/blob/main/source/game/game_engine.c"
click node_scenario "https://github.com/jacktulli/halo-64/blob/main/source/scenario/scenario.c"
click node_objects "https://github.com/jacktulli/halo-64/blob/main/source/objects/objects.c"
click node_weapons "https://github.com/jacktulli/halo-64/blob/main/source/items/weapons.c"
click node_ai "https://github.com/jacktulli/halo-64/blob/main/source/ai/ai.c"
click node_campaign "https://github.com/jacktulli/halo-64/blob/main/port/n64/game/n64_campaign.c"
click node_hud "https://github.com/jacktulli/halo-64/blob/main/source/interface/hud.c"
click node_render "https://github.com/jacktulli/halo-64/blob/main/port/n64/src/n64_render.c"
click node_sound "https://github.com/jacktulli/halo-64/blob/main/port/n64/game/n64_sound_game.c"
click node_saved "https://github.com/jacktulli/halo-64/blob/main/source/saved%20games/saved_game_files.c"
click node_online "https://github.com/jacktulli/halo-64/blob/main/port/n64/game/n64_online_game.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_input,node_mainloop,node_game toneBlue
class node_player,node_modes,node_objects,node_weapons,node_ai,node_campaign toneAmber
class node_menu,node_hud,node_render,node_sound toneMint
class node_scenario,node_saved toneRose
class node_online,node_link,node_mapfiles,node_playersource toneIndigo
```

## Components

### Game runtime

- [Controller input](https://github.com/jacktulli/halo-64/blob/main/source/input/input_abstraction.c): `source/input/input_abstraction.c`
- [Game loop](https://github.com/jacktulli/halo-64/blob/main/source/main/main.c): `source/main/main.c`
- [Game state](https://github.com/jacktulli/halo-64/blob/main/source/game/game.c): `source/game/game.c`

### Gameplay systems

- [Players](https://github.com/jacktulli/halo-64/blob/main/source/game/players.h): `source/game/players.h`
- [Game modes](https://github.com/jacktulli/halo-64/blob/main/source/game/game_engine.c): `source/game/game_engine.c`
- [World objects](https://github.com/jacktulli/halo-64/blob/main/source/objects/objects.c): `source/objects/objects.c`
- [Weapons](https://github.com/jacktulli/halo-64/blob/main/source/items/weapons.c): `source/items/weapons.c`
- [Bots and AI](https://github.com/jacktulli/halo-64/blob/main/source/ai/ai.c): `source/ai/ai.c`
- [Campaign mode](https://github.com/jacktulli/halo-64/blob/main/port/n64/game/n64_campaign.c): `port/n64/game/n64_campaign.c`

### Player experience

- [Menus and settings](https://github.com/jacktulli/halo-64/blob/main/source/interface/interface.c): `source/interface/interface.c`
- [HUD](https://github.com/jacktulli/halo-64/blob/main/source/interface/hud.c): `source/interface/hud.c`
- [N64 renderer](https://github.com/jacktulli/halo-64/blob/main/port/n64/src/n64_render.c): `port/n64/src/n64_render.c`
- [Sound](https://github.com/jacktulli/halo-64/blob/main/port/n64/game/n64_sound_game.c): `port/n64/game/n64_sound_game.c`

### Content and persistence

- [Map scenarios](https://github.com/jacktulli/halo-64/blob/main/source/scenario/scenario.c): `source/scenario/scenario.c`
- [Saved settings](https://github.com/jacktulli/halo-64/blob/main/source/saved%20games/saved_game_files.c): `source/saved games/saved_game_files.c`

### Online play

- [Online game](https://github.com/jacktulli/halo-64/blob/main/port/n64/game/n64_online_game.c): `port/n64/game/n64_online_game.c`

### Other components

- **Halo 64 Link**
- **Xbox map files**
- **Local players**

## Connections

- Local players → Controller input: use controls
- Controller input → Players: control
- Players → Menus and settings: configure
- Menus and settings → Game loop: start game
- Game loop → Game state: run
- Game state → Game modes: select mode
- Game state → Map scenarios: load map
- Map scenarios → Xbox map files: uses converted maps
- Game modes → Players: manage play (evidence: `source/game/game_engine.c`)
- Game modes → Bots and AI: include bots
- Game modes → Campaign mode: campaign option
- Game state → World objects: simulate world
- World objects → Weapons: use weapons
- Game state → HUD: display status
- Game state → N64 renderer: render scene
- Game state → Sound: play sounds
- Menus and settings → Saved settings: save settings
- Menus and settings → Online game: join online
- Online game → Halo 64 Link: connect through
