# codenamecrew/codenameengine architecture

> Architecture diagram of the GitHub repository codenamecrew/codenameengine, 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/codenamecrew/codenameengine
- Repository: https://github.com/codenamecrew/codenameengine

## Overview

Codename Engine is a cross-platform Friday Night Funkin' engine focused on modding through scripting, softcoding, addons, and authoring tools. Its user-facing path is selecting a mode or song, playing the resulting rhythm-game content, and using editors and mod data to create or customize that content. The README establishes these product capabilities, but the supplied source excerpts show only macOS cursor declarations; runtime calls and subsystem wiring therefore cannot be verified here. Dashed, uncited edges indicate documented or likely-but-unverified integration.

Main entry points: [`source/funkin/game`](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/game) (Gameplay), [`source/funkin/backend/scripting`](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/backend/scripting) (Script system), [`mods`](https://github.com/codenamecrew/codenameengine/tree/main/mods) (Mods and addons), [`source/funkin/backend`](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/backend) (Runtime backend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_play["Game experience"]
  node_menus["Menus"]
  node_gameplay["Gameplay"]
  node_cutscenes["Cutscenes"]
  node_scoring["Scoring"]
end

subgraph group_content["Mod content"]
  node_songdata["Songs and charts"]
  node_moddata["Mods and addons"]
  node_weekdata["Weeks and characters"]
  node_stagedata["Stage data"]
end

subgraph group_tools["Creation tools"]
  node_charter["Chart editor"]
  node_stage_editor["Stage editor"]
  node_character_editor["Character editor"]
  node_options["Options"]
end

subgraph group_runtime["Engine runtime"]
  node_scripts["Script system"]
  node_script_events["Script events"]
  node_savedata[("Saved settings")]
  node_backend["Runtime backend"]
end

subgraph group_platform["Platform services"]
  node_framework["HaxeFlixel"]
  node_cursor["macOS cursor bridge<br/>[Mac.h]"]
end

node_player(("Player"))

node_player -.->|"selects mode"| node_menus
node_menus -.->|"starts play"| node_gameplay
node_gameplay -.->|"uses charts"| node_songdata
node_gameplay -.->|"uses content"| node_weekdata
node_gameplay -.->|"uses stages"| node_stagedata
node_gameplay -.->|"records play"| node_scoring
node_gameplay -.->|"presents scenes"| node_cutscenes
node_gameplay -.->|"runs scripts"| node_scripts
node_scripts -.->|"dispatches events"| node_script_events
node_moddata -.->|"extends engine"| node_scripts
node_moddata -.->|"customizes content"| node_gameplay
node_player -.->|"authors charts"| node_charter
node_charter -.->|"edits charts"| node_songdata
node_player -.->|"authors stages"| node_stage_editor
node_stage_editor -.->|"edits stages"| node_stagedata
node_player -.->|"authors characters"| node_character_editor
node_player -.->|"sets preferences"| node_options
node_options -.->|"stores settings"| node_savedata
node_backend -.->|"uses framework"| node_framework
node_backend -.->|"may call"| node_cursor

click node_menus "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/menus"
click node_gameplay "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/game"
click node_cutscenes "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/game/cutscenes"
click node_scoring "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/game/scoring"
click node_songdata "https://github.com/codenamecrew/codenameengine/tree/main/assets/songs"
click node_moddata "https://github.com/codenamecrew/codenameengine/tree/main/mods"
click node_scripts "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/backend/scripting"
click node_script_events "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/backend/scripting/events"
click node_weekdata "https://github.com/codenamecrew/codenameengine/tree/main/assets/data/weeks"
click node_stagedata "https://github.com/codenamecrew/codenameengine/tree/main/assets/data/stages"
click node_charter "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/editors/charter"
click node_stage_editor "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/editors/stage"
click node_character_editor "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/editors/character"
click node_options "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/options"
click node_savedata "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/savedata"
click node_backend "https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/backend"
click node_cursor "https://github.com/codenamecrew/codenameengine/blob/main/source/external/include/mac/Mac.h"

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_menus,node_gameplay,node_cutscenes,node_scoring toneBlue
class node_songdata,node_moddata,node_weekdata,node_stagedata toneAmber
class node_charter,node_stage_editor,node_character_editor,node_options toneMint
class node_scripts,node_script_events,node_savedata,node_backend toneRose
class node_framework,node_cursor,node_player toneIndigo
```

## Components

### Game experience

- [Menus](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/menus): `source/funkin/menus`
- [Gameplay](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/game): `source/funkin/game`
- [Cutscenes](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/game/cutscenes): `source/funkin/game/cutscenes`
- [Scoring](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/game/scoring): `source/funkin/game/scoring`

### Mod content

- [Songs and charts](https://github.com/codenamecrew/codenameengine/tree/main/assets/songs): `assets/songs`
- [Mods and addons](https://github.com/codenamecrew/codenameengine/tree/main/mods): `mods`
- [Weeks and characters](https://github.com/codenamecrew/codenameengine/tree/main/assets/data/weeks): `assets/data/weeks`
- [Stage data](https://github.com/codenamecrew/codenameengine/tree/main/assets/data/stages): `assets/data/stages`

### Creation tools

- [Chart editor](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/editors/charter): `source/funkin/editors/charter`
- [Stage editor](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/editors/stage): `source/funkin/editors/stage`
- [Character editor](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/editors/character): `source/funkin/editors/character`
- [Options](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/options): `source/funkin/options`

### Engine runtime

- [Script system](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/backend/scripting): `source/funkin/backend/scripting`
- [Script events](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/backend/scripting/events): `source/funkin/backend/scripting/events`
- [Saved settings](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/savedata): `source/funkin/savedata`
- [Runtime backend](https://github.com/codenamecrew/codenameengine/tree/main/source/funkin/backend): `source/funkin/backend`

### Platform services

- **HaxeFlixel**
- [macOS cursor bridge](https://github.com/codenamecrew/codenameengine/blob/main/source/external/include/mac/Mac.h): `source/external/include/mac/Mac.h`

### Other components

- **Player**

## Connections

- Player → Menus: selects mode (evidence: `README.md`)
- Menus → Gameplay: starts play (evidence: `README.md`)
- Gameplay → Songs and charts: uses charts (evidence: `README.md`)
- Gameplay → Weeks and characters: uses content (evidence: `README.md`)
- Gameplay → Stage data: uses stages (evidence: `README.md`)
- Gameplay → Scoring: records play
- Gameplay → Cutscenes: presents scenes (evidence: `README.md`)
- Gameplay → Script system: runs scripts (evidence: `README.md`)
- Script system → Script events: dispatches events
- Mods and addons → Script system: extends engine (evidence: `README.md`)
- Mods and addons → Gameplay: customizes content (evidence: `README.md`)
- Player → Chart editor: authors charts (evidence: `README.md`)
- Chart editor → Songs and charts: edits charts (evidence: `README.md`)
- Player → Stage editor: authors stages (evidence: `README.md`)
- Stage editor → Stage data: edits stages (evidence: `README.md`)
- Player → Character editor: authors characters (evidence: `README.md`)
- Player → Options: sets preferences
- Options → Saved settings: stores settings
- Runtime backend → HaxeFlixel: uses framework (evidence: `README.md`)
- Runtime backend → macOS cursor bridge: may call
