Architecture

The key words MUST, MUST NOT, and MAY below are used as in RFC 2119.

The engine is organized in layers. Boot flows top-down: the bootstrap brings the asset pack online and hands off to the autoload singletons (Core State, Registry, Gameplay), which drive the Scene / UI layer, which in turn instantiates the Entity layer (player, enemies, NPCs). A lower layer MUST NOT reach up into a higher one — entities read state through the autoloads, scenes don't poke at bootstrap, and the registries are pure data lookups with no outbound dependencies.

Throughout the rest of this spec, every "Implemented by" badge is colored by the layer the script lives in, so you can trace a feature across layers at a glance. The legend below is the key.

Color legend

Key data flows