Skip to main content

Code reference

Generated page

Everything in this section is generated from the Haxe sources by website/scripts/generate-api-docs.mjs. Do not edit these files — write a /** ... */ doc comment above the type or field in source/ and re-run npm run gen:api inside website/.

Covering 448 types across 44 packages, parsed from 322 modules in source/.

Packages​

PackageTypesWhat lives here
(root)1Entry point of the application. Main builds the OpenFL sprite tree, installs the crash handler and FPS counter, and boots FunkinGame. import.hx is the implicit import list applied to every other module in the project.
android1JNI bridges into the Java code under android/src/quack/fnf/phoenix/android/.
android.platform20Android platform services exposed to the engine (media session, display, storage, input).
backend55Engine infrastructure: asset resolution (Paths), preferences (ClientPrefs), the beat/step clock (Conductor), input mapping (Controls), mod discovery (Mods), the Flixel state bases (MusicBeatState, MusicBeatSubstate) and assorted services such as Discord RPC, achievements and the crash handler.
backend.deeplink2Parsing and routing for the custom phoenix:// URI scheme, used to deep-link into menus from a browser or another app.
data6Chart and stage data models: the SwagSong/SwagSection JSON shapes, chart loading and migration, and the stage metadata registry.
debug6On-screen developer overlays — the FPS/memory counter and memory sampling helpers.
debug.mem2
debug.profiler2
debug.system2
editors12In-game authoring tools: the chart editor, character editor, dialogue editors, week editor, note-splash debugger and the editor hub (MasterEditorMenu).
editors.charting8Pieces extracted out of ChartingState: grid rendering, selection, undo history and chart I/O.
editors.helpers4Stateless helper modules backing the editors, kept separate so the editor states stay small.
flixel2Engine copies of Flixel modules that shadow the haxelib versions through the class path. See Haxelib patches for how the override works.
flixel.addons.ui6Overridden flixel-addons UI widgets used by the editors.
flixel.graphics.tile3
flixel.sound2
flixel.system.scaleModes1
flixel.util5
flxanimate1Engine subclass of FlxAnimate used for Adobe Animate texture atlases.
funkin.vis.dsp4
headers27Categorisation headers. These modules contain nothing but typedef re-exports so a single import pulls in a whole group of related types.
mobile4Touch controls, mobile storage permissions and the first-run asset copy state for Android/iOS.
mobile.files3Native file-picker bridge for mobile targets.
mobile.flixel8Touch widgets: the virtual pad, the four-lane hitbox and the mobile-friendly button.
mobile.options1Mobile-only options substate (control layout, haptics, extra toggles).
music1The freeplay music player overlay and its playback state.
objects49Reusable display objects: Note, Character, Alphabet, health icons, dialogue boxes, menu items and the note splashes.
openfl.utils1
options13The options menu, its category substates (gameplay, graphics, visuals, controls, optimization, renderer) and the Option model that drives them.
options.helpers2Helpers for the options menus — note colour previews and shared menu plumbing.
play5Gameplay core. PlayState owns the song, the notes, the characters and the script host; BaseStage is the base class for hardcoded stages; CutsceneHandler sequences video/dialogue cutscenes.
play.helpers16The split-out halves of PlayState. Each helper is a static module that receives the PlayState instance and owns one concern (input, notes, camera, rating, playback, scripts, …).
play.objects5Gameplay-only display objects such as rating popups and combo sprites.
psychlua16The scripting host: FunkinLua (Lua/Luau), PythonScript (Hython), HScript, the Convert bridge that marshals values between Haxe and the script VMs, and the modchart sprite types scripts manipulate.
psychlua.callbacks18The Lua standard library, split by topic. Each module exposes register(funk:FunkinLua) and installs a group of callbacks.
psychlua.pystdlib14The Python standard library, mirroring psychlua.callbacks. Each module exposes register(py:PythonScript).
shaders50GLSL effects shipped with the engine. Most come in pairs: a *Shader holding the fragment source and a *Effect wrapper exposing animatable parameters.
stages15Hardcoded stages for the base game weeks, each extending play.BaseStage.
stages.objects14Props and actors used by the hardcoded stages (tank cutscene characters, the A-Bot speaker, …).
states21Menu and flow states: title, main menu, story mode, freeplay, options entry, mods menu, credits, achievements, loading and the crash/error screen.
states.helpers4Logic extracted from the larger menu states (freeplay, mods menu, gameplay changers).
states.substates6Substates layered over a running state — pause menu, game over screen, gameplay changers.
utils10Cross-cutting utilities: platform detection, native desktop calls, memory reporting, date formatting and process helpers.

Reading these pages​

  • Compiled when lists the #if flags that guard a type or member. A member with #if LUA_ALLOWED simply does not exist in a build made with -DMODDING_LEVEL=0.
  • Internals collapses private fields and methods; they are listed for orientation, not as API.
  • Every heading links back to the exact line on GitHub.