# bananatiko/fnf-prismengine architecture

> Architecture diagram of the GitHub repository bananatiko/fnf-prismengine, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bananatiko/fnf-prismengine
- Repository: https://github.com/bananatiko/fnf-prismengine

## Overview

Prism Engine is a Friday Night Funkin’ game engine and modding platform. The player-facing flow is selecting a mode or song, then playing charted rhythm gameplay with characters, dialogue, stages, audio, and events; mod authors also configure content through scripts and editors. The README documents these capabilities, but source excerpts cover only the optional GameMode client header, so most subsystem links below reflect documented product features rather than inspected call sites.

Main entry points: [`source/states`](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/states) (Rhythm gameplay), [`source`](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source) (Prism Engine), [`source/external/gamemode_client.h`](https://github.com/bananatiko/fnf-prismengine/blob/Prism-Engine-Main/source/external/gamemode_client.h) (GameMode client), [`source/options`](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/options) (Options)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gameplay["Game runtime"]
  node_engine["Prism Engine"]
  node_menus["Mode menus"]
  node_playstate["Rhythm gameplay"]
  node_options["Options"]
  node_achievements["Achievements"]
  node_visualizers["Audio visualizers"]
end

subgraph group_content["Game content"]
  node_charts["Charts and events"]
  node_characters["Character definitions"]
  node_stages["Stages and cutscenes"]
  node_dialogue["Dialogue"]
  node_audio["Music and effects"]
end

subgraph group_modding["Modding tools"]
  node_mods["Mod support"]
  node_lua["Lua scripting"]
  node_editors["Content editors"]
end

subgraph group_platform["Platform services"]
  node_gamemode["GameMode client<br/>[gamemode_client.h]"]
end

node_player(("Player"))
node_systemlib{{"libgamemode"}}

node_player -.->|"plays"| node_engine
node_engine -.->|"presents"| node_menus
node_menus -.->|"starts gameplay"| node_playstate
node_playstate -.->|"uses charts"| node_charts
node_playstate -.->|"uses characters"| node_characters
node_playstate -.->|"uses stages"| node_stages
node_playstate -.->|"shows dialogue"| node_dialogue
node_playstate -.->|"plays audio"| node_audio
node_engine -.->|"supports mods"| node_mods
node_mods -.->|"runs scripts"| node_lua
node_mods -.->|"provides editors"| node_editors
node_player -.->|"configures"| node_options
node_playstate -.->|"tracks awards"| node_achievements
node_playstate -.->|"uses visualizers"| node_visualizers
node_gamemode -->|"loads symbols"| node_systemlib

click node_engine "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source"
click node_menus "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/states"
click node_playstate "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/states"
click node_charts "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/assets/base_game/shared/data"
click node_characters "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/assets/base_game/shared/characters"
click node_stages "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/states/stages"
click node_dialogue "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/cutscenes"
click node_audio "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/assets/base_game/shared/data/songs"
click node_mods "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source"
click node_lua "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/psychlua"
click node_editors "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/states/editors"
click node_options "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/options"
click node_achievements "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source"
click node_visualizers "https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/objects/visualizers"
click node_gamemode "https://github.com/bananatiko/fnf-prismengine/blob/Prism-Engine-Main/source/external/gamemode_client.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_engine,node_menus,node_playstate,node_options,node_achievements,node_visualizers toneBlue
class node_charts,node_characters,node_stages,node_dialogue,node_audio toneAmber
class node_mods,node_lua,node_editors toneMint
class node_gamemode toneRose
class node_player,node_systemlib toneIndigo
```

## Components

### Game runtime

- [Prism Engine](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source): `source`
- [Mode menus](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/states): `source/states`
- [Rhythm gameplay](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/states): `source/states`
- [Options](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/options): `source/options`
- [Achievements](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source): `source`
- [Audio visualizers](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/objects/visualizers): `source/objects/visualizers`

### Game content

- [Charts and events](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/assets/base_game/shared/data): `assets/base_game/shared/data`
- [Character definitions](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/assets/base_game/shared/characters): `assets/base_game/shared/characters`
- [Stages and cutscenes](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/states/stages): `source/states/stages`
- [Dialogue](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/cutscenes): `source/cutscenes`
- [Music and effects](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/assets/base_game/shared/data/songs): `assets/base_game/shared/data/songs`

### Modding tools

- [Mod support](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source): `source`
- [Lua scripting](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/psychlua): `source/psychlua`
- [Content editors](https://github.com/bananatiko/fnf-prismengine/tree/Prism-Engine-Main/source/states/editors): `source/states/editors`

### Platform services

- [GameMode client](https://github.com/bananatiko/fnf-prismengine/blob/Prism-Engine-Main/source/external/gamemode_client.h): `source/external/gamemode_client.h`

### Other components

- **Player**
- **libgamemode**

## Connections

- Player → Prism Engine: plays (evidence: `README.md`)
- Prism Engine → Mode menus: presents (evidence: `README.md`)
- Mode menus → Rhythm gameplay: starts gameplay (evidence: `README.md`)
- Rhythm gameplay → Charts and events: uses charts (evidence: `README.md`)
- Rhythm gameplay → Character definitions: uses characters (evidence: `README.md`)
- Rhythm gameplay → Stages and cutscenes: uses stages (evidence: `README.md`)
- Rhythm gameplay → Dialogue: shows dialogue (evidence: `README.md`)
- Rhythm gameplay → Music and effects: plays audio (evidence: `README.md`)
- Prism Engine → Mod support: supports mods (evidence: `README.md`)
- Mod support → Lua scripting: runs scripts (evidence: `README.md`)
- Mod support → Content editors: provides editors (evidence: `README.md`)
- Player → Options: configures (evidence: `README.md`)
- Rhythm gameplay → Achievements: tracks awards (evidence: `README.md`)
- Rhythm gameplay → Audio visualizers: uses visualizers
- GameMode client → libgamemode: loads symbols (evidence: `source/external/gamemode_client.h`)
