Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Architecture

English · Português (BR)

How the codebase is split, which direction dependencies may point, and where to extend it. Decisions behind these rules live in the ADRs.

Crate map

CrateResponsibilityMay depend on
ume-formatsINI, SFF, AIR, SND, ACT, PCX, PNG, FNT, stages, VFS (folders and zips)nothing in the workspace; builds for wasm32
ume-engineFighter VM, expressions, triggers, controllers, HitDef, match rules, UMF compilerume-formats
ume-netplayggrs rollback, state checksum, replay formatume-engine
ume-renderSprite and post-processing pipelines on wgpuwgpu only
ume-shellAdapter, surface, window, input, quad draw API, audio out, frame pacingume-render
ume-marketGitHub marketplace: listing, bundles, safety limitsume-formats
ume-charforge, ume-devtoolsAuthoring and audit toolingformats, engine
ultimate-mugen (src/)Screens, HUD, stages, VFX, audio mixing, settings, registryeverything above, GPU only through ume_shell::quad

scripts/crate-boundaries.mjs fails CI when a runtime dependency breaks this table (for example ume-render depending on winit, or ume-engine depending on wgpu).

Runtime flow

  1. ume-formats parses character and stage files, or the native UMF JSON, into plain data.
  2. ume-engine compiles CNS, ZSS and UMF into one bytecode and runs Match::tick at a fixed 60 Hz. It never reads a clock, a thread or the GPU.
  3. ume-netplay clones and checksums Match for rollback and replays.
  4. src/ reads Match state each frame and draws it through ume_shell::quad, which batches into ume-render.

Determinism is the reason the simulation is single-threaded and allocation-free per tick. Loading and decoding may use threads through ume_formats::par::map.

Where code goes

You want to addPut it in
A state controller or triggercrates/engine (new file, one wiring line in controllers.rs or triggers.rs) and document it in CNS-Scripts.md
A file format or parsercrates/formats
A fighter, stage or routeData only: UMF JSON, .def, TOML; no Rust
A screen or HUD elementsrc/app/<screen>.rs or the matching feature folder in src/
A GPU effectcrates/render, exposed through ume_shell::quad
A marketplace rulecrates/market

Extension points that need no code in the engine

Keeping it maintainable

  • One responsibility per file, 250-line ceiling, grandfathered files may not grow (File layout).
  • A refactor that moves code is its own pull request and changes no behavior.
  • Add an ADR when a decision changes a boundary, a dependency or a data format.