Skip to main content

Source tree

Repository root​

PathContents
source/all engine Haxe code — 284 modules in 36 packages
source/source-haxelib-patches/whole-file overrides of flixel, openfl, funkin.vis (details)
assets/asset libraries: preload/, shared/, songs/, week*/, videos/, fonts/, embed/
mods/user mods; ships with the bf-clicker example
example_mods/modTemplate.zip and script templates
android/src/quack/fnf/phoenix/android/Java injected into Android builds (PhoenixCore, PhoenixDisplay, PhoenixInput, PhoenixMedia, PhoenixMediaService, PhoenixStorage)
art/icons and developer build scripts
setup/haxelib bootstrap (windows.bat, unix.sh), MSVC fix, Android STL copy, URI registration
templates/Lime project templates (manifests, HTML shell, plists)
tools/repository tooling
tests/test project
docs/legacy docs: ANDROID_PLATFORM.md, script templates, the old JS Engine PDF
website/this documentation site
project.hxpthe Lime project, written in Haxe (details)
hmm.jsonpinned haxelib dependencies
checkstyle.json / hxformat.jsonlint and formatter configuration
modsList.txtenabled/disabled mods
gamemode.iniFeral GameMode profile (Linux)

Documentation files at the root: README.md (features and the patch system), BUILDING.md (build instructions), CODESTYLE.md (per-language style rules), AGENTS.md (canonical instructions for AI agents), TODO.md, THECHANGELOG.md, URI.MD (the phoenix:// scheme).

Packages in source/​

PackageModulesRole
(root)2Main (entry point), import.hx (implicit imports)
backend25engine services — paths, prefs, conductor, controls, mods, state bases
backend.deeplink2phoenix:// URI parsing and routing
data3Song, Section, StageData — the chart/stage data model
debug2 (+1)FPS counter, memory sampling (debug.mem has a C++ include)
editors10chart, character, dialogue, week, menu-character, note-splash editors
editors.charting7grid, sections, waveform, selection, save/load, events
editors.helpers4per-editor helper modules
states14title, main menu, story, freeplay, mods, credits, achievements, loading, error
states.helpers3freeplay, mods menu, gameplay changers
states.substates4pause, game over, gameplay changers, reset score
play3PlayState, BaseStage, CutsceneHandler
play.helpers14the split halves of PlayState
play.objects3rating/judge/MS popups, sustain splash
objects24Note, Character, Alphabet, icons, dialogue, menu items
options13options menus and the Option model
options.helpers2note-colour preview, shared menu logic
psychlua12Lua/Python/HScript hosts, Convert, modchart sprites
psychlua.callbacks15the Lua standard library, grouped by topic
psychlua.pystdlib11the Python standard library
stages13hardcoded base-game stages
stages.objects13stage props (train, tankmen, A-Bot speaker, …)
shaders42GLSL effects, mostly *Shader + *Effect pairs
music1the freeplay music player
mobile4 (+5)touch controls, storage, first-run copy state
android1 (+13)JNI bridges and the Android platform services
utils6platform detection, native calls, memory, dates
headers6typedef re-export modules
flixel, flixel.addons.ui, flxanimate2+engine overrides of library classes

Naming and layout conventions​

  • One public type per module, file name equal to the type name.
  • Helpers are static and take the owning state as the first parameter.
  • *Shader / *Effect pairs: the shader holds the GLSL, the effect wraps it with animatable parameters and an update(elapsed).
  • REFACTOR: comments mark code moved out of the old flat layout — they document where something came from, which is useful when porting a Psych patch.
  • Platform-specific code lives in utils/, mobile/, android/ rather than inside gameplay files; gameplay code should rarely contain #if android.

See the code reference for a per-package type listing generated from the sources.