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

Ultimate MUGEN Wiki

English · Português (BR)

A guide for players and creators who want to customize the engine: install, configure, create fighters, stages and scripts.

PageAudienceCovers
InstallationPlayersDownload, build, run on desktop, browser and phone
Automatic updatesPlayersSelf-update from GitHub releases, opt-outs and CLI flags
Configuration and controlsPlayers.cfg file, command-line flags, environment variables, controls
Adding M.U.G.E.N contentPlayersInstall .def/.zip characters and stages, and validate them
GitHub marketplacePlayersInstall characters, stages and music from any GitHub repository
3D fighters (prototype)ContributorsIsolated glTF skeletal fighter drawn on the 2D fight plane
Story modePlayersFive scrolling stages, waves, bosses, cutscenes and health carry-over
Stage objectsPlayers, creatorsBreakable crates, barrels and cars, food pickups, bonus rounds and their TOML data
AudioPlayers & CreatorsCharacter sounds, music per stage, formats and panning
Character selectPlayersSelect screen, portraits, teams and shortcuts
Game modesPlayersArcade, teams (Sequence, Parallel, Tag) and their rules
In-fight Easter EggsPlayersSecret combat milestones, stage cameos, and lore matchup interactions
Universe and LorePlayers & CreatorsCosmology, factions, energy systems and the Great Convergence
Character DossiersPlayers & CreatorsRoster bios, portraits, moves, rivalries and home stages
Compatibility decisionsCreatorsFeatures the engine rejects by design and why
Format coverageCreatorsStatus of SFF, SND, AIR, ACT, DEF and screenpack support
Lua scriptsCreatorsWhat Lua in M.U.G.E.N packs does and the Lua-free alternatives
Route filesCreatorsArcade routes and unlock rules in TOML
Make a character (quick start)CreatorsA working fighter in ten lines, inherited from another one
Creating a UMF characterCreatorsFull reference: every field of a fighter in a single JSON
PassivesCreatorsRage, ability stacks and regeneration, data-driven
Unleashed PotentialPlayersGeneric transformation for imported characters: Potential, then Fury
SignatureCreatorsPer-fighter signature meter with tiers, declared in JSON
Kit InputsPlayersPer-archetype charge and 360° inputs for native fighters
RivalriesCreatorsPer-matchup round-start lines and attack bonus, declared in JSON
Replay CameraPlayersCinematic framing for replays: zooms on close fights, leans toward attacks
Photo ModePlayersFree camera, filters and clean PNG capture on a paused fight or replay
Combo TrialsPlayersSeven combo goals in training, saved per fighter
Match MutatorsCreatorsPer-match rule changes; gravity is the first mutator
Standing HitsPlayers, CreatorsLight hits push back without knocking down; threshold by life %
Rush CancelPlayers & CreatorsSpend meter to cancel a connected move, Overdrive and the presentation
Combo TiersPlayers & CreatorsCombo badges, energy notch, air dashes and bounces
Bleach-inspired kitsPlayersAbilities inspired by Bleach in three native fighters
Effect framesCreatorsProjectile and spark effects
CNS scriptsCreatorsStates, controllers, triggers and commands
AssertSpecial flagsCreatorsAll 77 Ikemen flags and what each one does
Red life, dizzy and guard pointsCreatorsRedLife, DizzyPoints, GuardPoints, states 5300/5400 and HitDef defaults
ScreenpacksCreatorsMenu and HUD screenpack support
Screenpack studyCreatorsScreenpack differentials and what the engine adopted
Sprite atlas importCreatorsTurn a sprite sheet into a fighter
Dev toolsContributorsRust build and audit tools (ume-tools)
Roster auditDevelopersFight every character and stage and read a severity report
Sprite toolkitCreatorsSlice sheets, palette variants, auto collision boxes
Move generatorCreatorsTOML to AIR, CNS, CMD and Statedef -1
Combo stringsCreatorsSignature three-part strings per native fighter
ZSS scriptsCreatorsIkemen ZSS state scripts
Ikemen extensionsCreatorsIkemen GO controllers and triggers the engine accepts
Make a stage (quick start)CreatorsA stage from a .def file, story arena data, and what still needs code
Creating stagesCreatorsFull reference: M.U.G.E.N .def stages and native stages
ArchitectureDevelopersCrate map, dependency direction, where new code goes
ContributingContributorsBuild, checks, rules and pull request flow
Extension pointsCreators, ContributorsWhich file defines each kind of content and whether it needs Rust
Architecture decisionsContributorsADRs: why the engine is built this way
Customizing the engineDevelopersArchitecture, new controller, new trigger, tests
Web match smokeDevelopersCI test that plays full matches in the browser and catches freezes
File layoutDevelopersThe 250-line rule, one responsibility per file, splitting a file, parallel PRs
PerformanceDevelopersParallel loading, frame pacing, benchmarks
Reverse engineering the browser portDevelopersHow a 78-fighter M.U.G.E.N build runs in a browser, and what we took from it
ReplaysPlayersSaved fights, replay browser, playback speed
Research: fighting gamesDevelopersSurvey of other fighters and prioritized improvement list
M.U.G.E.N code studyDevelopersGoku GT and four Mortal Kombat fighters read line by line
Dissection of four fightersDevelopersAizen, Gogeta, Goku SSJ and SSJ4: files, commands, normals, move patterns
Remaking a M.U.G.E.N fighterCreatorsRecipe and mapping to UMF, with the Captain Marlow Reyes rebuild
MUGEN conversion checklistCreatorsWhat the MUGEN to UMF converter migrates, what is partial and what is missing
Ability libraryCreatorsReusable blocks (blink, vfx, quake, projectile.repeat, kit abilities) and the MUGEN gap map
CPU tacticsDevelopersAnti-air, whiff punish, hit confirm and meter rules of the CPU
Fighter studyDevelopers50+ fighters surveyed and the moves they inspired
Smoke test (debug mode)DevelopersOne command checks every main feature on desktop and web, with screenshots and a report
Web QA pipelineDevelopersParallel CI shards that play the wasm build in Chromium, with prints and logs on every failure
Stress and resilienceDevelopersFuzzing, spawner caps, hot path numbers
Native animation auditDevelopersPose coverage of the native roster
Authoring tool surveyDevelopersWhat Fighter Factory Studio checks and how to match it
Research: story modeDevelopersSurvey behind the story mode design
Media captureDevelopersScreenshots and GIFs from the web build in headless Chromium
TroubleshootingEveryoneCommon errors and diagnostic tools

Accepted formats

FormatUseFiles
UMFNative declarative fighterassets/chars/<id>.json
M.U.G.E.NClassic fighters and stages.def, .sff v1/v2, .air, .cmd, .cns, .snd, .act

UMF and M.U.G.E.N fighters run on the same state machine and can fight each other.

Roadmap

Compatibility plans and architecture decisions are in docs/ROADMAP.md. Items marked planned in this wiki do not exist in the current version yet.

Compatibility status

The progress toward Ikemen GO v1.0.0 parity is tracked in issue #135, with one issue per missing controller, trigger or feature. The lists of supported controllers, triggers and redirections in CNS scripts are checked against the engine by cargo test -p ume-engine --test it wiki_sync::: a listed name the engine does not handle, an implemented name that is not listed, or a mismatch between the English and Portuguese pages fails the test. Every character load also reports the controllers, triggers and parameters it uses that the engine ignores (see "Load diagnostics" in the same page).

Acknowledgments

Thanks to the Ikemen GO team and to Elecbyte, creator of M.U.G.E.N, for the inspiration.

Installation

Download a ready build

Download the file for your platform from Releases, extract it and run ultimate-mugen (Windows: ultimate-mugen.exe or run.bat). The desktop build checks the newest GitHub release over HTTPS and asks before downloading and installing it; see Automatic updates. Hide the prompt with --no-auto-update / UME_NO_AUTO_UPDATE=1 or skip the check with --no-update-check / UME_NO_UPDATE_CHECK=1.

Build from source

Requires stable Rust (rustup.rs).

Linux (Debian/Ubuntu):

sudo apt-get install -y pkg-config libudev-dev libasound2-dev libx11-dev libxi-dev libgl1-mesa-dev
TargetCommand
Desktopcargo run --release
Testscargo test --workspace --release
Web (PWA)rustup target add wasm32-unknown-unknown, then ./scripts/build-web.sh and python3 -m http.server -d web/dist 8080
Androidcargo install cargo-apk --version 0.9.6 --locked, then cargo apk build -p ultimate-mugen --lib --release --target aarch64-linux-android
iOScargo install cargo-bundle, then cargo bundle --release --target aarch64-apple-ios (macOS + Xcode)

Folder layout next to the executable

ultimate-mugen(.exe)
ultimate-mugen.cfg        settings saved by the menu
mugen/
  chars/<name>/<name>.def M.U.G.E.N characters
  stages/<name>.def       M.U.G.E.N stages
  <anything>.zip          zipped packs (characters or stages)

The mugen/ folder is searched in this order: UME_MUGEN_DIR, the current directory, next to the executable, and two levels above it.

Automatic updates

The desktop build updates itself from the latest GitHub Release. The release tag is the version source of truth: CI stamps UME_RELEASE_VERSION into the binary, publishes the assets, and the installed build replaces itself with the matching executable for its platform.

Release assets

Every release carries, per platform (windows-x86_64, linux-x86_64, macos-aarch64):

AssetPurpose
ultimate-mugen-v<version>-<platform>.zip / .tar.gzManual install package (binary + README)
ultimate-mugen-v<version>-<platform>[.exe]Raw executable downloaded by the auto-updater
latest.jsonUpdate manifest read by the running build
SHA256SUMS.txtHuman-readable hashes for every asset

latest.json keeps the archive under platforms.<platform> and adds the raw binary:

{
  "version": "0.4.0",
  "notes": "Short release notes",
  "pub_date": "2026-11-05T12:00:00Z",
  "platforms": {
    "windows-x86_64": {
      "url": "https://github.com/juninmd/ultimate-mugen/releases/download/v0.4.0/ultimate-mugen-v0.4.0-windows-x86_64.zip",
      "sha256": "<archive sha256>",
      "size": 1234567,
      "binary": {
        "url": "https://github.com/juninmd/ultimate-mugen/releases/download/v0.4.0/ultimate-mugen-v0.4.0-windows-x86_64.exe",
        "sha256": "<binary sha256>",
        "size": 9876543
      }
    }
  }
}

Only the three published platforms can self-update. Other targets (web, Android, iOS, non-x86_64 Linux, Intel macOS) still read the notice-only path.

Flow

  1. At boot the game requests releases/latest/download/latest.json over HTTPS (8 s timeout, silently ignored when offline).
  2. A newer version with a binary entry for the current platform shows an update panel on the title/menu with the installed and the available versions. Nothing is downloaded until the player accepts "Update now".
  3. Accepting starts the background download (180 s timeout) to .update-v<version>[.exe] next to the running executable.
  4. The download is rejected unless its sha256 and byte size match the manifest and the staged executable answers --version with ultimate-mugen <version>.
  5. Once verified, the staged file replaces the installed executable (on Windows the running file is first renamed to .old) and the game restarts with --no-update-check, so a bad manifest cannot cause a restart loop.
  6. The previous .old file is removed at the next boot.

A failed download, an offline machine or a read-only install folder only changes the status line; the running build keeps working. "Not now" forgets the version until the next boot, and the footer notice stays visible.

Command line and opt-outs

FlagEffect
--check-updatePrints whether a newer release exists and exits
--updateDownloads, verifies and installs the newest release, then exits
--no-auto-update / UME_NO_AUTO_UPDATE=1Keeps the footer notice, never shows the prompt (so never downloads or installs)
--no-update-check / UME_NO_UPDATE_CHECK=1No network request at all

Local -dev builds never self-update.

Verifying a release

node scripts/release-manifest.mjs --verify latest.json --dir <assets> --version <version> --repo juninmd/ultimate-mugen checks that both the archive and the raw binary exist, that their URLs point at the tagged release and that their sha256 values match. The Release workflow runs exactly this check against the draft before publishing, and probes the live manifest afterwards.

Configuration and controls

ultimate-mugen.cfg

Lives next to the executable and is written by the Settings menu (main menu or pause menu: Video, Audio, Controls, Gameplay, Language, About). It can be edited by hand. On the web the same text is kept in localStorage, on Android in the app's private storage.

KeyValuesEffect
fullscreen0 / 1Fullscreen
res0 1280×720, 1 1920×1080, 2 2560×1440, 3 3840×2160, 4 5120×2880Window size
quality0 automatic, 1 3×, 2 4.5×, 3 6×Vector art density
fps0 / 1Show FPS
fx0 to 2Post-processing (bloom, vignette, etc.)
impact_lv0 minimum (photosensitivity), 1 reduced, 2 normal, 3 intenseImpact effect strength
version2File format version (older files without it still load)
vsync0 / 1V-Sync (native)
fps_cap0 unlimited, 1 30, 2 60, 3 120, 4 144Frame limiter (native)
master music sfx0 to 10Volume steps
mute0 / 1Silence everything
difficulty1 to 8CPU level
round_time0 99 s, 1 60 s, 2 30 s, 3 infiniteRound timer
rounds0 first to 1, 1 first to 2, 2 first to 3Rounds needed to win
life0 50%, 1 75%, 2 100%, 3 150%, 4 200%Life bar multiplier
langen / pt / esLanguage of the whole interface
keep_aspect1 (default) / 01 letterboxes the 16:9 picture inside any window shape; 0 stretches it to fill the window
filternearest (default) / linearSprite sampling when scaled: crisp pixels or bilinear smoothing
windowWIDTHxHEIGHT, 0x0 when unsetWindowed size, saved automatically about one second after you stop resizing; overrides res until you pick a size in the Video menu

Player card (player-card.json)

The Player card screen (main menu, Player card) stores the card, record, roster, rivals and achievements in player-card.json, next to the executable (browser: local storage). Training bouts do not count. The file stays on this device; there is no server sync.

Resizable window

The window can be dragged to any size. The game draws into a fixed 16:9 logical space that is scaled to the window, so the fight area, HUD and menus stay consistent at every size and the window size is independent from the game resolution. With Keep aspect on, the unused strip is black; with it off, the picture is stretched and mouse and touch input are mapped back to the stretched space. The --res WxH flag still sets the starting window size and takes priority over the saved window value.

Command line

FlagEffect
--res 2560x1440Window resolution
--4k3840×2160 window
--fullscreenFullscreen
--touchForce touch controls
--muteNo audio
--shots <folder>Automatic tour saving screenshots
--shots-audioEnable sound during a screenshot tour; --mute still takes precedence
--versionPrint the version
--check-updatePrint whether a newer release exists and exit
--updateDownload, verify and install the newest release, then exit
--no-auto-update / --no-update-checkKeep the notice, hide the update prompt / skip the update check

Environment variables

VariableEffect
UME_MUGEN_DIRAlternative M.U.G.E.N content folder
UME_MARKET_HOMEFolder for marketplace downloads and state
UME_GITHUB_TOKEN / GITHUB_TOKENOptional GitHub token for the marketplace (raises the API rate limit)
UME_NO_UPDATE_CHECK=1Skip update checks
UME_NO_AUTO_UPDATE=1Keep the update notice but never download or install
UME_NOFX=1Disable the animated stage layer (performance testing)
UME_TOUR=mugen + UME_CHARS=a,b + UME_STAGE=<id>With --shots, photograph imported fighters

Language and localization

The UI ships three locales: English (default), Portuguese (Brazil) and Spanish. Settings › Language cycles through them at runtime and stores lang=en|pt|es in ultimate-mugen.cfg.

  • src/i18n/catalog.rs holds the keyed table (English and Portuguese) and src/i18n/es_catalog.rs the Spanish column; i18n::t(key) looks up current locale → English → the key name, so an incomplete catalog never shows a blank label.
  • Inline strings use i18n::tr3(pt, en, es); the older i18n::tr(pt, en) finds its Spanish text through src/i18n/es_phrases.rs, keyed by the English string. Placeholders use i18n::fill("{name}", &[("name", value)]).
  • A missing key is printed once to the log (i18n: missing key '<key>').
  • The catalogs are compiled in, so switching has no I/O cost and works on web/mobile.
  • Unit tests keep the catalogs in sync and fail if the migrated screens go back to hardcoded Portuguese.
  • Still Portuguese-only: story cutscenes and boss dialogue, fighter bios and stage names (content data).
  • First launch (no saved config) picks the system language: navigator.language on the web, LC_ALL/LC_MESSAGES/LANG on desktop; English when unsupported.

Importing M.U.G.E.N content

Main menu › Import M.U.G.E.N is the single entry point. On the web the button opens the browser file picker (the page overlays an invisible <label> exactly on the button so the click is a real user gesture) and .zip files can also be dropped on the window. On desktop the button opens the system file dialog (PowerShell on Windows, osascript on macOS, zenity or kdialog on Linux); folders under chars/ and stages/ are still scanned at start.

Controls

ActionKeyboard P1Keyboard P2GamepadTouch
MovearrowsI K J LD-pad / stickvirtual stick
Punches x y zQ W ENum 4 5 6□ △LP HP
Kicks a b cA S DNum 1 2 3✕ ○LK HK
Quick specialsV B NNum 7 8 9—ESPECIAL, SUPER
Move shortcuts (slots 1-4)1 2 3 4—L1, L2, R1, R2—
Awakening (transform)TNum 0L3 + R3 / SELECT—
Tag swap (Tag mode)FNum EnterL3 + R3 / SELECTawaken button
Charge kiRNum DecimalR3 (alone) / START—
Pause / hitboxesEsc / F2Esc / F2START❚❚
Fullscreen / FPSF11 / F3———

The names x y z a b c are the same ones used in character commands (input).

While jumping, x y a b each throw an air normal, and down + b is the diving down kick (generated for every native fighter by native/air_normals.rs, reusing the fighter's own air animations).

Move shortcuts

Open the pause menu, pick a move in the move list and press 1-4 (or L1, L2, R1, R2 on a gamepad) to bind it to that slot. Pressing the same slot again clears it. From then on the bound move is performed by one key or button press, with the right motion and buttons played for you. Bindings are stored per fighter in ultimate-mugen.shortcuts next to the executable. On the web the gamepad mapping follows the same layout.

Button prompts

The pause move list and the Controls screen show the real key or button of the device you used last: keyboard keys, Xbox (A/B/X/Y, LB/LT/RB/RT) or PlayStation (✕ ○ □ △, L1/L2/R1/R2). On touch screens they show the virtual button names. Xbox pads are detected by name or by vendor ID 045E, PlayStation pads by 054C. Rumble works on both: Xbox through gilrs force feedback (and the Gamepad API on the web), DualShock 4 / DualSense through direct HID reports.

Tweaks (tweaks.toml)

Created next to the executable on first run (localStorage on web) with the defaults. Edit and save: the game reloads it within about one second and shows a toast. Mistakes never stop the game; the affected value keeps its default and the toast and log name the key, with a "did you mean" hint and the line for syntax errors.

SectionKeyEffect
[theme]backgroundMenu background base color
[theme]glow_bottom, glow_left, glow_rightMenu light glows
[theme]preset"default", "emerald", "sunset" or "mono": sets background, glows, the five roles below, the life bar and the side tints at once. Any other key in the file still wins over the preset
[theme]accentSelection colour: main-menu highlight, pause and settings buttons, sliders
[theme]title, info, muted, textHeadings and values (gold), hints and links (cyan), secondary text, body text, across every menu and the HUD
[hud]life, life_low, damageLife bar fill, its colour under 25% life, and the trailing damage chunk. The top of each gradient is derived from the colour
[music]fightAudio file played in every fight instead of the built-in theme (.ogg, .mp3, .wav, .flac). Paths are relative to the folder of tweaks.toml. Desktop only
[music]<stage id> (dojo, neon, bamboo, volcano, brazil, ...)Audio file for that stage; wins over fight and over the stage's own music
[hud]p1_tint, p2_tintLifebar accent color per side
[hud]bar_offset_yMoves the lifebars down (-4 to 40)
[accessibility]hud_opacityHUD opacity multiplier (0.3 to 1.0)
[accessibility]colorblindtrue uses blue/orange side colors instead of the tints
[accessibility]hud_scaleHUD size multiplier (0.8 to 1.25)
[accessibility]reduce_motiontrue turns off screen shake
[accessibility]title_crtfalse turns off the CRT static and scanlines on the title screen; reduce_motion = true keeps only still scanlines there

The on-screen pad shows only the six attack buttons and the stick by default. The small + button opens the extra buttons (awakening, charge, quick skills, tag, third-character attacks, guard) and x closes them. The pad fades to 30% of opacity after 2.5 s without touches and stays clear of the notch and home-indicator safe areas on phones. | [rules] | rounds_to_win (1-9), round_seconds (0 = no limit, up to 999), life_percent (10-500), game_speed (0.5-2.0) | Override the Settings menu values for every match; remove the line to go back to the menu value | | [menu] | arcade, story, survival, cpu, versus, training, watch, team_seq, team_simul, team_tag, mugen, market, controls, settings, replays, quit | Text of that main-menu entry |

Colors are "#rrggbb" or "#rgb". Example of a full custom look:

[theme]
preset = "mono"
accent = "#7a3cff"
title = "#b8ff5c"

[hud]
life = "#5cc8ff"
life_low = "#ff5ca8"
damage = "#7a3cff"

[menu]
arcade = "Fliperama"

[music]
fight = "music/my-theme.ogg"
dojo = "music/dojo.ogg"

Screenshots of every preset are in screenshots/themes/ (UME_TOUR=themes). Plan and comparison with other engines: docs/research/customization-comparison.md.

Adding M.U.G.E.N content

Characters

  1. Put the folder in mugen/chars/<name>/ with the .def inside, or drop the .zip straight into mugen/.
  2. Open the game: the character shows up in the select screen. Tab filters between all, originals and M.U.G.E.N.

To download content from a GitHub repository instead, see the GitHub marketplace.

Use Main menu › Import M.U.G.E.N (the only import button; on the web it opens the browser picker, on desktop the system file dialog) or drag the .zip onto the web window. Imports are idempotent: the same archive, or the same fighter or stage found again under another path, name or letter case, is registered only once (identity is a hash of the normalized .def plus its sprite file). Packs saved in the browser from older versions are deduplicated automatically on the next load.

The screen shows a holographic mosaic of every imported fighter (F also lists the native roster). Arrows, gamepad or touch move the cursor, Enter or a click opens the character sheet: portrait, author, series, source .def, version, palette count, nationality and bio when known, stat gauges, and the full move list with input and energy cost (Left/Right switch fighter, Esc returns). Up from the first row focuses the import button. Capture with UME_SHOTS_ONLY=mugenroster (UME_ROSTER_ZIPS=a.zip:b.zip imports packs first).

A web import shows a full-screen loading overlay from the moment the files are selected until the last archive is registered. Archives are read, decompressed and registered one per frame, with at most two raw packs waiting in wasm memory; a batch of large packs no longer runs in one frozen frame. The same overlay appears on startup while the packs persisted in IndexedDB are restored, one at a time.

Hundreds of characters are registered without decoding everything; only the item under the cursor is loaded, and an LRU cache bounds memory.

Before a character reaches the roster, the catalogue checks that every file its .def names under [Files] exists inside the character's own folder (or the pack root, or data/): sprite, anim and cns are required. A character that fails the check is quarantined: it is kept out of the select screen, and the reason is listed. Files are never borrowed from another character's folder, so a copied .def that points to another fighter's sprites cannot load them by name. The check is structural (file presence), so it stays fast enough for the startup scan; a fighter whose files exist but whose animations reference missing sprites still loads and is shown with its missing frames.

Open Personagens MUGEN on the main menu to see the summary: how many characters loaded, how many are in quarantine and the most common reasons, plus a gallery of every loaded character (portrait, name and author; ←/→ change pages) and the quarantine list (TAB switches the view; ESC returns).

Stages

Put <name>.def and the .sff in mugen/stages/, or inside a .zip in mugen/.

What is supported

ItemStatus
.sff v1 and v2 (PCX, RLE8, RLE5, LZ5, PNG 8/24/32)Supported
.air, .cmd, .cns, .st, .snd (PCM WAV 8/16 bit), .actSupported
localcoord (HD 720p characters)Supported
~80 state controllers and 100+ triggersSee CNS scripts
ReversalDef, HitOverride, RemapPal, SndPan, VictoryQuotePlanned
[BGCtrl] in stages, screenpacks, fight.def lifebars, .fnt fontsPlanned
Ikemen GO extensions (ZSS, Map, Dizzy, Tag...)Planned

Validate a character

cargo run --release -p ume-engine --example mugen_check -- mugen/chars/kfm
cargo run --release -p ume-engine --example sprite_audit -- mugen/chars/kfm
cargo run --release -p ume-engine --example hover_check -- mugen/chars/kfm

cargo run --release -p ume-formats --example mugen_refs -- mugen/chars cargo run --release -p ume-formats --example mugen_lint -- mugen/chars cargo run --release -p ume-engine --example mugen_pairs -- --matrix mugen/chars cargo run --release -p ume-formats --example mkselectdef -- mugen > mugen/select.def


| Tool | Shows |
|---|---|
| `mugen_check` | Loads and simulates a fight without a window; lists parse errors, invalid states and unsupported controllers, triggers and parameters (`--strict` fails on them); `--lint` adds source checks: duplicate parameters, invalid `trans`/`postype`/`space` values, `persistent` in negative states, `[State N]` not matching its `[Statedef]`, garbage lines, duplicate `[Command]` keys, duplicate and empty `.air` actions (`TRACE=1` lists each line) |
| `sprite_audit` | Missing or blank sprites referenced by the `.air` |
| `hover_check` | Fighter stuck off the floor (`TRACE=1` shows transitions) |

Characters whose license forbids redistribution must not be committed: `mugen/` is git-ignored.

GitHub marketplace

English · Português (BR)

Install characters, stages and music straight from any public GitHub repository. Open Mercado GitHub in the main menu.

Quick start

  1. Press U (or click + Adicionar) and paste a link: https://github.com/owner/repo, owner/repo, or a folder link such as https://github.com/owner/repo/tree/main/mugen.
  2. The game reads the repository tree and lists what it finds.
  3. Mark items (Space, click, or Todos) and press Instalar (I). Downloads run in parallel with a progress bar.
  4. Installed items are active right away. Use Ativar (E) and Desativar (O) on any selection, including bulk selections, or Remover (X) to delete them from the device.

Everything is stored locally, so the repository list, the installed items and their on/off state are still there next time.

Browsing: list, grid, formats and outdated items

  • List and grid. The Lista / Grade switch (V, or the gamepad aux button) toggles a dense list and a grid of cards with a portrait, and is remembered. In both, a tap or click marks an item and dragging scrolls (touch friendly); the mouse wheel, PageUp/PageDown and the arrow keys scroll too.
  • MUGEN and UMF badges. Every character, stage and pack shows its format. A pack is UMF when its path or name says so (umf/ folder, *_UMF.zip); everything else is MUGEN. The same fighter can exist in both formats: they are never merged, each variant keeps its own badge, state and download, and variants of one fighter are sorted next to each other (Goku_SS4 and Goku_SSJ4_UMF count as one fighter).
  • Outdated items. An installed item whose repository version (hash of file paths and shas, see above) differs from the one installed is marked DESATUALIZADO and outlined in orange. The listing then re-downloads it automatically, and Instalar does it on demand.
  • Filters. Type (F), format Todos/MUGEN/UMF (J) and Desatualizados (P) combine with the Explorar/Instalados tabs (Tab).
  • Pack vs character. A zip's kind comes from its contents (read via HTTP Range, never the whole file): one fighter shows CHARACTER, several show PACK · N and the footer lists them (Contém (N): ...). Filter Not installed (K) hides what you already have.
  • Batch actions. Install all (Z), Update all (Y) and Remove all (B) respect the active filters; removal asks for confirmation and progress is shown in the footer.
  • Portraits. Cards show the preview image of the item: a PNG in a previews/, portraits/ or thumbs/ folder with the same name as the item (previews/umf/Goku_SSJ4_UMF.png for umf/Goku_SSJ4_UMF.zip). Only visible cards are fetched (3 at a time, from raw.githubusercontent.com), downscaled to at most 240 px wide, kept in an in-memory cache of 48 portraits and, on desktop, on disk next to the listing by blob sha. Items without a preview show their initials.

Suggested repositories

Only juninmd/ultimate-mugen is in the in-game suggestion list (SUGGESTED in src/market.rs). The other row is a reference: the links open each folder on GitHub. To add it in the marketplace, type owner/repo.

What is detected

KindRuleInstalled files
Characterfolder with a .def plus .sff, .air and .cns/.cmd in its treethe whole folder, plus files declared in [Files] that live elsewhere in the repository
Stage.def with a same-name .sff, or any .def under a stages/ folderthe stage files, its spr sprite file and its bgmusic file
Music.ogg, .mp3, .flac, .wav (wav under 32 KB is ignored as a sound effect)the audio file
Pack.zipthe archive, unpacked in memory like a manual import

Screenpack files (system.def, select.def, fight.def, ...) are never treated as stages or characters. Files inside hidden folders (.git, .github) are skipped.

Active music tracks play as the fight BGM in rotation whenever the stage has no music of its own. A M.U.G.E.N stage with bgmusic keeps its own track.

Where data lives

PlatformState and downloads
Linux$XDG_DATA_HOME/ultimate-mugen/market (default ~/.local/share/ultimate-mugen/market)
macOS~/Library/Application Support/ultimate-mugen/market
Windows%APPDATA%\ultimate-mugen\market
Androidapp internal storage, market/
WebIndexedDB database ultimate-mugen-market

Set UME_MARKET_HOME to move the folder on desktop. Each installed item is a single bundle file; the list of repositories, the installed items, the ETag of each listing and the optional token are in state.json. Bundle file names are percent-encoded with lowercase letters only, so items and folders whose names differ just in letter case never share a file on Windows or macOS.

Rate limits, token and caching

The listing uses the GitHub API (60 requests per hour without a token) and file downloads use raw.githubusercontent.com, which is not limited the same way. Listings send the saved ETag, so an unchanged repository answers 304 and is served from the local cache. A repository is refreshed when you open it if the cache is older than 10 minutes, or on demand with R.

Automatic updates

Every listing entry keeps the Git blob sha of each file. An item's version is a hash of its file paths and shas, saved with the installed item. While the game runs (and at startup) each repository that has installed items is re-listed every 10 minutes; any installed item whose version differs from the repository is downloaded again, and only that item. Updated items keep their active or inactive state. Downloads add ?v=<sha> so a fresh push is never served from the raw.githubusercontent.com cache. Items installed before versions existed are reinstalled once.

To raise the API limit press T and paste a personal access token (no scopes needed for public repositories), or set UME_GITHUB_TOKEN / GITHUB_TOKEN on desktop. The token is only ever sent to api.github.com.

Safety limits

  • Only https links to github.com, api.github.com, raw.githubusercontent.com, media.githubusercontent.com and codeload.github.com are fetched. Redirects to other hosts are blocked.
  • Paths coming from a repository are validated: no .., absolute paths, backslashes, drive letters, control characters, leading spaces or Windows reserved device names (CON, PRN, AUX, NUL, COM1-9, LPT1-9). Unsafe entries are dropped from the listing.
  • Limits: 64 MB per file, 256 MB and 4000 files per item, 48 MB for the listing. Items above the limits are shown as "grande demais" and cannot be installed.
  • Content never runs as code. Characters are loaded by the same sandboxed parsers as manual imports.
  • Respect each author's license. Installing from a repository is a download, not a redistribution right.

Platform notes

PlatformAdding a repository
Desktoptype in the game (paste is not available in the game window; type owner/repo)
Web and phone browserthe browser's own prompt, with paste

Community roster of M.U.G.E.N characters. Paste a folder link in Mercado GitHub (U) to install a single character.

KindLink
Repositoryzinclee123/mugen_chars
CharactersHinako · K' · Lin · MasterRyu · Rugal2nd · kusanagi-XIII
Stagesnone in the repository
Musicnone in the repository
Packsnone installable (the .rar in the repository is not a marketplace pack)

98-kim and yujiro are AI patches without sprites: they are not listed as characters and need the original fighter installed first. MasterRyu holds four fighters (Ryu, NormalRyu, EvilRyu, MasterRyu) in one folder, so all four appear after installing it.

Smoke test results and evidence: docs/evidence/mugen-chars-smoke.

Scrolling stages and wave villains

Each arena has a wide strip in assets/stages/story/<arena>.png, one segment per fight (4 waves plus the boss). Wave villains have around 10 % of the protagonist's maximum life (villain_life_ratio in src/story/stages.rs: 9 % to 12 % depending on archetype). When a wave is defeated the screen is released: the protagonist keeps control and explores the segment freely, a GO arrow shows at the right edge, and the camera only scrolls to the next segment once the player walks to the exit; the next wave then waits frozen off screen (the screen clamp ignores it) and walks in from the right edge once the scroll lands and the screen locks again (LaneRules::gate, Match::lane_scroll_step in crates/engine/src/lane.rs, App::story_advance_in_place in src/app/story/advance.rs). Upon reaching the rightmost segment at the end of the stage, the stage boss awaits. Regenerate the strips with python3 tools/story_segments.py; the original stage art is never modified.

Animated backdrops

The scrolling backdrop is alive in every segment. While a stage's eight ambient loop frames are loaded (see Stages), the renderer rebuilds the strip from the current frame on each draw instead of showing the static PNG: the first segment is the arena itself, the three middle segments are mirror chains of a window of the arena, and the boss segment is the arena flipped. Colour grading follows the same ramp as the baked strip and the 70 px seams are cross-faded with mirrored slices, so the result lines up with the static strip (a unit test compares both pixel by pixel outside the seams). The loop advances every eight simulation ticks, in step with versus mode, and costs no extra texture memory because it samples the frames the stage already loaded.

The layout lives in src/stages/story_loop.rs (runs, pieces, grade_at, seam_mix) and the drawing in src/render/story_loop.rs (Gfx::draw_backdrop). The static strip stays as the fallback when no loop frames exist and still defines the strip size. To capture the evidence set, run UME_TOUR=storyloop target/release/ultimate-mugen --shots <dir> (add UME_TOUR_BURST=1 for GIF frames); results are in screenshots/story-loop/.

Remaining health carries over between fights and recovers a little after each wave.

Breakables, food and bonus rounds

Crates and barrels along each strip break when struck and can drop food, a gem or a battery; stages 1 and 3 end with a bonus round (wreck the car, break the stash). See Stage objects.

Final boss and epilogues

Before the final fight, after the spare-or-finish choice, the player may call a helper: left and right cycle the native roster (or GO SOLO), confirm accepts. The helper fights beside the hero as a CPU teammate in that fight only (src/story/helper.rs, src/app/story/helper.rs); if the hero falls, control passes to the helper. Web hook: ?e2e=1&e2e_helper=1 jumps to this screen, smoke script scripts/web-helper-smoke.js.

The last stage (Kingpin Rooftop) ends against Valdric Morn, commander of the Red Star Empire and the kingpin behind the street gang. A player who picked Valdric faces Kaito Arashi instead (final_boss in src/story/epilogue.rs, which reads the last entry of STAGES).

Beating the final boss plays an epilogue before the STORY COMPLETE card. Every fighter of the roster has its own, in English, Portuguese and Spanish, made of five pages:

PageSceneContent
1Rooftop at night, boss on the groundthe boss speaks to this fighter
2Rooftop, fighter in the victory posethe fighter answers
3The fighter's home scenery at dawnnarration
4Home scenery in daylight, victory posenarration
5Home scenery, dimmedTHE END card with the fighter and the epilogue title

The scenery is the illustration of an existing stage with a slow pan, drifting light motes, letterbox bars, a fade when the scene changes and text typed letter by letter. OK reveals the line and then advances, ESC skips to the final card.

The fighter on screen plays its own animations: the walk cycle (20) carries it into the home scene, the taunt (195) or win pose (181) plays while it answers, and the win pose closes the story. Animations a fighter does not have fall back to the next one in the chain and finally to idle (src/story/epilogue_pose.rs).

Texts live in assets/story/epilogues.json, keyed by fighter id. A fighter with no entry (imported M.U.G.E.N characters or custom ones) gets an invented epilogue: one of the *:tale1 to *:tale6 templates, picked by a stable hash of the fighter id, with {name} replaced by the fighter's display name. * stays as the last resort when the name is empty:

{
  "mika": {
    "scene": "neon",
    "title": { "en": "Storm Season", "pt": "Temporada de Tempestade" },
    "boss": { "en": "Line the final boss says to this fighter." },
    "reply": { "en": "The fighter's answer." },
    "pages": [{ "en": "First narration page." }, { "en": "Second narration page." }]
  }
}

scene is any built-in stage id. A missing language falls back to English. To change or add epilogues without rebuilding, save a file with the same shape as story-epilogues.json next to the executable (or in browser storage): its entries replace the bundled ones fighter by fighter.

Code: data and lookup in src/story/epilogue.rs, flow in src/app/story/epilogue.rs, drawing in src/app/story/epilogue_draw.rs and epilogue_text.rs. Evidence in screenshots/story-epilogues/, captured with UME_TOUR=epilogue ultimate-mugen --shots <dir> --res 1280x720 --mute; the browser check is node scripts/web-epilogue-smoke.js web/dist.

The loading screen is no longer a hero-versus-villain card in the story. Wave fights show a stage card (stage number, title, wave and hero name; src/app/story/stage_card.rs) so no enemy is exposed; the classic versus screen is kept for boss fights only, with a BOSS tag and the stage title over it.

Clearing a stage boss now pays a life bonus on top of the boss bonus: StageTally (src/story/tally.rs) gives remaining life x 2000 x stage number, and the Stage Clear screen lists both (STAGE BONUS +n LIFE +n). The browser hook ?e2e_clear=1 opens that screen for smoke checks.

Story juice (src/vfx/story_juice.rs, active only while lane rules are on): footstep dust while the hero walks, sparkles over pickups, a K.O.! pop-up with ring and sparks when a foe falls, a ring and sound when the screen is released, and an animated GO cue (pulse plus sliding chevrons). Everything is procedural, no sprite is touched.

When the scroll lands and the screen locks again, story_juice adds a screen shake, a thud, rings on both screen edges and dust bursts under the waiting wave; while the hero is below 25 % life the vignette pulses.

Stage objects: breakables, food and bonus rounds

English · Português (BR)

Story stages carry arcade-style objects that live inside the simulation: crates and barrels that break when struck, food and other pickups that pop out of them, and a bonus round where the goal is to wreck everything before the clock runs out. Everything on this page is original content and is driven by one TOML file, so a new object needs art and a few lines of data, not code.

Wave with a crate and a barrel

What the player sees

  • Breakables. Any strike or projectile that reaches a crate or barrel damages it. The sprite switches to a cracked frame as it loses life, shakes and flashes on impact, and leaves splinters or a crushed drum behind for a few seconds.
  • Pickups. A broken object can drop one item. It pops up, bounces once and waits on the floor for 15 seconds (it blinks during the last 2.5). Walking over it collects it.
  • Bonus round. After the boss of the Back Alleys and of the Bamboo Grove, the villain leaves and a bonus round starts in place: wreck the car (4 damage stages, smoke and sparks when badly hit) or break the whole stash before the timer ends. No enemies and no way to lose; breaking everything pays the object score plus 200 points per second left.
PickupEffectScore
Apple+12 % life100
Pizza slice+25 % life200
Roast+50 % life400
Gemscore only1500
Battery+34 % power150

Food restores life Bonus round

Rules (engine)

crates/engine/src/stage_objects.rs owns the state (Match::objects), so it is cloned with the match, hashed by the netplay checksum and never allocates during a tick.

  • A Breakable has a position on the floor, a lane, a hurt box (half_width, height), life and an optional PickupSpec drop. Standing strikes pass over low objects, so the hurt box is at least 100 units tall.
  • Depth: with lanes on, an attacker reaches an object when its lane is within LANE_REACH + depth of the object lane.
  • One hit per swing: after a hit the object ignores new hits for REHIT_TICKS (10). The attacker gets MoveContact/MoveHit and up to 8 ticks of hit pause, so normals cancel off a crate exactly like off a fighter.
  • solid objects (the car) push grounded fighters out of their body; jumping above the roof is free.
  • Pickups are collected only by root fighters of collector_side (the hero side), alive, within 18 units, within twice the strike lane reach and near the floor. Healing never exceeds life_max.
  • start_break_all_goal(ticks) turns the round into a bonus round: the round clock mirrors the goal clock and the round ends for side 0 when every object is broken (Goal::Cleared) or the clock runs out (Goal::TimedOut).
  • Presentation reads objects.events (Struck, Broken, Dropped, Collected, GoalCleared, GoalTimedOut) once per tick and clears it.

Data (assets/story/objects.toml)

A copy named story-objects.toml next to the executable (or in browser storage) replaces the bundled file.

[kinds.crate]
sprite = "crate"            # sheet in assets/props/story/, frames side by side
frames = 3                  # damage stages left to right, the last one is the remains
size = [48.0, 48.0]         # drawn size in world units
half_width = 20.0
height = 42.0
depth = 10.0
life = 120.0
score = 100.0
solid = false
debris = [0.78, 0.55, 0.3]  # particle colour
sound = "wood"              # "wood" or "metal"

[pickups.pizza]
sprite = "pizza"            # 6 frames, a shine sweeps across
heal = 0.25                 # fraction of the life bar
power = 0.0                 # fraction of the power bar
score = 200.0

[stages.brazil]
objects = [
  { fight = 0, kind = "crate", x = -78.0, lane = -22.0, drop = "apple" },
]

[stages.brazil.bonus]
seconds = 30
objects = [{ kind = "car", x = 34.0, lane = -16.0 }]

fight is the wave index inside the stage (the boss is the last one), x is measured from the centre of that fight's segment and lane is clamped to the stage floor band. A stage without a bonus table goes straight from the boss to the stage-clear screen.

Art

python3 tools/story_objects_art.py draws every sheet from code (flat shapes, dithered ramps, one-pixel ink outline) at 2 pixels per world unit, so the art is reproducible and free of third-party assets. Replace a PNG with a sheet of the same layout to reskin an object.

Code map

FileRole
crates/engine/src/stage_objects.rsState, goal clock, solid bodies
crates/engine/src/stage_objects/strikes.rsStrikes and projectiles against breakables, drops
crates/engine/src/stage_objects/pickups.rsPickup physics and collection
src/story/objects.rsTOML catalog, spawning per stage and per bonus round
src/story/objects_art.rsSprites, shadows, hit flash, depth ordering against fighters
src/vfx/stage_objects.rsDebris, sparks, smoke, floating text, sounds
src/app/story/bonus.rs, src/app/story/hud.rsBonus round flow and its HUD

Evidence capture: UME_TOUR=storyobjects ultimate-mugen --shots <dir> --res 1280x720 --mute.

Audio

🇧🇷 Sons de personagens (.snd), música de cenário com loop e posição estéreo (pan). Formatos: WAV, OGG, MP3 e FLAC.

Formats

Character sounds come from the .snd file. Music files can be WAV, OGG Vorbis, MP3 or FLAC. Everything is decoded by symphonia (pure Rust), so the same code runs on desktop, web and Android.

Character sounds

  • Sounds play from where the fighter stands: a fighter on the left of the screen is heard on the left speaker.
  • channel works as in M.U.G.E.N: a new sound on the same channel of the same fighter replaces the old one; lowpriority = 1 keeps the old one if it is still playing.
  • PlaySnd reads pan, abspan, loop, freqmul, volumescale, channel and lowpriority. StopSnd stops one channel, or every sound of the character with channel = -1.
  • Looping sounds keep playing until the channel is stopped or the fight ends.
  • SndPan moves sounds that are already playing on that channel (or every channel and looping sound of the character with channel = -1); playback continues from the same point.
  • A sound that fails to decode still plays, without panning.

Move voices

Every special, super, finisher and awakening of the native roster is announced by its fighter when the move starts, anime style (Hellflame Orb!). Each fighter has its own voice and the Settings > Audio row Move voices scales or mutes them (0% turns them off).

  • Clips live in assets/voices/voices.bank, embedded in the binary (about 0.9 MB, 16 kHz Vorbis, one stream per fighter). A move's clip is found by the move id; ex_ versions reuse the base move's clip and the npc_* fighters borrow their parent's voice.
  • MoveInfo.state ties the move to its state, so the voice fires on the state change and follows cancels, combos and form moves.
  • Clips are generated offline with Kokoro-82M (Apache-2.0, model and voices) through kokoro-onnx (MIT): python3 tools/voices/generate.py [fighter...] with KOKORO_MODEL / KOKORO_VOICES pointing at kokoro-v1.0.onnx / voices-v1.0.bin from the kokoro-onnx releases, plus ffmpeg with libvorbis. The cast table (voice, speed, effect per fighter) is at the top of that script. Nothing is synthesised at run time.
  • To add a fighter, add it to the cast table and rerun the script; moves without a clip stay silent.

Built-in music per stage

Every stage without a [Music] entry plays one of the built-in synthesized themes, picked by the stage (Stage.music), so the dojo, neon city, bamboo grove, volcano and the other arenas each have their own track. Themes are rendered once at startup on a background thread (music-synth) and loop until the fight ends.

Hit sounds and impact ducking

  • Hits come in tiers: hitlight, hit and hitheavy, each with three detuned variants, so repeated hits never sound identical. Counter hits, supers, transformations and the KO have their own sounds.
  • Impact ducking dips the music for a moment on a hit (hit 0.8, hitheavy 0.55, counter 0.45, super 0.35, ko 0.2 of the current level) and recovers smoothly.
  • A crowd cheer plays on the KO.
  • AssertSpecial nomusic silences the music and keeps the effects.

Stage music (M.U.G.E.N stages)

[Music]
bgmusic = sound/stage.ogg
bgmloopstart = 88200
bgmloopend = 1764000

bgmloopstart and bgmloopend are in samples. The song plays once up to bgmloopend, then repeats the part between the two points. With both at 0 the whole file loops. If the file is missing or cannot be decoded, the built-in music for the stage plays instead.

Character select

Research summary

Common traits of well-known fighting-game select screens (Street Fighter, Tekken, King of Fighters, Guilty Gear, Marvel vs. Capcom, Smash):

  • A compact roster grid in the centre, with a highly visible cursor and the hovered fighter shown large on the side of the player who owns the cursor.
  • Each player has a distinct colour (blue for P1, red for P2) used for the cursor, the name plate and the panel edge.
  • The big portrait changes instantly on hover with a short slide and fade, never a hard pop.
  • Confirming gives an immediate, clearly different response: flash, pose change, a "ready" mark and a sound.
  • Team modes show a row of slots that fill in order, with the next slot highlighted.
  • The stage is chosen on the same screen or right after it, with a thumbnail and name.
  • Every fighter is shown at a comparable on-screen size so small characters are not lost.

Design adopted

  • Glass panels, the same look as the menu and HUD: translucent body, light top edge, accent edge per side.
  • Left and right panels with the hovered fighter in a large frame, a coloured glow from the fighter's own colour, a floor shadow, slide and fade on change, a flash and ring on confirm and the confirmation pose.
  • Smoothly following cursor with pulsing fill, corner brackets and a P1/P2/CPU tag; non-hovered tiles are dimmed.
  • Team slots (up to 5) with portrait, name and a numbered badge on the picked tiles.
  • Stage chip in the header, cycled with [ and ] or by clicking the arrows; the stage grid still confirms it after the fighters.
  • Palette row under each side panel: 12 numbered swatches with the current one highlighted. , / . cycle, P picks a random palette, clicking a swatch jumps to it; each side keeps its own palette and team members are stored independently. The last palette of each player is persisted in ultimate-mugen.cfg (pal1, pal2) and in replays.
  • Keyboard, gamepad and touch/mouse use the same navigation as before.
  • Grid navigation moves by column: Up and Down keep the current column and land on the closest tile of the target row, so a shorter last row never blocks or skips the cursor. PgUp/PgDn move a whole page, Home/End jump to the ends, the wheel scrolls by row and R picks a random tile.

Uniform character size

draw_char_fit scales a fighter so the union of the bounding boxes of all idle-animation frames fits a fixed frame, centred horizontally with the feet on the baseline. The extent is computed once per fighter and cached (App::char_extent). The same function is used by the select panels, the roster tiles that fall back to sprites, and the versus screen. Sprite and stage art files are never modified.

Performance

  • Only visible tiles are drawn and decoded; one portrait is decoded per frame.
  • Upper-case names and the stage/filter labels are cached or written into a reused buffer, so the screen allocates nothing per frame in steady state.

Strength, life and sorting

Each tile has a thin gold bar at its bottom edge for strength. The side panel shows three gauges above the name plate: FOR (strength), VID (life) and VEL (walk speed).

Definitions, read from each character's data (native and M.U.G.E.N alike):

  • Strength = data.attack × data.life / 1000 (defaults 100 and 1000, so an average character is 100). Gauge full at 200.
  • Life = data.life (default 1000). Gauge full at 2000.
  • Speed = velocity.walk.fwd.x (default 2.4). Gauge full at 6.0.

Press O on the select screen to cycle the order: roster, strength, life, speed, name. The choice is saved as sort= in the config. Stats come from the character's cached preview and are computed once per character.

Limitation: sorting by a stat loads the preview of every character in the view the first time, so a very large M.U.G.E.N roster can take a moment on that first press.

Large rosters (1000+ fighters and stages)

  • The visible list (filter, search and sort) is computed once and reused until the filter, sort, search text or the playable set changes (src/app/select_view.rs). With 1017 fighters a name sort costs about 0.9 ms when rebuilt and 0.08 ms when reused.
  • The grid only uses as many rows as fit above the footer, or above the team slots in team modes, so the slots never cover the last row (src/app/select_grid.rs).
  • The cursor tag (P1, P2, CPU) is drawn inside the tile, so it no longer covers the name of the tile above. Tile names are cut to the tile width with an ellipsis (App::fit_label).
  • A search pill under the title shows the current search and the number of results; / or a click opens the search page, Esc or a click clears it. Search matches name, id, author and series. On the search page the arrows and PgUp/PgDn choose a result and Enter moves the cursor to it.
  • The footer shows the page (page 3/15) next to the position.
  • F or the star button marks the fighter under the cursor as a favorite; favorites show a gold star on their tile and are saved (favorites.txt). Every pick is recorded in the 24 most recent picks (recent.txt). The FAVORITES and RECENT filter chips show only those fighters, recent ones newest first (src/app/select_marks.rs).
  • The author chip (U, Shift+U or a click) cycles through authors ordered by fighter count and combines with the other filters (src/app/select_author.rs).
  • On touch devices the search page shows an on-screen keyboard (letters, digits, space, delete, OK, close) and fewer result rows; tapping a result picks it (src/app/select_search/keyboard.rs). UME_OSK=1 forces it on desktop.

Stage select

  • Filter chips (All, Originals, M.U.G.E.N), cycled with Tab, and a search box opened with / or a click; Esc clears the search.
  • Names are cut to the tile width with an ellipsis; Home/End jump to the ends; the footer shows position and page.
  • Random picks among the stages that match the current filter and search.
  • M.U.G.E.N stage previews start only after the cursor rests for 0.12 s, one per frame, and previews more than six rows away are released, so scrolling through hundreds of M.U.G.E.N stages does not keep every decoded stage in memory.

Stress mode

UME_STRESS=<n> (desktop) or ?stress=<n> (web) adds n generated fighters and n generated stages (up to 5000) that reuse the bundled content with generated names, authors and series. It is a test hook only. UME_STRESS=1000 UME_SHOTS_ONLY=roster ultimate-mugen --shots <dir> --res 1280x720 --mute prints roster-perf: lines (view cost per sort, CPU time per frame while walking the grid and the stage list, memory) and saves screenshots of the grid, search and stage filters.

Game modes

English · Português (BR)

The main menu offers single fights (Arcade, Versus CPU, 2 Players, Training, CPU vs CPU) and three team modes. The select screen has a mode chip (< > or M) that cycles Versus CPU, 2 Players, CPU vs CPU and the team modes; in a team mode a size chip (- + or Q / E) picks the squad. The web build allows up to 7 per side; native Android and iOS cap at 5 because their sprite atlas is 2048.

ModeFighters in playRound ends when
Team · Sequence1 per side, the next teammate enters after a KO; the winner keeps its lifeone side runs out of fighters
Team · Parallelthe whole team at once (2 to 7), each fighter spawning at a random spot of the stage (seeded, so replays match); Tab hands your controller to the next teammateevery member of a side is KO'd
Team · Tag1 active + the rest on standby (2 or 3 per side)every member of a side is KO'd

Arcade / Story Mode

Arcade in the main menu runs the Scarlet Eclipse Tournament story campaign with full cutscenes, dynamic villain progression, and secret fighter unlocks:

  • Prologue (Cutscene kind: 0). Each of the 15 native fighters has a unique opening narrative and personal vow before entering the tournament ladder.
  • Dynamic Boss Rotation. The 8-opponent ladder culminates in a dedicated final boss battle with tailored pre-boss dialogue cutscene and boss arena:
    • Tier 0 (First Run): The supreme architect Mikazuki Oboro (oboro) at Gate of Spirits (spirit).
    • Tier 1 (After Beating Oboro): Garan the Ashen Oni (garan) becomes the new main villain at the Volcanic Crater (volcano).
    • Tier 2 (After Beating Garan): Valdric Morn (valdric) ascends as the imperial tyrant final boss at Neo-Metropolis (neon).
    • Subsequent Clears: Rotates cyclically among the 3 main villains. If the player selects the active villain, the engine shifts to an alternate boss to prevent mirror fights.
  • Boss Empowerment & Oboro Phases. When fighting as the arcade final boss, villains receive true boss status (boss = true, 2000 HP, 125% attack multiplier, boss AI level, power gauge auto-generation, aura VFX, and a dedicated CHEFE FINAL banner). When facing Oboro:
    • Phase 1: Oboro fights with flight, shadow teleportation, super speed, and his first awakening (Véu Desperto, form = 1). If Oboro loses a round during the match, he automatically breaks his seal at the start of the next round (Match::awaken_defeated_boss).
    • Phase 2 (Awakening: Absolute Eclipse - Cutscene kind: 3): Defeating Oboro the first time triggers the Awakening: Absolute Eclipse cutscene (kind: 3), launching Phase 2 (Match::awaken_boss_phase(2)) where Oboro starts in Eclipse Absoluto (form = 2) with boosted max life (1.15x), dark regeneration, accelerated meter gain, level-8 AI, and Phase 2 moves (Corte do Eclipse Carmesim, Chama do Eclipse Eterno, Julgamento do Eclipse Absoluto).
    • Phase 3 (Climax Battle Cutscene - Cutscene kind: 4 & Supreme Awakening): Defeating Oboro in Phase 2 triggers an animated supersonic combat clash cutscene (src/app/cutscene/battle.rs) with striking animations, weapon sparks, and speedlines where Oboro ascends into his ultimate celestial form: Eclipse Primordial (form = 3). Phase 3 features supreme stats (1.62x attack, 1.48x defense, 1.30x life), supernova cyan aesthetic, enhanced AI, and exclusive moves (Colapso Primordial, Supernova do Eclipse Primordial).
    • Finishing Strike Cutscene (Cutscene kind: 5) & Shattered Eclipse: Defeating Oboro's supreme form triggers a climactic finishing blow cutscene where the hero delivers a supersonic decisive strike, an anime impact frame, shatters Oboro's cursed blade, and breaks the eclipsed moon into radiant golden dawn rays.
  • Character Ending Cutscenes (Cutscene kind: 2) & Oboro Unlock. Following the defeat cutscene, the player's character-specific ending cutscene plays (src/app/cutscene/endings.rs) with personalized victory epilogue narrative. Completing the ladder unlocks Mikazuki Oboro on the character select screen, advances the villain rotation, and returns directly to the Main Menu (Screen::Menu).

Story (brawler stages)

Story in the main menu is a Final Fight / Sengoku style run: five stages, each a few waves of street thugs fought all at once (1 versus 2 to 4, using the simultaneous-team rules) closed by a stage boss.

  • Stage checkpoints. Clearing a stage saves the next stage, fighter, palette, life, score and credits in one local checkpoint. Open Story again and select Resume to start that stage, or New campaign to choose a fighter. A new campaign replaces that checkpoint when it clears a stage. Finishing the campaign clears the checkpoint. Saves are stored in story-checkpoint.json beside the executable or in browser storage.
  • Structure & right-scrolling progression. Stage = 4 waves + 1 boss along a wide stage strip (assets/stages/story/<arena>.png). As each wave of street thugs is defeated, the protagonist advances to the right while the camera scrolls smoothly into the next stage segment (Match::lane_scroll_step, App::story_advance_in_place), culminating in the stage boss at the far right end of the stage. Backdrops: Back Alleys (Brazil square), Subway (Neo-Metropolis), Bamboo Grove, Industrial Area (Volcanic Crater) and the Kingpin Rooftop (Dojo). Bosses: Bruno, Marlow, Lian, Garan, Valdric. Picking a boss as your fighter swaps in the alternate (Daichi, Kaname, Shion, Haruki, Kaito).
  • Wave villain & boss tuning. Wave villains have around 10 % of the protagonist's maximum life (9 %–12 % via villain_life_ratio in src/story/stages.rs) so waves play like brisk beat-'em-up encounters; stage bosses at the end of the stage get 150 % life and 110 % attack.
  • Life carries over. The bar you end a wave with is the bar you start the next with, plus 20 % after a wave and 60 % after a stage (the "food pickups" of the arcade originals).
  • Breakables, food and bonus rounds. Every fight has crates or barrels that break when struck and may drop food (apple +12 %, pizza +25 %, roast +50 % life), a gem (score) or a battery (power). After the bosses of stages 1 and 3 a bonus round starts in place: wreck the car or break the whole stash before the clock runs out. Rules, data file and art: Stage objects.
  • Credits. You start with 3 credits; a KO offers Continue (resumes the same fight with 60 % life) until they run out.
  • Score. The engine's ScoreTotal of the fight plus a wave bonus (500 x stage, boss x4).
  • Difficulty. CPU level rises with the stage and +2 on bosses (cap 8).
  • Rebinding conflicts. In Controls, binding a key that another action of the same player uses swaps the two keys and says so; binding a key the other player already uses is allowed but shows a warning (KeyMap::conflicts, src/keybinds/conflict.rs; UME_SHOTS_ONLY=keys captures it).
  • Depth lanes (Final Fight style). Story fights have a floor band: two extra buttons walk the fighter toward the back or the front of the scene (P1 Z / X, P2 Num - / Num +, rebindable under Controls; the engine bits are LANE_UP / LANE_DOWN). Walking works only while grounded and in control, and each stage limits the band to its real floor (lane_far / lane_near in src/story/stages.rs). A strike connects, and bodies push each other, only when both fighters are within 14 units of depth (Match::lanes, crates/engine/src/lane.rs); the CPU thugs line up with the hero by themselves. Sprites, shadows, reflections and effects follow the lane and nearer fighters draw in front. Other modes never enable lanes.
  • Final boss and epilogues. The final boss is Valdric Morn on the Kingpin Rooftop (a player using Valdric faces Kaito Arashi). Beating him plays a five-page cutscene epilogue written for each fighter, in English, Portuguese and Spanish, before the STORY COMPLETE card. Texts live in assets/story/epilogues.json and can be replaced with a story-epilogues.json file next to the executable. Details: Story Mode.
  • Guard button. Story has a dedicated guard button (P1 C, P2 Num *, rebindable). While held, a grounded fighter with control blocks like holding back, but without walking away (hold Down with it to guard crouching). It is ignored outside Story.
  • Story HUD. Thugs get no life bar or roster tile. The hero keeps the left panel, a bottom strip shows stage, wave, score and credits, and the boss fight adds a wide Stage Villain bar (name and life) on the right.
  • Street thugs (assets/chars/npc_*.json, generated by ume-tools gen-story-npcs). Fighters with dedicated sprite packs under assets/chars/sprites/npc_*/, hidden from select ("npc": true), scaled in Story Mode to ~10 % of the protagonist's life, each with its own trait:

Their move sets retain a playable fighter as a mechanical base. Their art is PNG sprites only; replace the files under assets/chars/sprites/npc_*/ and rebuild the web packs with ume-tools pack-sprites.

NPCMove set baseStory LifeTrait
BruteBruno11 % of herostrong and hkick carry armor
RazorSuzume9 % of hero35 % faster, kicks lunge forward
SpitfireAkio10 % of herojab throws a small orb (ranged pressure)
ColossusDaichi12 % of heroSlower, armor on every basic strike
PhantomJin9 % of heroFaster, invulnerable while he kicks

Evidence capture: UME_TOUR=storymode ultimate-mugen --shots <dir> --res 1280x720 --mute plays the whole run with a CPU-driven hero and saves every intro, wave, boss and result screen.

Survival

Sobrevivência in the main menu is an endless run against the whole roster:

  • Opponents. After you pick your fighter, the game picks the opponent each round (never the hidden boss, never a broken pack). The stage rotates every round.
  • Escalation. The CPU level climbs every two fights, starting from your difficulty setting and capped at 8.
  • Life carries over. The bar you end a fight with is the bar you start the next one with, plus the recovery configured under Gameplay › Life recovered (Survival) (0 / 20 / 35 / 50 / 100 %). A KO ends the run.
  • Score. Each win banks the engine's own Score/ScoreTotal for your side plus a 1000 × round clear bonus, so the number is deterministic and comes from the simulation itself.
  • Game over. The end screen shows the score, how many fights you won and the local best; the best is persisted in ultimate-mugen.cfg (survival_best) and a new record is highlighted.
  • Replays. The last fight is archived like any other and can be watched from the game-over screen (R button) or the Replays browser; the replay keeps the starting life so the re-simulation matches exactly.

Engine score stats used: Fighter::score and Fighter::score_total, filled by HitDef.score and the ScoreAdd/TargetScoreAdd controllers and read by the Score/ScoreTotal triggers.

Two-player co-op (Arcade and Survival)

Press V on the character select screen (or click the CO-OP 2P button) to start Arcade or Survival with two human players on the same side:

  • P1 and P2 pick one fighter each; both are on the field together (2 versus 1) using the engine's simultaneous-team support, so the normal pushboxes, targeting and camera work apply.
  • The side only loses the round/run when both fighters are KO'd (team_simul KO rule).
  • Inputs are independent: P1 uses the player-1 keys/pad, P2 the player-2 ones (Tab is not needed). The HUD tags each fighter P1 / P2 by its pilot slot instead of by side.
  • Arcade keeps both fighters across the ladder and swaps the opponent each round; Survival does the same each wave.
  • Replays record both slots, so a co-op fight replays exactly.

Engine switches: Match::team_simul. Slots are added interleaved (P1, opponent, P2), so roots()[0] and roots()[2] are the human pair.

Tag team

Each side lists 2 or 3 fighters. Only the first one is in play at the start of every round; the others wait on standby.

  • Swap. Press the Tag button (F for P1, Num Enter for P2; rebindable under Controls, action "Troca (Tag)"). On gamepads and touch the awakening button (R3 / SELECT) swaps instead, because awakening is disabled in this mode. The CPU swaps by itself when its fighter is below 30 % life and the partner is clearly healthier.
  • Cooldown. After every swap the side waits tag_cooldown_max ticks (default 180, three seconds) before it can swap again. The HUD shows a bar and a TAG mark under each teammate's portrait.
  • Tag cancel window. A swap is accepted only when the active fighter has control, or during the first tag_cancel_window ticks (default 30) after one of its attacks touched the opponent (hit or block). So you can cancel the recovery of a connected move into the partner, but not in the middle of a whiff or while being hit.
  • Standby fighters. They are invisible, cannot be hit, pushed or targeted (enemy, P2, EnemyNear skip them), receive no input and keep their life. They follow the active fighter's position so they enter exactly where the swap happened, in state 0 with control.
  • KO. When the active fighter dies, the next living teammate enters automatically after 50 ticks (cooldown ignored). The round ends only when every member of a side has no life left; the round timer decides by the summed life of the whole team.
  • Life and variables of a swapped-out fighter are untouched; everybody starts the next round with full life.
  • Scripts. TeamMode returns 3 in this mode. TagOut / TagIn swap the fighters for real (see Ikemen extensions); Standby is 1 for the waiting fighters and NumPartner counts the teammates.
  • Replays record the Tag button like any other input, so a Tag fight replays exactly.

Engine switches (Match): team_tag, tag_cooldown_max, tag_cancel_window. Events: Event::Tag { side, fighter }.

Training dummy

In Training the pause menu (Game tab) has a Dummy behaviour row. Confirming it cycles the plan, which applies at once and is kept across restarts of the fight:

PlanWhat the dummy holds
StandNothing
CrouchDown
JumpUp on every landing
GuardBack, only while the rival attacks or a projectile is alive (it does not walk away)
Low guardDown, plus back while threatened
Record my inputsNothing; every input you press is recorded (up to 10 s)
Play recordingYour recorded inputs on a loop, mirrored to the dummy's facing
AI learns youCounts how you switch actions (walk, crouch, jump, attack) and answers your likeliest next one: back guard before an attack; attack when you jump, walk or crouch. Keeps learning across plan changes

The plan lives in Pilot::Dummy(DummyPlan) (src/session/dummy.rs); the dummy presses real input bits, so guard rules, pushback and chip damage are the engine's own. The recording lives in src/session/dummy_tape.rs; a right-side panel shows the best combo and the tape length (src/hud/training_panel.rs). Screenshots: UME_SHOTS_ONLY=pause writes training-dummy-*.png and pause-training-dummy.png; UME_SHOTS_ONLY=training writes training-tape-playback.png.

Power Arena

Choose Power Arena in the main menu, set up the match and pick your fighters to start against the CPU. Climb 40 floating platforms across eight tiers. Jump through them from below and land on them while descending. Fighters can recover while they are above the base. Once they fall past its edge, they tumble into the void, and the round ends when the fighter falls out. The camera follows changes in elevation and zooms out as fighters separate horizontally or vertically.

Open a match directly on the web with ?modo=arena&p1=kaito&p2=shion&luta=1.

Squad vs. swarm (1 to 5 against up to 100)

The menu entry opens a setup screen before the fighter select: your squad (1 to 5 fighters), enemies (1, 5, 10, 25, 50 or 100) and the enemy type (random fighters, or pick one fighter who is repeated). Mouse, touch, keyboard and gamepad all work on it.

  • Only a capped number of enemies is on the field at once (16 on desktop, 12 in the browser, 8 on Android/iOS). When one falls, a fresh one enters after a short delay at a random spot of the stage (floor or platform) away from your squad, until the chosen total is spent. The round ends when the last enemy is down or your whole squad is.

  • Random enemies come from at most 8 distinct fighters (6 in the browser, 3 on mobile) that share their sprites, so the sprite atlas and memory stay flat no matter how many enemies you choose.

  • The map grows with the crowd: it is built from an odd number of tiles of the original 1,108 px arena (1, 3, 5 or 7), with the platform layout repeated. Ring-out edges follow the wider map.

  • The camera follows your squad only, so far-away enemies do not stretch the zoom. Fighters outside the view are not drawn.

  • A minimap appears under the top HUD whenever the map is wider than the view: green and cyan dots are your squad, red dots the enemies, and the yellow frame is the camera. The HUD shows enemies left over the chosen total.

  • Power elixir: a glowing flask floats on the highest platform (marked in gold on the minimap). Whoever reaches it first, your fighter or any enemy, doubles their maximum life and refills it completely. It exists once per round and is given back when the next round starts. Code: crates/engine/src/matchs/elixir.rs, drawing in src/power_arena_elixir.rs.

Code: simulation in crates/engine/src/matchs/swarm.rs (Match::enable_swarm, swarm_step), setup screen in src/app/arena_setup.rs and arena_pick.rs, minimap and tiled platforms in src/power_arena.rs. Evidence capture: UME_SHOTS_ONLY=arena ultimate-mugen --shots <dir> --res 1280x720 --mute also prints step and draw times, atlas fill and upload size (UME_ARENA_SLOTS, UME_ARENA_POOL and UME_ARENA_TOTAL override the profile).

In-Fight Easter Eggs

Ultimate MUGEN includes a presentation-only in-fight Easter Egg system (src/easter.rs and src/easter/) that reacts to classic fighting-game moments, stage phenomena, and fighter lore without touching the deterministic simulation (crates/engine).

Architecture

  • Deterministic safe: reads &Match state on the presentation thread (src/app/fight_screen.rs), never mutates simulation state, and keeps rollback/replay checksums unchanged.
  • Localized: every banner, speech bubble, and cameo caption ships in English, Portuguese, and Spanish via crate::i18n::tr3.
  • Pixel-art animated sprites: compact multi-frame RGBA sprite sheets in assets/easter/ rendered with FilterMode::Nearest.
  • Non-intrusive pacing: per-round and per-match bitset tracking, global cooldowns, and a 3-item on-screen cap keep fights readable.

Combat & Arcade Easter Eggs (20)

  1. TOASTY! — Corner pop-in referee cameo on heavy airborne launches (damage >= 115).
  2. DOUBLE K.O. DRAMA! — Both fighters knocked out simultaneously.
  3. MAGIC PIXEL! — Winning a round or landing a Super below 5–6% life.
  4. UNTOUCHABLE! — Flawless 100% life round victory with golden crown badge.
  5. CLASH OF FATES! — Simultaneous mutual hit trade within 3 ticks.
  6. TAUNT TO GET BODIED! — Getting hit within 90 ticks of taunting.
  7. HONORABLE DUEL! — Both fighters taunt within 120 ticks of each other.
  8. SYNC JUMP! — Both fighters jump on the exact same frames twice in a round.
  9. TACTICAL DANCE PARTY! — Rapid crouch-spam 4+ times at long range.
  10. SPEEDRUN K.O.! — Winning a round in under 10 seconds.
  11. BUZZER BEATER! — Round decided with 3 or fewer seconds remaining.
  12. GRAVITY OFF! — Landing a 5+ hit air juggle combo.
  13. IRON FORTRESS! — Blocking 6+ hits cleanly in a single sequence.
  14. GUARD SHATTERED! — Guard break (state_no == 5300).
  15. DOUBLE SUPER CLASH! — Both sides fire a Super within 90 ticks.
  16. LIMIT BREAK DUEL! — Both fighters awaken/transform in the same match.
  17. STOP, HE'S ALREADY DOWN! — 15+ hit overkill combo with referee pop-in.
  18. GREAT CORNER ESCAPE! — Reversing out of a prolonged corner trap with a heavy hit.
  19. HIGH NOON STAREDOWN... — Both fighters stand idle facing each other for 3 seconds, rolling a pixel-art tumbleweed across the floor.
  20. INSERT COIN — MAX METER! — Reaching full super meter drops a spinning 1UP arcade coin flyby.

Stage-Specific Environmental & Cameo Easter Eggs (20)

  1. Dojo — Master's Paper Crane: An animated origami crane drifts across the sunset roof.
  2. Dojo — Rooftop Tremor: Heavy impacts shake the ancient dojo roof tiles.
  3. Neo-Metrópole 2099 — Cyber UFO Sighting: A blinking neon flying saucer zips across the skyline.
  4. Neo-Metrópole 2099 — System Overload // 2099: Firing a Super triggers a neon grid surge banner.
  5. Moonlit Bamboo — Moonlit Bamboo Spirits: Spirit masks drift through the grove during combos.
  6. Rocky Plains — El Viento Salado: Marlow's flying galleon crosses the distant clouds.
  7. Spirit Gate — Kitsune Apparition: A glowing kitsune mask floats above the torii gate on Supers or Awakenings.
  8. Volcanic Crater — Magma Geyser Spike: Heavy hits trigger a seismic caldera roar.
  9. Praça do Interior (Brazil) — Chill Capybara Cameo: A pixel-art capybara with a tangerine on its head waddles across the plaza.
  10. Praça do Interior (Brazil) — Caramelo Dog on Patrol: Plaza guardian cameo on Round 2+.
  11. Christ the Redeemer (Corcovado) — Corcovado Toucan Flyby: A vibrant pixel-art toucan glides across the Rio sky.
  12. Great Wall of China — Sky Dragon Kite: A paper kite dances along the mountain ridge.
  13. Petra (Al-Khazneh) — Rose Canyon Scarab: A golden scarab shimmers over the canyon on heavy impacts.
  14. Texas — High Noon in Texas: A desert tumbleweed rolls down Main Street at high noon.
  15. Chichén Itzá — Feathered Serpent Shadow: Kukulcán's emerald glow ripples across the temple on Supers.
  16. Colosseum of Rome — Ave Gladiator!: The Emperor rewards 6+ hit combos with a golden laurel badge.
  17. Taj Mahal — White Doves of Agra: Doves take flight over the marble palace on Round 2+.
  18. Pyramids of Giza — Pharaoh's Eye Glint: Reaching full meter awakens the golden scarab of Giza.
  19. Hanging Gardens of Babylon — Hanging Gardens Peacock: Emerald-gold plumage glides overhead on air combos.
  20. Ancient Wonders Blessing (Statue of Zeus, Lighthouse of Alexandria, Temple of Artemis, Colossus of Rhodes, Mausoleum of Halicarnassus): Unique mythic phenomenon per classical wonder.

Lore Matchup, Mirror & Fighter Easter Eggs (20)

  1. Mirror Match Banter: Any fighter facing themselves triggers an "impostor" speech bubble.
  2. Suzume vs Oboro: Kagerou clan vengeance banner with crimson eclipse emblem.
  3. Sylene vs Garan: Borealia's Arctic ice vs Underworld ashen flames.
  4. Kaito vs Oboro: Storm of Izu vs the Scarlet Eclipse.
  5. Bruno on Brazil / Corcovado: Home crowd cheers on the three-time Minas Gerais champion.
  6. Volta on Neo-Metrópole 2099: Free-will firmware speech bubble back at its birthplace.
  7. Akio Fired Up (<30% HP): Starfall Dojo optimism kicks in with a steaming ramen badge.
  8. Haruki's Apology: Gentle archivist apologizes mid-fight after landing a 5+ hit combo.
  9. Marlow vs Valdric: Sky pirate playfully eyes the Red Star Empire's crown.
  10. Kaito vs Jin: Wind-runner rivalry between Izu Cliffs and the Blue Mountains.
  11. Shion vs Kaname: Meteorite blade meets the Alpine spirit katana (crossed_blades).
  12. Lian on Great Wall: Jade Lantern grandmaster defending the Great Wall.
  13. Bruno vs Daichi: Heavyweight grappler showdown — Iron Ring vs Altai Wolf.
  14. Garan on Volcanic Crater: The Ashen Gate opens where 99 monks sealed him.
  15. Valdric vs Oboro: Two crowns, one throne — Red Star Empire vs Scarlet Eclipse.
  16. Suzume vs Jin: High-speed ninja vs courier duel.
  17. Volta vs Haruki: Android asks the gentle archivist what makes a heart courageous.
  18. Akio vs Kaito: Classic shonen rivalry — "Loser buys ramen!"
  19. Marlow's Pirate Parrot: El Viento Salado's first mate swoops across the screen on Supers or 6+ hit combos.
  20. Story Thug Bravado (npc_*): Gang members complain about their paycheck when caught in a 4+ hit combo.

Custom Synthesized Sound Effects (src/audio/easter_sfx.rs)

All 60 Easter Eggs trigger one of 12 bespoke 32 kHz synthesized arcade SFX cues preloaded alongside the built-in sound bank (desktop, web/WASM, Android, iOS):

  • easter_toasty — Rising retro arcade vocal/brass stinger with slapback echo (TOASTY!, Taunt to Get Bodied, Overkill, Buzzer Beater).
  • easter_coin — Classic 2-note golden arcade coin / 1UP chime (Max Meter, Sync Jump, Air Juggle, Speedrun K.O.).
  • easter_crown — Shimmering major-7th victory arpeggio fanfare (Flawless Perfect, Magic Pixel, Double K.O., Limit Break Duel, Colosseum).
  • easter_clash — Dual detuned metallic blade/energy clash (Clash of Fates, Guard Fortress, Double Super Clash, Shion vs Kaname, Suzume vs Oboro).
  • easter_tumbleweed — Spaghetti-western desert whistle with airy wind sweep (High Noon Staredown, Texas).
  • easter_ufo — Sci-fi theremin LFO saucer wobble (Neo-Metrópole UFO, System Overload // 2099, Volta).
  • easter_kitsune — Mystical shrine bell partials & wooden clack (Spirit Gate Kitsune, Dojo Crane, Bamboo Spirits, Great Wall, Lian).
  • easter_capybara — Warm tropical marimba/kalimba bounce (Brazil Capybara, Caramelo, Bruno Home Crowd, Dance Party).
  • easter_bird — Upward tropical bird chirp & wing trill (Corcovado Toucan, Taj Mahal Doves, Hanging Gardens Peacock, Kaito vs Jin).
  • easter_parrot — Expressive pirate parrot double-squawk (Marlow's Parrot, El Viento Salado).
  • easter_wonder — Ancient mythic pentatonic harp & deep bronze gong (Pyramids, Petra, Chichén Itzá, Volcano, Classical Wonders, Garan).
  • easter_banter — Snappy comic speech-bubble pop & chime (Mirror Match, Haruki Apology, Marlow vs Valdric, Akio vs Kaito, Thug Complaint).

TOML Customization (assets/interactions.toml)

Taunts, fighter rivalries, home-turf stage reactions, and in-fight character triggers are all data-driven in assets/interactions.toml. Players and creators can place an interactions.toml file in their user storage directory to override taunt pools or append custom interactions for both native UMF fighters and imported M.U.G.E.N characters without recompiling:

[[matchup]]
id = "custom_rivalry"
fighters = ["ryu", "ken"]
speaker_id = "ken"
speaker = "KEN"
style = "speech"
sfx = "easter_banter"
color = [1.0, 0.45, 0.2]
title_pt = "Vamos nessa, Ryu! Sem segurar!"
title_en = "Come on, Ryu! Don't hold back!"
title_es = "¡Vamos, Ryu! ¡Sin contenerse!"

Supported sections:

  • [taunts]: opening_pt/en/es and answer_pt/en/es round-start taunt pools.
  • [[matchup]]: fighters = [a, b] or mirror = true, style, sprite, sfx, color, localized title_* and sub_*.
  • [[stage_interaction]]: fighter + stage_contains = [...].
  • [[fighter_trigger]]: fighter or fighter_prefix, trigger ("low_hp", "combo", "opp_combo", "super", "super_or_combo", "taunt"), threshold, per_round.

Two-Part Rival Exchanges ([[exchange]]) & Full-Roster Taunts

assets/interactions.toml also supports back-and-forth two-part [[exchange]] dialogues (Fighter A speaks, and Fighter B automatically replies delay_ticks later), plus first_attack, transform, and round_win triggers, and dedicated taunt lines for all 16 playable fighters.

Bleach-Inspired References (assets/interactions.toml)

Ties directly into the three Bleach-inspired native fighters (Bleach-Inspired Kits) plus Oboro and imported M.U.G.E.N Bleach fighters, with 3 dedicated pixel-art sprites (sakura_petals.png, hollow_mask.png, reiatsu_badge.png) and 2 bespoke synthesized SFX (easter_bankai, easter_shunpo):

  • Kaname (Byakuya-style): Scatter! Thousand Petals! (super), Final Release — Bankai! (transform), Spirit Gate resonance, and Flash Step exchange vs Suzume.
  • Shion (Zaraki-style): "I'll use both hands now!" (low_hp <= 45%), Reiatsu Overflow! (super), and Reiatsu vs Illusion exchange vs Oboro.
  • Suzume (Yoruichi-style): Flash Step / Shunpo! (first_attack) and Shunko — Flash Lightning! (transform).
  • Oboro (Aizen-style): All According to Plan — Since when were you not under my illusion? (super).
  • Imported M.U.G.E.N Bleach chars: automatic ichigo* (Bankai — Getsuga Tensho!) and aizen* (Shatter, Kyoka Suigetsu!) reactions.

Netplay and Replays

English · Português (BR)

🇧🇷 O netplay usa rollback (GGRS): cada jogador roda a luta localmente, prevê o controle do adversário e corrige quando o controle real chega. Replays guardam só os controles de cada frame.

Playing online (desktop)

Both players use the same build and the same characters and stage files. Each one opens UDP port 7000 (player 1) or 7001 (player 2), or the port given with --port.

ultimate-mugen --netplay 1 --peer <friend-ip>:7001 --chars kfm,kfm --stage dojo
ultimate-mugen --netplay 2 --peer <friend-ip>:7000 --chars kfm,kfm --stage dojo
FlagMeaning
`--netplay 12`
--peer ip:portthe other player's address
--port nlocal UDP port (default 7000 / 7001)
--chars a,bcharacter ids or names for P1 and P2 (same on both sides)
--stage idstage id or name
--delay ninput delay in frames (default 2)

The bottom of the screen shows the connection state and ping. Pause is disabled online. Browser and mobile netplay arrive with the WebRTC transport after the wgpu/winit migration.

How rollback works here

  • The whole fight state is Match. Saving a frame is match.clone(); character data (CharDef) is shared through Arc, so a snapshot only copies the moving parts.
  • ume_netplay::Rollback answers the GGRS requests: save, load and advance. Only the newest frame returns presentation events (sounds, hit sparks), so rolled-back frames never replay a sound twice.
  • ume_netplay::checksum hashes positions, states, life, power, variables, explods and projectiles. GGRS compares it between peers to detect desyncs.
  • Inputs are one u32 per player per frame (the same bits as local play).

Spectators and netplay data in replays

A third connection type observes without contributing input:

ultimate-mugen --spectate --peer <host-ip>:7000 [--port 7002] [--chars a,b --stage id]

It builds a GGRS SpectatorSession (PlayerType::Spectator), renders the confirmed inputs from the host and never sends local input; the overlay shows SPECTATOR · ping · frames behind.

Replays recorded online store the session configuration (netplay: side, peer, port, delay, rollback window, player count, spectator flag) next to the inputs, so a desync can be reproduced with the same settings. When GGRS reports a desync, the game writes replays/desync-<unix>.json with that config, the frame, Match::checksum() and the last 120 input frames. A desync report is a diagnostic, not a replay: the Replays menu never lists it (neither as a fight nor as an unreadable file), so it does not look like a corrupted replay after a desync.

Rules for deterministic content

  • Never read real time (Instant, now) or random numbers from the operating system (rand::random, rand::thread_rng) during a tick; use the match's seeded PRNG.
  • Floating-point calculations must run in deterministic mode (all target platforms use IEEE 754 with standard rounding).
  • All collections whose iteration affects the simulation must have deterministic ordering (use Vec or sorted keys, never direct iteration over a raw HashSet/HashMap).

Binary format (ume_netplay::Replay)

A raw stream of recorded inputs:

FieldType
magicUMRP
versionu32 (1)
playersu32
metadata count, then key/value stringsu32 length + UTF-8
frame countu32
runsu32 repeat count + one u32 input per player

Equal consecutive frames are stored once, so held buttons cost almost nothing.

The reader rejects incomplete or overlong frame runs, trailing bytes, files larger than 129 MiB, decoded input streams larger than 64 MiB and more than 16,384 metadata entries. The writer returns an error when player counts, frame data or metadata exceed these limits. The encoded size allows a worst-case run per frame while decoded frames remain capped at 64 MiB.

#![allow(unused)]
fn main() {
let mut rec = Replay::new(2);
rec.meta.push(("p1".into(), "kfm".into()));
rec.push(&[p1_bits, p2_bits]);
std::fs::write("fight.umr", rec.to_bytes().expect("valid replay size"))?;
}

Saved replays in the game (replays/)

Every finished fight is archived automatically to replays/ beside the executable as a small JSON file (<label>-<unix-time>.umr.json). The menu entry Replays lists them newest first.

FieldMeaning
format / versionultimate-mugen-replay / 1; a different version is refused with a clear message
label, saved_atname shown in the browser and the Unix timestamp (sorted by it)
modeArcade, Cpu, Versus, Training, Watch, TeamSeq, TeamSimul, TeamTag
chars, stage, palettesfighter ids, stage id and the palette of each side
seedinitial RNG seed of the match (replays restore it before the first tick)
teams, simul, tagteam line-ups by fighter id (team modes)
rulesrounds, round time, life %, single round, pushbox, shared team life, game speed
inputsrun-length encoded input stream: slots, then count + one input per slot per run

Replay decoding bounds files to 16 MiB, 500,000 runs and 2,000,000 total frames to keep malformed or corrupt streams from allocating unbounded memory. Desync reports (desync-*.json) in replays/ are preserved without being listed as corrupt replays.

Replaying feeds the recorded inputs through Pilot::Replay; the simulation is deterministic, so the fight is rebuilt exactly. A round-trip test records 1200 ticks, reloads the file and compares the final state checksum (cargo test -p ume-engine --test it replay_roundtrip::).

Browser keys:

KeyAction
↑ / ↓, Enterpick and play
Rrename (Enter confirms, Esc cancels)
Delete (twice)delete the selected file
Stoggle sorting between date and name
Escback to the menu

Playback keys:

KeyAction
Space / Startpause and resume
1 / 2 / 4playback speed 1x, 2x, 4x
. or → while pausedadvance one frame
Escleave the replay and return to the browser

The folder keeps the newest 64 files; older ones are pruned when a new replay is saved. Files that cannot be read (for example, recorded by another build) are listed with the reason instead of failing silently.

Universe and Lore — The Great Convergence

The world of Ultimate MUGEN is set in an era known as The Great Convergence (A Grande Convergência), where time, geography, and dimensions have collided following the cataclysmic awakening of the Scarlet Eclipse (Eclipse Escarlate).


The Genesis: The Astral Loom and The Severing

For millennia, human history unfolded along distinct cultural and martial currents. Warriors from secluded Japanese mountain shrines, Chinese Taoist sanctuaries, Nordic glacial fortresses, futuristic cyberpunk megacities, Mongolian plateaus, and dusty Latin American towns trained in isolation, oblivious to the existence of parallel realms.

Beneath the physical world hummed the Astral Loom (A Trama Astral) — a metaphysical network of cosmic leylines that regulated the flow of life force, ancestral spirits, and elemental energies.

This delicate equilibrium shattered when Mikazuki Oboro, an immortal sorcerer and master of illusions from an ancient forgotten dynasty, cast the forbidden ritual of the Scarlet Eclipse. By harnessing black flames and celestial alignment, Oboro fractured the dimensional membrane, pulling disparate epochs, technology levels, and landscapes into a singular, unstable battleground known as The Convergence Domain.

flowchart TD
    subgraph AstralSource ["The Primordial Astral Loom"]
        Ki["Ki / Wind Arts"]
        Glacial["Glacial Ice Essence"]
        Stellar["Stellar & Plasma Ki"]
        Cyber["Neon Grid & Cyber-Drive"]
        Shadow["Shadow & Cursed Arts"]
        Tao["Taoist Chi & Balance"]
    end

    AstralSource --> Eclipse["The Scarlet Eclipse (Mikazuki Oboro)"]

    subgraph Factions ["Factions of the Convergence"]
        Heroes["The Convergence Protectors<br/>(Kaito, Daichi, Akio, Lian, Bruno, Jin, Haruki)"]
        Rogues["The Solitary Exiles & Neutral Rogues<br/>(Shion, Suzume, Volta, Marlow, Sylene, Kaname)"]
        Villains["The Harbingers of Eclipse & Conquest<br/>(Mikazuki Oboro, Garan the Ashen Oni, Valdric Morn)"]
    end

    Eclipse --> Factions
    Factions --> Climax["The Apex Confrontation: The Volcanic Caldera & Spirit Gate"]

Energy Systems & Martial Disciplines

Warriors in Ultimate MUGEN channel their fighting spirits through distinct energy sources:

  1. Primordial Wind (Arashi-Ki): Channelled by Kaito Arashi and Jin Kazaguruma. It draws power from atmospheric currents, typhoons, and aerial pressure, enabling high-speed gap-closers, vacuum strikes, and cutting gale projectiles.
  2. Stellar Plasma (Hoshi-No-Hikari): Mastered by Akio Hoshi. Taps into cosmic radiation and fallen meteorites, manifested as incandescent bursts, supernova impacts, and blazing plasma fist strikes.
  3. Lupine Earth & Primal Ki (Ginrou-Ki): Harnessed by Daichi Ginrou. Drawn directly from wild predatory instincts and mountain earth leylines, converting battle thirst into a radiant golden aura.
  4. Absolute Zero & Spirit Frost (Hyōketsu): Wielded by Sylene Vashti and Kaname Fuyutsuki. Freezes moisture in the air into crystalline blades, glacial barriers, and piercing soul-severing slashes.
  5. Taoist Chi & Wind-Silk (Yu-Chi): Practiced by Lian Feng. Focuses on deflection, gravitational redistribution, and fluid roundhouse kicks that ripple through kinetic space.
  6. Kinetic Iron Supremacy (Punho de Ferro): Refined by Bruno "Bulldozer" Volk. Pure human musculoskeletal conditioning, heavy-weight kinetic momentum, and unbreakable close-quarters boxing devastating enough to shatter mystic auras.
  7. Cyber-Drive & Overcharge (Grade Neon): The energy framework of VX-9 Volta. High-frequency dielectric capacitors, super-conducting servos, and digital particle beams running on artificial consciousness.
  8. Ashen Hellfire (Oni-No-Hai): Erupted from Garan the Ashen Oni. Cold violet flames forged in subterranean demon gates that consume spiritual fortitude rather than burning flesh.
  9. Tempest Aether (Aether dos Mares): Harnessed by Captain Marlow Reyes. Sky-sailor energy infused with storm lightning and tide currents, channeled through an enchanted cutlass.
  10. Imperial Scarlet Core (Estrela Rubra): Engineered by Valdric Morn. High-yield dark matter cannons built into heavy power armor, capable of orbital-scale shockwave blasts.
  11. Sealed Twilight Titans (Crepúsculo Selado): Locked inside Haruki Sumi. Forbidden eldritch power contained by paper talismans; if cracked by mortal peril, it unleashes cataclysmic calamity.
  12. Lunar Requiem (Kurogane Tsuki): Channelled by Shion Kurogane. Gravitational tides of the Pale Moon condensed into an impossibly heavy broadsword.
  13. Shadow Lotus Mirage (Kagerou-Ryu): Inherited by Suzume Kagerou. Phantom displacement, sensory blind-spot manipulation, and silent assassination daggers.
  14. The Scarlet Veil: The supreme illusion eye of Mikazuki Oboro. Bends optical perception, summons murder-crows, and rewrites the physical consequences of combat inside the victim's subconscious.

The Three Factions: Heroes, Neutrals, and Villains

The warriors of the Convergence are divided into three distinct philosophical camps:

1. The Convergence Protectors (Heroes)

Dedicated to mending the Astral Loom, closing the dimensional fissures, and protecting innocent mortals from annihilation:

  • Kaito Arashi (Japan): Wandering righteous karateka seeking balance through the storm.
  • Daichi Ginrou (Mongolia): Free-spirited mountain warrior whose golden spirit protects the vulnerable.
  • Akio Hoshi (Mexico): Impetuous star-striker whose fiery heart never backs down from tyranny.
  • Lian Feng (China): Jade Lantern Grandmaster maintaining the ancient cosmic harmony.
  • Bruno "Bulldozer" Volk (Brazil): Heavyweight people's champion defending his hometown with thunderous fists.
  • Jin Kazaguruma (Jamaica): Swift messenger of freedom fighting to preserve peace in the hidden valleys.
  • Haruki Sumi (South Korea): Gentle archivist and scholar enduring the burden of sealed apocalyptic titans.

2. The Solitary Exiles & Free Rogues (Anti-Heroes / Neutrals)

Warriors driven by personal codes, vendettas, sovereign restoration, or existential self-discovery:

  • Shion Kurogane (Egypt): Tragic swordsman bearing the crushing guilt of an exiled moon clan.
  • Suzume Kagerou (Vietnam): Vengeful shadow kunoichi hunting the masterminds who massacred her people.
  • VX-9 Volta (USA / Neo-Metropolis): Escaped military android seeking the philosophical meaning of the soul.
  • Captain Marlow Reyes (Spain / Caribbean Sky): Swashbuckling sky pirate raiding tyrants and seeking mythic loot.
  • Sylene Vashti (Norway / Borealia): Displaced glacial princess determined to reclaim her usurped frozen kingdom.
  • Kaname Fuyutsuki (Switzerland): Impartial frost samurai judge executing divine severance without emotional hesitation.

3. The Harbingers of Eclipse & Tyranny (Villains)

Entities seeking universal subjugation, demonic awakening, or reality erasure:

  • Mikazuki Oboro (Eclipse Dimension — Final Boss): Master illusionist aiming to dissolve all reality into an eternal dream of black fire.
  • Garan the Ashen Oni (Subterranean Abysm): Primordial demon unleashed to burn civilization into cold ash.
  • Valdric Morn (Germanic Red Star Empire): Megalomaniacal prince using cybernetic plasma armaments to conquer and subjugate "inferior plebeians".

The Grand Tournament: The Apex of Convergence

To sustain the dimensional tears and feast upon the combat energy of the world's greatest souls, Mikazuki Oboro manifested the Apex Crucible — a series of battlegrounds spanning ancient temples, futuristic sky-rises, primeval bamboo groves, rocky plateaus, spirit shrines, volcanic calderas, and peaceful village squares.

Fighters find themselves drawn together by cosmic gravity. Each battle fuels the convergence or brings the fighters one step closer to dismantling Oboro's grand illusion before reality permanently fades into the Scarlet Eclipse.

Ultimate MUGEN — Character Dossiers & Roster Guide

This document presents the complete biographical dossiers, martial backgrounds, alignments, home stages, and cross-character interaction dynamics for all 16 native fighters in Ultimate MUGEN.


Roster Overview

IDNameCountryAlignmentRole / ArchetypeHome StageAwakened Form
kaitoKaito ArashiJapanHeroWandering Storm KaratekaSunset Dojo Roof (dojo)Eye of the Storm
shionShion KuroganeEgyptAnti-HeroExiled Pale Moon GreatswordsmanMoonlit Bamboo Grove (bamboo)Full Moon
akioAkio HoshiMexicoHeroHot-Blooded Starfall StrikerSunset Dojo Roof (dojo)Starlight
suzumeSuzume KagerouVietnamAnti-HeroShadow Kunoichi of the Crimson LotusMoonlit Bamboo Grove (bamboo)Dark Lotus
brunoBruno "Bulldozer" VolkBrazilHeroUndefeated Heavyweight BrawlerHinterland Plaza — Brazil (brazil)Ring Fury
syleneSylene VashtiNorwayNeutralExiled Glacial Crown SovereignRocky Plateau (plains)Winter Queen
voltaVX-9 VoltaUnited StatesHeroSentient Cybernetic AndroidNeo-Metropolis 2099 (neon)Overcharge
lianLian FengChinaHeroJade Lantern Kick GrandmasterMoonlit Bamboo Grove (bamboo)Jade Dragon
garanGaran the Ashen OniNetherworldVillainAncient Demonic CalamityVolcanic Crater (volcano)Awakened Oni
marlowCaptain Marlow ReyesSpainAnti-HeroSwashbuckling Sky Galleon BuccaneerRocky Plateau (plains)Captain Tempest
kanameKaname FuyutsukiSwitzerlandNeutral / LawfulEverwinter Frost Samurai JudgeGate of Spirits (spirit)Spiritual Blade
jinJin KazagurumaJamaicaHeroSwift Gale Shinobi AcrobatMoonlit Bamboo Grove (bamboo)Typhoon
daichiDaichi GinrouMongoliaHeroCelestial Peak Golden Ki WolfRocky Plateau (plains)Lupine Instinct
valdricValdric MornGermanyVillainTechnocratic Imperial Warlord PrinceNeo-Metropolis 2099 (neon)Scarlet Dominance
harukiHaruki SumiSouth KoreaHeroReluctant Archivist / Sealed CalamityGate of Spirits (spirit)Contained Fury
oboroMikazuki OboroEclipse RealmSupreme Villain (Boss)Eldritch Illusionist SovereignGate of Spirits / Volcano (spirit/volcano)Awakened Veil

Character Dossiers

1. Kaito Arashi (嵐 海斗)

Visual IdentityCombat Profile
Kaito Portrait
Avatar Portrait
Series: Chronicles of the Storm Road (Crônicas da Estrada da Tempestade)
ID: kaito | Author: Ultimate MUGEN
Origin: Storm Road, Izu, Japan 🇯🇵
Alignment: Hero / Vanguard of Balance
Theme Color: #2f8f9d (Teal / Sea-green)
Awakened Form: Eye of the Storm (Olho da Tempestade)
Home Stage: Sunset Dojo Roof (dojo)
Fighting Style: Arashi-ryu Karate (Wind & Gale Striking)

Kaito Battle Sprite Standard In-Game Combat Stance

Biography & Background

Kaito Arashi is a wandering martial artist who journeys wherever the trade winds blow. Clad in a sea-green kimono that has witnessed hundreds of grueling matches across Asia, Kaito considers fighting not a sport of vanity, but a profound form of spiritual communication. Raised on the cliffs of Izu and trained by an ascetic master on the Izu Peninsula, he learned to synchronize his breathing with coastal typhoons, generating sonic shockwaves and gale-force momentum through disciplined fist thrusts.

When the Scarlet Eclipse fractured reality, Kaito was among the first to witness the sky bleeding crimson. Sensing the spiritual disharmony tearing the world apart, he took up his walking staff and descended from the mountains, determined to confront Mikazuki Oboro and safeguard the mortal realm.

Iconic Quotes

  • Intro: "I feel the tempest approaching. On guard."
  • Taunt: "Your guard has an opening. Take advantage while you can."
  • Win Quote: "The wind brought me here. Your careless guard only brought you to the floor."

Signature Moves

  • Gale Fist (Reppūken): Throws a spinning orb of condensed wind pressure along the floor.
  • Rising Tempest (Shoryū-Arashi): An airborne spiraling dragon uppercut enveloped in gale vortices.
  • Kangaroo Kick (~D, DB, B, a+b): Kaito crouches, hops forward and drives a front kick into the opponent, launching them on hit.
  • Thunderstep Kick (Tatsumaki-Kyaku): A horizontal multi-hit vacuum spin kick that breaks opponent momentum.
  • Super — Typhoon Barrage: A nine-hit chain combination culminating in a skyward tornado launch.

Key Character Dynamics

  • vs. Mikazuki Oboro: Moral and metaphysical clash. Kaito rejects Oboro’s nihilistic illusion, seeking to blow away the black flames with pure gale energy.
  • vs. Jin Kazaguruma: Fraternal mentorship. Kaito respects Jin’s raw aerial agility but frequently reminds the young ninja that wind without solid footwork is easily grounded.
  • vs. Daichi Ginrou: Legendary martial rivalry. Kaito’s serene aerodynamic precision matches Daichi’s fiery golden wolf ferocity in an endless series of respectful duels.
  • vs. Bruno Volk: East meets West striking duel. Kaito admires Bruno's indomitable human fortitude and honest punching discipline.

2. Shion Kurogane (黒鉄 紫苑)

Visual IdentityCombat Profile
Shion Portrait
Avatar Portrait
Series: Requiem of the Pale Moon (Réquiem da Lua Pálida)
ID: shion | Author: Ultimate MUGEN
Origin: Black Moon Valley, Egypt 🇪🇬
Alignment: Anti-Hero / Melancholic Guardian
Theme Color: #4a3b68 (Deep Lunar Indigo)
Awakened Form: Full Moon (Lua Cheia)
Home Stage: Moonlit Bamboo Grove (bamboo)
Fighting Style: Kurogane Lunar Greatsword Severance

Shion Battle Sprite Standard In-Game Combat Stance

Biography & Background

Shion Kurogane is a brooding exile wrapped in a midnight-black cloak. He wields an ancient greatsword forged from fallen lunar meteorite iron — a blade so unimaginably dense that ordinary warriors cannot lift it even an inch off the ground. Shion was once the supreme champion of the Kurogane Clan, but was banished after refusing to slaughter innocent pilgrims in a ritual designed to feed the blood moon.

Haunted by the ghosts of his fallen kin, Shion wanders between the bamboo forests and misty ravines under perpetual moonlight. He hunts the demonic aberrations released by the Eclipse, viewing every swing of his colossal blade as a penance for past failures.

Iconic Quotes

  • Intro: "The pale moon observes. Make this night worth remembering."
  • Taunt: "No rush. The night is long."
  • Win Quote: "The moon takes its time. My blade does the same."

Signature Moves

  • Crescent Cleave (Gettan-Zan): Heavy downward arc that ruptures the terrain with lunar gravity.
  • Pale Eclipse Barrier: Sweeps the broadsword into a deflecting guard that absorbs heavy physical projectiles.
  • Lunar Wake (Tsukikage): Slams the blade hilt into the ground, emitting a sweeping gravity ring.
  • Super — Requiem of the Crescent Horizon: Unleashes a panoramic midnight slash that shears through space.

Key Character Dynamics

  • vs. Kaname Fuyutsuki: Dueling philosophies of the blade. Kaname fights for solemn divine duty, while Shion fights from personal grief and atonement.
  • vs. Suzume Kagerou: Shared bond of clan survivors. Suzume respects Shion's silence, recognizing in him the same quiet hatred for the forces of Oboro.
  • vs. Garan the Ashen Oni: Nemesis match. Garan revels in suffering, while Shion’s lunar blade seeks to extinguish demonic violet fire permanently.

3. Akio Hoshi (星 秋男)

Visual IdentityCombat Profile
Akio Portrait
Avatar Portrait
Series: Starfall Dojo (Dojo da Queda Estelar)
ID: akio | Author: Ultimate MUGEN
Origin: Starfall Dojo, Mérida / Chicxulub Crater, Mexico 🇲🇽
Alignment: Hero / Fiery Striker
Theme Color: #e63946 (Starlight Crimson)
Awakened Form: Starlight (Luz Estelar)
Home Stage: Sunset Dojo Roof (dojo)
Fighting Style: Hoshi-ryu Starlight Striking & Plasma Ki

Akio Battle Sprite Standard In-Game Combat Stance

Biography & Background

Akio Hoshi is a passionate prodigy whose spiky crimson hair flares upward like a solar flare whenever his internal stellar radiance overflows. Raised inside the ancient Starfall Dojo built alongside an ancient celestial crater, Akio was trained to absorb cosmic photons and store solar kinetic energy inside his muscle fibers.

Brash, loud, and bursting with optimism, Akio treats every tournament match as the ultimate challenge. He refuses to acknowledge unwinnable situations; when backed into a corner, he simply pushes his stellar engine into maximum ignition.

Iconic Quotes

  • Intro: "Finally, a rival worth my time! Let's have some real fun!"
  • Taunt: "Come on! Show me what you've actually got!"
  • Win Quote: "That was just the warm-up! Stand back up and show your real power!"

Signature Moves

  • Meteor Jab: Rapid-fire plasma punch flurry that ends in an incendiary burst.
  • Nova Dive: Leaps skyward and plummets with a radiant heel drop that scorches the floor.
  • Cosmic Flash: Emits a blinding burst of starlight to disorient opponents mid-combo.
  • Super — Supernova Cataclysm: Charges both fists with solar plasma, delivering a dual-fist blast that lights up the entire stage.

Key Character Dynamics

  • vs. Daichi Ginrou: Friendly eternal rivals. The two are constantly competing over who can punch through thicker boulders and eat more after training.
  • vs. Valdric Morn: Pure ideological disgust. Akio despises Valdric's reliance on cold imperial machinery and arrogant disdain for honest martial sweat.
  • vs. Kaito Arashi: Reverence and ambition. Akio views Kaito as the high-water mark of traditional martial arts and constantly asks for rematches.

4. Suzume Kagerou (陽炎 雀)

Visual IdentityCombat Profile
Suzume Portrait
Avatar Portrait
Series: Shinobi of the Crimson Lotus (Shinobi do Lótus Carmesim)
ID: suzume | Author: Ultimate MUGEN
Origin: Fallen Kagerou Village, Huế, Vietnam 🇻🇳
Alignment: Anti-Hero / Lone Avenger
Theme Color: #9b2226 (Crimson Lotus & Shadow Black)
Awakened Form: Dark Lotus (Lótus Sombrio)
Home Stage: Moonlit Bamboo Grove (bamboo)
Fighting Style: Kagerou Shadow Assassination & Kunai Arts

Suzume Battle Sprite Standard In-Game Combat Stance

Biography & Background

Soft-spoken, calculating, and lethal, Suzume is the sole survivor of the Kagerou ninja clan, which was annihilated in a single night by Oboro's shadow puppets. She attacks in the blind spot between two heartbeats, leaving only a drifting crimson lotus petal in her wake.

Suzume does not fight for trophies or glory. Her heart is cold iron, completely devoted to discovering Oboro's physical tether in the mortal world and ending his reign of terror. Although aloof and distrustful of strangers, she quietly coordinates with Kaito and Jin when their paths intersect.

Iconic Quotes

  • Intro: "Don't look for me. I'm already standing behind you."
  • Taunt: "Behind you... once again."
  • Win Quote: "You were staring at my blade. You should have watched my shadow."

Signature Moves

  • Lotus Phantom Step: Teleports instantly behind an attacking opponent, leaving a decoy log/cloth.
  • Swallow Tail Kunai: Rapid fan-throw of three poison-tipped throwing daggers.
  • Shadow Throat Slit: Low dash slide followed by a swift upward carotid slice.
  • Super — Dance of a Thousand Petals: Traps the opponent in a sphere of crimson shadows and cuts them fifty times in a second.

Key Character Dynamics

  • vs. Mikazuki Oboro: Vengeance incarnate. Suzume’s life is entirely defined by her blood oath to sever Oboro’s throat.
  • vs. Jin Kazaguruma: Contrasting shinobi traditions. Jin is loud, flashy, and acrobatic; Suzume is silent, pragmatic, and lethal. She often warns Jin that his red scarf makes him an easy target.
  • vs. Haruki Sumi: Reluctant empathy. She understands the misery of bearing an unasked-for curse, quietly keeping watch over Haruki from the tree branches.

5. Bruno "Bulldozer" Volk

Visual IdentityCombat Profile
Bruno Portrait
Avatar Portrait
Series: Iron Ring Federation (Federação do Ringue de Ferro)
ID: bruno | Author: Ultimate MUGEN
Origin: Minas Gerais & São Paulo Countryside, Brazil 🇧🇷
Alignment: Hero / The People's Champion
Theme Color: #fca311 (Golden Amber & Ring Bronze)
Awakened Form: Ring Fury (Fúria do Ringue)
Home Stage: Hinterland Plaza — Brazil (brazil)
Fighting Style: Heavyweight Boxing & Vale-Tudo Brawling

Bruno Battle Sprite Standard In-Game Combat Stance

Biography & Background

Standing over two meters tall with fists the size of cinderblocks, Bruno "Bulldozer" Volk is the reigning three-time heavyweight champion of the Iron Ring circuit. Born in a working-class town in the Brazilian interior, Bruno spent his youth swinging sledgehammers in stone quarries and loading freight trucks. When he took up boxing, his natural bone density, relentless stamina, and bone-shattering punching power made him a nationwide legend.

Beneath his intimidating physique and booming laughter lies a man with a heart of gold. Every cent of his prize money goes to financing community sports gyms, orphanages, and free clinics across the countryside. When the Convergence pulled his beloved hometown into the dimensional fray, Bruno laced up his gloves, cracked his knuckles, and stepped forward to defend his people.

Iconic Quotes

  • Intro: "Hope you've got good insurance, kid. I hit like a freight train."
  • Taunt: "Still on your feet? Gotta respect that chin!"
  • Win Quote: "HAHA! Ring the bell! Somebody ring the damn bell!"

Signature Moves

  • Bulldozer Uppercut: Ducks low and explodes upward with a kinetic right hook that launches opponents skyward.
  • Iron Hook Combo: Three devastating rib-breaking hooks in quick succession.
  • Sledgehammer Slam: Overhead dual-fist hammer strike with armor against light attacks.
  • Super — Knockout of the Century: Winds up a gargantuan overhand right that creates an acoustic boom upon impact.

Key Character Dynamics

  • vs. Valdric Morn: Class warfare at its finest. Bruno takes profound delight in wiping the arrogant smirk off the self-styled "Prince" with a raw Brazilian right hand.
  • vs. Daichi Ginrou: Mutual admiration. Both love eating hearty food, laughing loud, and trading haymakers until one drops.
  • vs. Haruki Sumi: Protective older brother energy. Bruno treats Haruki to fresh coffee at the town bakery and tells him to relax behind his broad shoulders.

6. Sylene Vashti

Visual IdentityCombat Profile
Sylene Portrait
Avatar Portrait
Series: Saga of the Glacial Crown (Saga da Coroa Glacial)
ID: sylene | Author: Ultimate MUGEN
Origin: Svalbard & Arctic Fjords, Norway 🇳🇴
Alignment: Neutral / Sovereign Restorationist
Theme Color: #00b4d8 (Glacial Azure & Silver Frost)
Awakened Form: Winter Queen (Rainha do Inverno)
Home Stage: Rocky Plateau (plains) / Volcanic Crater (volcano)
Fighting Style: Royal Cryomancy & Glacial Lance Arts

Sylene Battle Sprite Standard In-Game Combat Stance

Biography & Background

Sylene Vashti is the rightful heir to the Glacial Crown of Borealia, an ancient kingdom hidden within the eternal ice shelves of the far north. Her royal court was overthrown and encased in cursed volcanic ash when cultists aligned with Garan the Ashen Oni broke the seals of the underworld. Exiled with only her ceremonial frost tiara and ancestral royal ice magic, Sylene travels the world to gather sufficient thermodynamic energy to freeze the volcanic demons and liberate her frozen homeland.

Sylene carries herself with regal elegance and an icy temperament. She dislikes pointless pleasantries, speaking only when necessary and judging others strictly by their composure and resolve.

Iconic Quotes

  • Intro: "Show me how long you can endure in the frost."
  • Taunt: "So warm and flustered... allow me to fix that."
  • Win Quote: "Hush now... the cold only hurts for an instant."

Signature Moves

  • Glacial Shard: Summons three levitating icicle lances and fires them sequentially.
  • Permafrost Spire: Slams her palm onto the arena floor, causing jagged ice pillars to erupt upward.
  • Crystal Mirage: Envelops herself in diamond dust, leaving an ice decoy that shatters into freezing shrapnel upon contact.
  • Super — Absolute Zero Domain: Freezes the entire fighting arena in deep permafrost, encasing the enemy in a crystalline glacier before detonating it.

Key Character Dynamics

  • vs. Garan the Ashen Oni: Arch-nemesis. Garan destroyed her ancestral kingdom; Sylene will not rest until his volcanic heart is frozen solid.
  • vs. Kaname Fuyutsuki: High-level duel of ice practitioners. Kaname’s samurai blade precision contrasts with Sylene’s royal elemental sorcery.
  • vs. Lian Feng: Grudging respect. Both carry the weight of ancient traditions, sharing a quiet tea ceremony whenever the fighting pauses.

7. VX-9 Volta

Visual IdentityCombat Profile
Volta Portrait
Avatar Portrait
Series: Neon Grid Protocol (Protocolo Grade Neon)
ID: volta | Author: Ultimate MUGEN
Origin: Neo-Metropolis Sector 01, United States 🇺🇸
Alignment: Hero / Sentient Synthetic Rebel
Theme Color: #06d6a0 (Neon Teal & High-Voltage Cyan)
Awakened Form: Overcharge (Sobrecarga 200%)
Home Stage: Neo-Metropolis 2099 (neon)
Fighting Style: High-Voltage Cybernetics & Dielectric Martial Arts

Volta Battle Sprite Standard In-Game Combat Stance

Biography & Background

Built inside the high-security black-ops laboratories of Nexkor Industries in Neo-Metropolis, the VX-9 "Volta" was designed as the ultimate autonomous combat unit: an emotionless synthetic assassin created to terminate rogue superhuman martial artists. Equipped with high-output carbon-nanotube muscles and electromagnetic particle dischargers, Volta was nearly invincible.

However, during a mission to eliminate a secluded temple, Volta’s quantum neural network experienced an emergent anomaly — an awakening of empathy, aesthetic wonder, and existential self-awareness. Recognizing the sacred value of life, Volta deleted his master control firmware, fried his trackers, and fled into the city's neon-lit skyline. Now a hunted renegade, he fights to understand the nature of the human soul and protect organic life from industrial destruction.

Iconic Quotes

  • Intro: "Scanning target vital signs... estimated victory probability: 94%."
  • Taunt: "System error detected: your defensive posture."
  • Win Quote: "Combat telemetry logged. Conclusion: your technique requires an urgent firmware update."

Signature Moves

  • Neon Arc Discharge: Fires an oscillating chain-lightning pulse from his forearm capacitors.
  • Tesla Dash: Turns his physical chassis into a high-speed bolt of electricity, passing straight through attacks.
  • EMP Pulse: Emits a close-range electromagnetic burst that stuns opponents and resets frame advantage.
  • Super — Voltage Singularity: Overclocks his internal reactor to 200%, discharging a cataclysmic dome of neon energy.

Key Character Dynamics

  • vs. Valdric Morn: Rejection of tyranny. Valdric sought to purchase Volta's neural blueprints to build a robotic army. Volta severed all communications with a plasma blast to Valdric's command console.
  • vs. Haruki Sumi: Beautiful intellectual bond. Volta loves visiting Haruki's sanctuary to read poetry, philosophy, and history, asking Haruki questions about what makes a heart truly beat.
  • vs. Bruno Volk: Unlikely friendship. Bruno doesn't understand semiconductors or microcode, but he treats Volta like any ordinary human gym buddy, offering him engine grease and hearty high-fives.

8. Lian Feng (莲 凤)

Visual IdentityCombat Profile
Lian Portrait
Avatar Portrait
Series: Tales of the Jade Lantern (Contos da Lanterna de Jade)
ID: lian | Author: Ultimate MUGEN
Origin: Wudang Mountain Sanctuaries, Hubei, China 🇨🇳
Alignment: Hero / Sovereign of Balance
Theme Color: #2a9d8f (Imperial Jade & Silk Gold)
Awakened Form: Jade Dragon (Dragão de Jade)
Home Stage: Moonlit Bamboo Grove (bamboo)
Fighting Style: Jade Lantern Flowing Kicks & Silk Aerial Chi

Lian Battle Sprite Standard In-Game Combat Stance

Biography & Background

Lian Feng is the youngest grandmaster in the eight-hundred-year history of the Jade Lantern School. Adorned in an emerald silk cheongsam with ornate jade talismans woven into her hair, Lian’s combat philosophy revolves around the supreme mastery of deflection, kinetic flow, and continuous aerial strikes. She does not resist force with brute force; rather, she redirects an opponent's aggressive momentum with the grace of silk drifting in an autumn breeze, returning it ten-fold with pinpoint heel strikes.

When the dimensional fissures opened above Mount Wudang, Lian recognized the work of forbidden sorcery. Tasked by the Council of Elders to restore balance to the cosmic Yin and Yang, she descended into the mortal world carrying the sacred Jade Lantern.

Iconic Quotes

  • Intro: "Breathe deeply. You are going to need every breath."
  • Taunt: "Balance is everything, my friend. You have none."
  • Win Quote: "Balance is life. You lost yours three kicks ago."

Signature Moves

  • Flowing Silk Kick: A continuous series of spinning roundhouse kicks that levitate Lian across the floor.
  • Jade Dragon Ascent: An acrobatic corkscrew kick that launches the opponent high into the air.
  • Lantern Palm Deflection: Parries high and mid attacks, instantly transitioning into a counter sweep.
  • Super — Flight of the Jade Dragon: Channels pure green chi into her legs, striking the opponent from four aerial angles before delivering a ground-shattering dragon dive.

Key Character Dynamics

  • vs. Captain Marlow Reyes: Comic and moral exasperation. Marlow constantly tries to flirt with Lian and gamble for her ancestral jade hairpins; Lian responds by kicking his pirate hat into the stratosphere.
  • vs. Kaito Arashi: Mutual respect between grandmasters. Their sparring matches are masterclasses in clean, traditional martial arts technique.
  • vs. Akio Hoshi: Patient teacher. Lian constantly tries to teach Akio that breathing and patience will make his stellar strikes twice as dangerous.

9. Garan the Ashen Oni (灰燼の餓乱)

Visual IdentityCombat Profile
Garan Portrait
Avatar Portrait
Series: Legends of the Ashen Gate (Lendas do Portão de Cinzas)
ID: garan | Author: Ultimate MUGEN
Origin: Subterranean Caldera / Sealed Gate of Ash, Underworld 🌋
Alignment: Villain / Primordial Calamity
Theme Color: #7b2cbf (Cold Ashen Violet & Brimstone)
Awakened Form: Awakened Oni (Oni Desperto)
Home Stage: Volcanic Crater (volcano)
Fighting Style: Primordial Demonic Brute Force & Violet Ashen Flames

Garan Battle Sprite Standard In-Game Combat Stance

Biography & Background

Garan is a colossal thousand-year-old demon who crawled up from the deepest subterranean magma abysms beneath Mount Aso. Sealed during the Heian era by ninety-nine ascetic warrior-monks who sacrificed their lives to construct the Ashen Gate, Garan slumbered beneath layers of cooled basalt for centuries.

When Mikazuki Oboro cast the Scarlet Eclipse, the dimensional shockwaves shattered the sacred talismans binding the Ashen Gate. Clawing his way back to the surface world enveloped in chilling violet flames, Garan brings with him an insatiable hunger for mortal fear and despair. Unlike normal fire, Garan's violet flame does not burn wood or stone; it devours the soul and will to live, leaving victims as hollow husks of grey ash.

Iconic Quotes

  • Intro: "Your fear has a taste... absolutely exquisite."
  • Taunt: "Run, little mortal. It makes the hunt so much better."
  • Win Quote: "Kneel, weakling. The Ashen Gate is open, and it is starving."

Signature Moves

  • Ashen Cleave: Slams his massive stone-hard fists into the ground, sending a wave of violet fire forward.
  • Oni Grab & Crush: Grabs the opponent by the skull, lifting them up and infusing cold hellfire directly into their chest.
  • Brimstone Quake: Jumps into the air and belly-flops onto the arena, causing unblockable shockwaves across the floor.
  • Super — Gates of the Underworld Unleashed: Drags the opponent into a volcanic abyss and delivers a cataclysmic beatdown engulfed in violet flame.

Key Character Dynamics

  • vs. Sylene Vashti: Ancient blood feud. Sylene’s ice is the only element capable of extinguishing Garan's cold flame, making them bitter, mortal adversaries.
  • vs. Haruki Sumi: Ravenous predator vs delicious prey. Garan can smell the sealed Twilight Titans inside Haruki and wants nothing more than to crack Haruki open like an egg.
  • vs. Mikazuki Oboro: Unstable alliance of convenience. Garan respects Oboro’s cunning, but is eager to crush Oboro’s skull the moment the dimensional veil completely dissolves.

10. Captain Marlow Reyes

Visual IdentityCombat Profile
Marlow Portrait
Avatar Portrait
Series: Corsairs of the Salty Wind (Corsários do Vento Salgado)
ID: marlow | Author: Ultimate MUGEN
Origin: Port of Cádiz, Spain 🇪🇸 & The Sky Archipelago
Alignment: Anti-Hero / Dashing Sky Corsair
Theme Color: #0077b6 (Sea Navy & Brass Gold)
Awakened Form: Captain Tempest (Capitão Tempestade)
Home Stage: Rocky Plateau (plains) / Neo-Metropolis 2099 (neon)
Fighting Style: Tempest-Forged Cutlass & Aether Flintlock Fencing

Marlow Battle Sprite Standard In-Game Combat Stance

Biography & Background

Flamboyant, charming, and utterly fearless, Captain Marlow Reyes is the commander of the legendary flying galleon El Viento Salado. Having spent two decades navigating both the high seas of the Atlantic and the perilous cloud reefs of the Sky Archipelago, Marlow has plundered every tyrannical merchant fleet from Madrid to Neo-Metropolis. His cutlass was quenched in the heart of a maelstrom and crackles with perpetual tidal electricity.

Marlow is not a cruel killer; he lives for adventure, high stakes, and the thrill of discovery. When the Convergence fused cloud kingdoms with mortal continents, Marlow saw the opportunity of a lifetime: dozens of uncharted civilizations, mythical relics, and legendary fighters to challenge for treasure maps.

Iconic Quotes

  • Intro: "Ahoy! How about wagering that treasure map of yours on this fight?"
  • Taunt: "Well, well... who would have thought you'd be this easy?"
  • Win Quote: "Pillage? Heavens, no! I only came for the view... and that shiny map in your pocket."

Signature Moves

  • Cutlass Tide Slice: A sweeping dashing slash that leaves an aether-water trail behind.
  • Aether Flintlock Trick: Fires a ricocheting spark shot from his brass pistol that bounces off the arena walls.
  • Corsair Roll: An evasive forward somersault that slips under projectiles and positions Marlow behind the foe.
  • Super — Broadside of the Salty Wind: Whistles for his flying galleon, which carpet-bombs the stage with a devastating salvo of cannonballs.
  • Tide Step (~D, DF, F, c): Teleports behind the foe and cuts, 200 power. Cutlass Flurry (~D, DF, F, a): five light hits and a launching finisher. Broadside Cannon (~B, F, x): three-hit shot. Phantom Crew (F, B, F): an autonomous copy that chases and jabs, 500 power.

Key Character Dynamics

  • vs. Lian Feng: Playful harassment vs strict discipline. Marlow loves teasing Lian about her serious demeanor, while Lian threatens to throw him overboard.
  • vs. Valdric Morn: Pure ideological enmity. Valdric views Marlow as a parasitic pirate criminal; Marlow considers Valdric a pompous tin-can tyrant who needs his wallet stolen.
  • vs. Bruno Volk: Drinking buddies. After a good brawl, Marlow and Bruno can always be found sharing stories and laughs at the town tavern.

11. Kaname Fuyutsuki (冬月 要)

Visual IdentityCombat Profile
Kaname Portrait
Avatar Portrait
Series: Chronicles of the Everwinter Blade (Crônicas da Lâmina do Inverno Eterno)
ID: kaname | Author: Ultimate MUGEN
Origin: Winter Moon Shrine, Swiss Alps, Switzerland 🇨🇭
Alignment: Neutral / Lawful Divine Judge
Theme Color: #48cae4 (Pristine Frost & Haori White)
Awakened Form: Spiritual Blade (Lâmina Espiritual)
Home Stage: Gate of Spirits (spirit)
Fighting Style: Everwinter Iaido & Spiritual Severance

Kaname Battle Sprite Standard In-Game Combat Stance

Biography & Background

Kaname Fuyutsuki is the supreme guardian of the Sanctuary of Everlasting Snows on the sacred peaks of the Swiss Alps. Dressed in a spotless white haori adorned with snowflake heraldry, Kaname draws his spirit katana, Hyōketsu, only in the pursuit of absolute righteousness. His blade does not merely cut flesh and bone; it cuts through hesitation, dark sorcery, and spiritual illusions.

Kaname views combat not as a pastime or a sport, but as a solemn ritual of judgment. He speaks with measured formality, displaying neither malice nor pride. When Oboro’s dimensional tampering began bleeding dark miasma into the spirit world, Kaname descended to the Gate of Spirits to pass judgment upon the violators of cosmic order.

Iconic Quotes

  • Intro: "My steel thirsts for justice. Unsheathe yours."
  • Taunt: "To hesitate is to lose. You have already lost."
  • Win Quote: "My blade does not cut merely flesh. It severs your hesitation."

Signature Moves

  • Frost Flash Iaido: An instantaneous quick-draw slash that freezes the air along the sword path.
  • Glacial Counter: Enters a calm parry stance; any incoming physical hit triggers an immediate counter-slash that freezes the foe's feet.
  • Crescent Frost Crescent: Slashing projectile of crystallized spiritual ice.
  • Super — Severance of Absolute Zero: Dashes through the opponent with a blinding iaido draw, sheathing the sword slowly; when the blade clicks shut, the opponent takes massive burst damage.

Key Character Dynamics

  • vs. Shion Kurogane: The ultimate clash of swordsmen. Heavy lunar sword against precise quick-draw frost katana.
  • vs. Mikazuki Oboro: Divine judge vs master of falsehood. Kaname’s sword is one of the few weapons capable of cleaving through Oboro's illusions.
  • vs. Sylene Vashti: Respectful recognition of sovereign ice. Kaname acknowledges Sylene’s royal lineage and aids her in purifying demonic corruption.

12. Jin Kazaguruma (風車 迅)

Visual IdentityCombat Profile
Jin Portrait
Avatar Portrait
Series: Winds of the Hidden Valley Village (Ventos da Vila Escondida no Vale)
ID: jin | Author: Ultimate MUGEN
Origin: Windmill Village, Blue Mountains, Jamaica 🇯🇲
Alignment: Hero / Zephyr Acrobat
Theme Color: #0077b6 (Sky Blue & Crimson Scarf)
Awakened Form: Typhoon (Tufão)
Home Stage: Moonlit Bamboo Grove (bamboo)
Fighting Style: Kazaguruma Wind Acrobatics & Twin Gale Chakrams

Jin Battle Sprite Standard In-Game Combat Stance

Biography & Background

Young, energetic, and gifted with god-like speed, Jin Kazaguruma is the chief courier and scout of the Wind Valley Village. Wearing a long crimson scarf that streams behind him like a banner of wind, Jin fights with a pair of aerodynamic wind chakrams that he can spin, throw, and recall at will.

Jin's fighting style is completely freeform and acrobatic. He runs across walls, somersaults over incoming fireballs, and leaves afterimage mirages that confuse even seasoned warriors. Despite his playful demeanor, Jin carries a fierce sense of justice, having pledged to protect innocent villagers whose homes were uprooted by the dimensional tear.

Iconic Quotes

  • Intro: "Try to keep up with me... if you can!"
  • Taunt: "Too slow! The wind didn't even notice you!"
  • Win Quote: "See that? The wind always arrives first!"

Signature Moves

  • Pinwheel Chakram Toss: Hurls spinning wind discs that circle outward and return like boomerangs.
  • Zephyr Mirage Dash: Leaves three afterimages across the floor while teleporting into an overhead dive kick.
  • Cyclone Flip: Upward somersault kick that creates a miniature whirlwind beneath the opponent.
  • Super — Gale Pinwheel Tempest: Spins at supersonic speed, creating a massive vacuum vortex that traps the foe before delivering an explosive aerial drop.

Key Character Dynamics

  • vs. Kaito Arashi: Jin looks up to Kaito as an older brother and role model, constantly striving to prove that his wind speed can overcome Kaito’s wind power.
  • vs. Suzume Kagerou: Friendly ninja rivalry. Jin constantly tries to get the gloomy Suzume to smile or laugh, usually earning an exasperated sigh or a thrown kunai.
  • vs. VX-9 Volta: Speed test. Jin loves racing Volta across the rooftops of Neo-Metropolis, testing human agility against cybernetic booster rockets.

13. Daichi Ginrou (銀狼 大地)

Visual IdentityCombat Profile
Daichi Portrait
Avatar Portrait
Series: Legends of the Celestial Peak Fist (Lendas do Punho do Pico Celeste)
ID: daichi | Author: Ultimate MUGEN
Origin: Altai Mountains & Mongolian Steppes 🇲🇳
Alignment: Hero / Wild Apex Brawler
Theme Color: #e9c46a (Golden Ki & Wild Silver)
Awakened Form: Lupine Instinct (Instinto Lupino)
Home Stage: Rocky Plateau (plains)
Fighting Style: Celestial Peak Fist & Primal Lupine Ki

Daichi Battle Sprite Standard In-Game Combat Stance

Biography & Background

Found as an orphaned infant in the frozen wastes of the Altai Mountains and raised by a mystical pack of giant silver wolves, Daichi Ginrou embodies the untamed fury of the wilderness. With wild, spiky silver hair and sharp predatory instincts, Daichi learned to transform his fighting spirit into an incandescent golden aura.

Daichi does not fight out of anger or hatred; he fights for the pure, unadulterated joy of testing his limits against worthy rivals. He can smell fear, deception, and ill intent from miles away, making him immune to psychological manipulation. When the Convergence pulled the world into chaos, Daichi bounded across the rocky canyons with a fierce wolf grin, eager to battle the strongest champions across time and space.

Iconic Quotes

  • Intro: "Haha! This fight is gonna be awesome!"
  • Taunt: "That's all you've got? Man, I got hyped for nothing!"
  • Win Quote: "Haha! That was great! Let's go again, harder this time!"

Signature Moves

  • Wolf Fang Strike: A ferocious lunging claw strike infused with golden ki.
  • Apex Roar: Releases a shockwave roar that reflects projectiles and pushes opponents across the screen.
  • Predator Pounce: A low-angle forward leap that pins the opponent to the ground for a barrage of punches.
  • Super — Golden Celestial Apex: Unleashes his full lupine avatar, delivering a cataclysmic barrage of golden-claw strikes that finishes with an earth-shattering uppercut.

Key Character Dynamics

  • vs. Akio Hoshi: Best friends and eternal rivals. Their training sessions routinely level mountain ridges and leave them both laughing with broken ribs.
  • vs. Bruno Volk: Physical combat paradise. Daichi loves Bruno's honest punches, comparing Bruno to a giant grizzly bear.
  • vs. Kaito Arashi: High martial respect. Daichi respects Kaito’s calm center, finding it difficult to rattle Kaito with his wild wolf tactics.

14. Valdric Morn

Visual IdentityCombat Profile
Valdric Portrait
Avatar Portrait
Series: Chronicles of the Red Star Empire (Crônicas do Império da Estrela Rubra)
ID: valdric | Author: Ultimate MUGEN
Origin: Vane Industrial Megacommune, Germany / Central Europe 🇩🇪
Alignment: Villain / Imperial Conqueror
Theme Color: #d90429 (Imperial Crimson & Heavy Iron)
Awakened Form: Scarlet Dominance (Dominância Escarlate)
Home Stage: Neo-Metropolis 2099 (neon) / Volcanic Crater (volcano)
Fighting Style: Heavy Armored Combat & Dark Matter Plasma Cannons

Valdric Battle Sprite Standard In-Game Combat Stance

Biography & Background

Prince Valdric Morn is the iron-fisted heir and supreme commander of the Red Star Empire, a heavily militarized technocratic superpower. Encased in ornate, high-density crimson power armor powered by a stolen dark-matter core, Valdric believes that lasting world peace can only be established through total martial subjugation and industrial dominance.

Arrogant, cold, and calculating, Valdric considers spiritual martial artists and wandering monks to be obsolete relics who must be purged or enslaved. When the Convergence fused his industrial fortresses with ancient lands, Valdric mobilized his legions to conquer every sector and claim the dimensional core for the Empire.

Iconic Quotes

  • Intro: "A prince does not fight with commoners. Today, I make an exception."
  • Taunt: "Pathetic. Try again if you dare."
  • Win Quote: "Kneel! A prince does not lose to filthy plebeians."

Signature Moves

  • Imperial Plasma Cannon: Charges and fires an armor-piercing crimson energy beam from his arm gauntlet.
  • Heavy Aegis Rush: Charges forward behind an invincible energy shield, bowling over incoming attacks.
  • Overlord Stomp: Stomps his heavy armored boot onto the floor, causing a localized seismic eruption.
  • Super — Imperial Annihilation Protocol: Locks the opponent in tractor beams and fires an orbital laser salvo that obliterates the arena.

Key Character Dynamics

  • vs. Bruno Volk: Pure class hatred. Valdric is infuriated that a common brawler from a poor Brazilian town can crack his million-credit power armor.
  • vs. VX-9 Volta: Treason and defiance. Valdric views Volta as stolen imperial intellectual property and intends to reformat Volta into a lobotomized war tool.
  • vs. Mikazuki Oboro: Dangerous rivalry. Valdric believes he can master Oboro's dimensional rift technology, unaware that Oboro is simply using the Prince's armies as pawns.

15. Haruki Sumi (墨 春樹)

Visual IdentityCombat Profile
Haruki Portrait
Avatar Portrait
Series: Twilight Library Archives (Arquivos da Biblioteca do Crepúsculo)
ID: haruki | Author: Ultimate MUGEN
Origin: Secret Arcane Vaults of Seoul, South Korea 🇰🇷
Alignment: Hero / Reluctant Calamity Guardian
Theme Color: #588157 (Scholar Sage & Sealing Ochre)
Awakened Form: Contained Fury (Fúria Contida)
Home Stage: Gate of Spirits (spirit)
Fighting Style: Calligraphic Talisman Arts & Unleashed Twilight Titan Core

Haruki Battle Sprite Standard In-Game Combat Stance

Biography & Background

Haruki Sumi is a gentle, soft-spoken scholar who wears round spectacles and ink-stained scholar robes. He spent his life peacefully cataloging ancient manuscripts in the Twilight Library, an underground labyrinth beneath Seoul containing the forbidden histories of forgotten civilizations.

Tragically, Haruki was chosen as the living vessel for the Twilight Titans — cataclysmic primordial beasts that nearly destroyed the ancient world before being sealed inside his spiritual core. Haruki abhors violence, constantly apologizing to his opponents and begging them to retreat. But if his companions are endangered or his life is threatened, the protective talismans on his arms tear open, unleashing a terrifying wave of eldritch destructive energy that he struggles desperately to control.

Iconic Quotes

  • Intro: "Please... don't force me to fight you."
  • Taunt: "I warned you... I truly don't want to hurt you."
  • Win Quote: "I'm so sorry... I really didn't want things to go this far."

Signature Moves

  • Talisman Ink Barrier: Writes an arcane kanji in mid-air that repels incoming attacks and reflects projectiles.
  • Scholar's Binding Scroll: Casts paper talismans along the floor that bind the opponent's feet, temporarily immobilizing them.
  • Titan Shockwave: A sudden involuntary burst of shadowy aura that pushes back aggressive rushdown.
  • Super — Seal Shatter: Twilight Wrath: The talismans across Haruki's arms burn away; an enormous eldritch shadow manifests behind him, delivering a cataclysmic barrage of cosmic strikes before Haruki snaps back into conscious remorse.

Key Character Dynamics

  • vs. Garan the Ashen Oni: Ultimate existential threat. Garan recognizes the ancient beasts inside Haruki and wants to tear them free to devour them.
  • vs. VX-9 Volta: Deep philosophical kinship. Haruki helps Volta understand human art and poetry, while Volta protects Haruki from bounty hunters.
  • vs. Bruno Volk: Protective friendship. Bruno treats Haruki like a kid brother, shielding him from rowdy fighters in the tournament circuit.

16. Mikazuki Oboro (三日月 朧) — Final Boss

Visual IdentityCombat Profile
Oboro Portrait
Avatar Portrait
Series: Scarlet Eclipse — Final Boss (Eclipse Escarlate — Chefe Final)
ID: oboro | Author: Ultimate MUGEN
Origin: The Rift of the Scarlet Eclipse / Forgotten Moon Dynasty
Alignment: Supreme Villain / Final Boss
Theme Color: #c8102e (Blood Eclipse Crimson & Void Black)
Awakened Form: Awakened Veil (Véu Desperto)
Home Stage: Gate of Spirits (spirit) / Volcanic Crater (volcano)
Fighting Style: Reality-Warping Genjutsu, Black Hellfire & Raven Phantoms

Oboro Battle Sprite Standard In-Game Combat Stance

Biography & Background

Mikazuki Oboro is the supreme architect behind the Great Convergence and the ultimate antagonist of Ultimate MUGEN. Standing tall in flowing black robes lined with blood-crimson silk, Oboro possesses the legendary Scarlet Veil eyes — ocular artifacts capable of perceiving and rewriting the fundamental fabric of cause and effect.

Oboro views mortal reality as an agonizing, chaotic nightmare filled with suffering, war, and mortality. His grand design is to cast the entire universe into an eternal, painless dreamworld beneath the Scarlet Eclipse, erasing all individual consciousness into a serene, unified sea of black fire. Calm, elegant, and always three steps ahead of every challenger, Oboro fights with effortless superiority: his body dissolves into flocks of nightmarish ravens when struck, and his black flames burn until nothing remains.

Iconic Quotes

  • Intro: "You have made it this far... exactly as I foresaw."
  • Taunt: "All of this has already occurred — entirely inside your mind."
  • Win Quote: "An illusion... from the very first strike."

Signature Moves

  • Crow Clone Dissipation: When struck by any move, Oboro dissolves into a cloud of ravens and reforms behind the opponent.
  • Amaterasu Void Flame: Ignites an inextinguishable black fire at the opponent's exact screen coordinates.
  • Nightmare Tsukuyomi: Locks eyes with the opponent, freezing them in psychological paralysis while shadowy spikes pierce their soul.
  • Super — Total Eclipse of the Void: Oboro ascends into the crimson sky, opening his giant eye across the horizon; the entire arena shatters into dimensional fragments, dealing astronomical damage to any mortal unfortunate enough to challenge him.

Key Character Dynamics

  • vs. All Fighters: Oboro views all heroes and villains alike as actors on his stage. He anticipates every move, mocking their struggles as futile ripples in his master tapestry.
  • vs. Kaito Arashi: The philosophical centerpiece. Kaito’s wind represents mortal striving and freedom; Oboro’s eclipse represents absolute stillness and total control.
  • vs. Suzume Kagerou: Cold amusement. Oboro casually acknowledges having wiped out her clan, viewing her vengeful rage as merely another predictable emotion to be extinguished.

Shared Toolkit

Every playable fighter ships the same combo-and-ability toolkit on top of its dossier moves, so each one has the depth of a feature-rich MUGEN character:

AdditionInputNotes
EX projectilefireball motion + x+y250 meter, stronger multi-hit shot
EX anti-airuppercut motion + y+b500 meter, longer invulnerability
Overheadx+bhigh-guard medium hit
Crouch launchercrouch + ystarts juggles
Dive strikeair yground-bounces the opponent
Level 3 hypersuper motion + x+ycosts the full 3000 meter
Awakened specialfireball motion + a+bonly while transformed, three-way spread
TransformationL3+R3 / awakenspends meter, boosts attack and movement, unlocks form moves and increases damage taken on unguarded hits
Slide kickF+alow launching mixup against the overhead
Escape burstx+a+b500 meter, breaks out of hit-stun
Ascended formsecond transformation2000 meter, unlocks an ascended hyper (a+b)

Ki fighters also carry flight, teleport or super speed (Akio, Daichi, Jin, Kaito, Kaname, Lian, Sylene, Haruki, Shion, Volta), and every fighter has a passive (meter or life regeneration). All of these appear in the pause move list and can be bound to the 1-4 / L1, L2, R1, R2 shortcuts.

Inter-Character Relationship Matrix

classDiagram
    class Kaito {
        +Arashi-Ki
        +Protector
    }
    class Oboro {
        +Véu
        +Final Boss
    }
    class Daichi {
        +Lupine Ki
        +Brawler
    }
    class Bruno {
        +Iron Ring
        +Champion
    }
    class Valdric {
        +Red Star
        +Tyrant
    }
    class Volta {
        +Neon Grid
        +Sentient AI
    }
    class Suzume {
        +Shadow Lotus
        +Avenger
    }
    class Garan {
        +Ashen Oni
        +Demon
    }

    Kaito --> Oboro : Sworn Nemesis
    Suzume --> Oboro : Vengeance Blood Oath
    Kaito <--> Daichi : Eternal Rivals
    Daichi <--> Bruno : Heavyweight Brothers
    Bruno --> Valdric : Class Defiance
    Valdric --> Volta : Hunter vs Prey
    Garan --> Haruki : Devourer of Seals
    Sylene --> Garan : Extinguisher of Hellfire

Troubleshooting

SymptomLikely causeWhat to do
Character missing from select.def not in mugen/chars/<name>/ or a parse errorRun mugen_check on the folder and read the error
Invisible or square spritesSprite missing from the .sff or wrong palettesprite_audit lists the broken references
Fighter floats or sinksA state that never returns to the groundhover_check with TRACE=1
HD character too big or smalllocalcoord missing in the .defAdd localcoord = 1280, 720 to [Info]
Move has no effectController not implemented yetSee the list in CNS scripts
UMF does not loadInvalid JSON or a missing required fieldcargo run --release prints the serde_json error with line and column
Game is slowHigh art resolutionSettings → Video → Quality, or quality=1 in the .cfg
Too many flashesLight sensitivityimpact_lv=0 in the .cfg
Fighter keeps walking on its own and commands stop coming outKey stuck after switching windows (the OS delivers the key-up to the other window)The shell releases every input on focus loss; press and release the key again if it still happens
mugen/ folder not foundExecutable run from another directorySet UME_MUGEN_DIR

To report a bug, open an issue with the character or stage, the mugen_check output and the steps to reproduce.

Compatibility decisions

This page records the features the engine deliberately does not implement, so character and stage authors get a clear answer instead of a silent failure.

Module state controllers

The Ikemen module/motif layer is triaged as a group. None of these is implemented yet; the compatibility checker reports them as unsupported controllers.

ControllerDecisionReason
StoryboardPlannedNeeds the screenpack/storyboard runtime; tracked with the screenpack work
DialoguePlannedSame runtime as Storyboard
MatchRestartPlannedNeeds the rules surface and a deterministic restart path
LifebarActionPlannedNeeds the fight.def lifebar renderer
ChangeMovelistPlannedNeeds a per-match move list; the debug move list is read-only today
LoadFileRejected by designCharacters run inside a deterministic match; disk reads from scripts are not allowed
SaveFileRejected by designSame sandbox rule as LoadFile
SaveStateRejected by designNo rollback snapshot in the engine; replaying the input stream is the supported path
LoadStateRejected by designSame as SaveState
ShaderSetRejected by designShaders are part of the engine renderer, not character content

The REJECTED_CONTROLLERS list in crates/engine/src/diagnostics.rs is used by the load report: these names are marked (rejected by design) in the detail output, while the planned ones are simply unsupported.

3D stages

glTF stages are rejected by design. The stage loader detects a model request ([Model], model = *.glb, [StageInfo] scene = ...), warns once per stage and renders the normal 2D background layers. There is no fallback for stages that only contain a 3D model.

Tracker music

xm, it, mod and s3m music is rejected by design for now. The audio backend decodes ogg/vorbis, mp3, flac and wav; an unsupported track logs a warning and the fight continues with the built-in music instead of going silent.

Deliberate physics deviations

BehaviourM.U.G.E.NUltimate MUGENReason
Airborne hit state with physics = NNo gravity: a fighter hit by repeated yvel = 0 attacks stays in mid-airThe fighter falls, as if its state had ground-or-air gravityStops fighters from hovering while a projectile keeps hitting them. Attack states with physics = N (hover and flight moves) keep their scripted height.

| Duplicate [Begin Action N] in an AIR file | First definition wins | First definition wins | Later copies used to overwrite the first and dropped its hitboxes. | | AnimTime on an animation ending in a -1 frame (M.U.G.E.N. characters) | 0 on that frame, negative before | Same | Taunts and one-shot states ending on a -1 frame never finished. | | Walk (20) and guard (130/131) exits | Engine hands control back when the direction is released | Same, even if the character's common1.cns has no exit | Characters were stuck walking or guarding. | | Character-owned intro (states 190-199) | Round waits for the intro flag | Same; the engine face-off no longer replaces it | The intro was cut short. | | Round start with a character that defines Statedef 190 | The character's own intro state runs (its speech bubble, sounds, story variants) | Same; the engine enters it instead of its generic face-off pose, and skips its own speech bubble for M.U.G.E.N. characters | Characters' own intros and bubbles never ran and the generic bubble could talk over them. | | AfterImageTime, HitDef persistant, PlaySnd volume, Explod random/ownpal, ScreenBound movecamera, Projectile projshadow/air.juggle/projscreenbound | Mostly accepted | Reported by the import audit as unknown parameters and ignored | Not implemented yet; the others in this row have no effect in M.U.G.E.N. either. | | Explod postype = left/right y | Measured from the top of the screen | Same | Screen-anchored intro balloons were drawn below the visible area. |

Lua scripts in M.U.G.E.N content

Some packs ship .lua files. This page says what they are for, what the engine does when it finds them and what to use instead. The engine has no Lua runtime by design (see Engine and Compatibility decisions): it keeps the binary small, WASM simple and the simulation deterministic for rollback.

What was checked

None of the characters stored in the project (the two Goku GT DBFZ packs, Gogeta SSJ4, Goku SSJ4) contain a .lua file; they are plain CNS, CMD, AIR, SFF and SND. The notes below about Lua in other packs come from the Ikemen GO documentation, not from a pack in this repository. If a specific fighter ships Lua, send the pack so its scripts can be read and added here.

Where Lua appears

M.U.G.E.N 1.0 and 1.1 have no Lua. It comes from Ikemen GO, which uses it in three places.

PlacePurposeTypical files
Engine and screenpack layerMenus, game modes, select screen, win screen, hooksmain.lua, start.lua, motif and module files
External modulesOptional add-ons loaded by the engine: extra modes, stats, training toolsexternal/mods/*.lua
Fighter DEFarcadepath in [Arcade]: that fighter's own arcade route, storyboards and rivalsarcade.lua next to the .def
Content packsA screenpack or pack bundling a module that adds a menu, a mode or a HUD tweak*.lua next to the .def

Fighter combat logic is not written in Lua. It lives in CNS and ZSS (state controllers, triggers, commands, AI), which the engine already runs. So a .lua file in a fighter folder, such as its arcade path, does not change how the fighter fights; it shapes the modes and screens around it.

Examples from the Ikemen GO wiki

Source: the official Lua page of the Ikemen GO wiki. Reference modules live in the ikemen-engine/modules repository.

A fighter can point to a Lua file from its own DEF, under the [Arcade] section. The file is a custom arcade path: it decides the opponents, storyboards and branches for that fighter.

[Arcade]
arcadepath = arcade.lua
launchStoryboard('chars/kfm/intro.def')
for i = 1, 6 do
	if not launchFight{} then return end
end
if getConsecutiveWins(1) == 7 then
	if not launchFight{p2char = {"SuaveDude"}} then return end
else
	if not launchFight{order = 3, winscreen = true} then return end
end
launchStoryboard('chars/kfm/ending.def')
setMatchNo(-1)

select.def accepts a Lua condition after unlock = to unlock a hidden fighter, for example stats.modes ~= nil and stats.modes.arcade ~= nil and stats.modes.arcade.clear >= 1, or gameMode() ~= "bossrush" to hide a fighter from one mode.

Modules are .lua files in external/mods, listed in Common.Modules, or loaded by a screenpack with module = file.lua in its [Files] section. They can add game modes and attach to hooks in the default scripts.

What the engine does today

  • The character loader does not read .lua files and does not list them as an error. The fighter loads and fights normally.
  • If the fighter depended on its Lua (a custom menu entry, a mode, a HUD change), that extra behaviour is simply absent.
  • mugen_check reports unsupported controllers, triggers and parameters, but not stray .lua files.

Alternatives without Lua

Lua useReplacement
Menus and screensScreenpack (system.def, fight.def) and the Rust menu code, see Screenpacks
Game modesRust modes and data, see Game modes
Fighter behaviour and AICNS or ZSS, or UMF JSON, see CNS scripts and Creating a UMF character
Custom rules and tweaksData fields (TOML or JSON) read by Rust

Recommendation

  1. Keep Lua unsupported. Add no runtime.
  2. Make the importer detect .lua files and report them once per character as "ignored: Lua scripts are not supported", so creators know why a menu or mode is missing.
  3. Add the same line to the mugen_check report.
  4. When a real pack depends on its Lua, read the script and port the effect to Rust or data case by case, instead of interpreting arbitrary Lua.

The TOML replacement for arcade paths and unlock conditions is described in Route files.

Route and unlock files (TOML)

Data-driven replacement for the Lua arcade paths and unlock conditions of Ikemen GO. See Lua scripts for the reasoning. There is no scripting runtime: a route is a TOML file, and conditions use a small expression language checked when the file loads.

Where the files live

FileUsed forSource
route_<fighter id>.tomlArcade route of that fighterData folder (next to the executable, app storage on Android, browser storage on the web)
unlocks.tomlUnlock and hide rules for fighters and stagesSame place; when absent the bundled assets/routes/unlocks.toml is used

A file with an error is reported on the console with the step or rule number and then ignored, so the game keeps its built-in behaviour.

Arcade route

[route]
id = "kfm-arcade"

[[step]]
storyboard = "chars/kfm/intro.def"

[[step]]
repeat = 6
fight = { order = 1, stage = "dojo" }

[[step]]
when = "consecutive_wins == 6"
fight = { p2 = ["SuaveDude"] }
else = { fight = { order = 3, winscreen = true } }

[[step]]
action = "clear"

Each [[step]] has exactly one of fight, storyboard or action.

KeyMeaning
fightorder (1 picks the next regular opponent, 2 or more picks the boss), p2 (fighter ids or names, first match wins), stage, winscreen
stageStage id or name; random chooses a random stage. The first fight skips stage select when its route names a stage. An unknown stage keeps the normal automatic choice.
storyboardPlays a .def storyboard from an imported MUGEN pack, including its .sff image layers and .air animations; referenced files resolve relative to the storyboard
actionclear ends the route
repeat1 to 99 times; when is checked on every repetition
whenCondition; the step runs only when true
elseSame keys as a step body (fight, storyboard, action); runs when when is false

Storyboards between fights play before the next fight. A storyboard before the first fight replaces the built-in arcade opening; a final storyboard plays before the ending or the final results screen. Press confirm or tap anywhere to advance a scene, or Back/Start or tap Skip to skip the current storyboard. If a storyboard file or its required sprite file cannot be loaded, the engine reports the path and continues the route.

The route is planned when arcade starts, assuming the player wins every fight, which is the only path a run can take. A lost fight ends the run as usual.

Conditions

Numbers, quoted text, true, false, variables, == != < <= > >=, &&, ||, ! and parentheses.

VariableValue
stats.arcade.clearArcade clears saved so far
consecutive_wins, match_noFights already planned in this run
modearcade, story, survival, cpu, versus, training, watch or team
netplay1 in an online match, else 0
team_size1 or 2 (routes only)
playerId of the fighter the player chose

An unknown variable is a load error that lists the known ones.

Unlocks

[[unlock]]
target = "char:oboro"
when = "stats.arcade.clear >= 1"

[[hide]]
target = "char:oboro"
when = "mode == \"bossrush\""

A target is char:<id> or stage:<id>. A target with unlock rules is available only while all of them are true; a target with hide rules is hidden while any is true. Targets without rules stay open. Fighter rules apply to the select screen; stage rules are parsed but not applied yet.

Not covered

Arbitrary logic, per-round results (perfect_rounds), labels and goto, and story mode arcs are not part of this version.

Make a character (quick start)

English · Português (BR)

This is the short path. You will make a working fighter in about ten lines, then grow it. Every field is listed in the full UMF reference.

1. Start from a fighter that already works

A UMF file can inherit a whole fighter with extends. Your fighter gets the stats, art, animations and moves of the parent, and you write only what changes.

Copy this file to umf/hello.json (or use the ready one in docs/examples/umf/hello-fighter.json):

{
  "format": "umf/2",
  "id": "hello",
  "name": "Hello Fighter",
  "author": "you",
  "color": "#2a9d8f",
  "extends": "kaito",
  "palettes": [{ "top": "#2a9d8f", "trim": "#16544d" }],
  "moves": [{ "id": "gale", "name": "Sky Gale", "cost": 500 }]
}

What it says:

LineMeaning
formatumf/2 (umf/1 still loads)
idUnique, lowercase, no spaces. It is also the file's internal name
name, author, colorWhat the select screen shows. color is the card colour
extendsInherit everything from kaito (any loaded fighter or kit works)
palettesRecolour. Keys are the colour names of the parent's art (top, trim, hair)
movesChange a move by id. Here gale keeps its inputs and gets a new name and cost

2. Where the file goes

  • Next to the game: put it in umf/. No rebuild needed.
  • Or point to a folder with UME_UMF_DIR=/path/to/folder.
  • Built into the game: put it in assets/chars/, add its id to assets/chars/index.json if you want a set order, and run cargo run --release.

Run the game and pick Training to test it. Press F2 to show hitboxes.

3. Add a new move

Moves are matched by id, so you can add, change or remove any of them:

"moves": [
  { "id": "gale", "name": "Sky Gale", "cost": 500 },
  { "id": "slide", "remove": true },
  {
    "id": "crest", "name": "Crest Kick", "input": "F, F, b",
    "kind": "special", "anim": "gale",
    "hits": [{ "at": 3, "damage": 80, "level": "heavy", "launch": true }]
  }
]
  • input uses the command syntax: D, DF, F, x is a quarter circle plus x; x+y means both at once.
  • kind is normal, special or super. A normal cancels into specials and supers on hit or block.
  • anim must be the name of an animation in the parent (gale here). Your own animations go in "anims".
  • hits[].at is the frame where the hit goes live. damage is the amount.

More: moves, hits, command syntax.

4. Give it your own look

  • Colours only: change palettes, or add awakeningPalette for the transformation.
  • Stats: "stats": { "life": 1080, "attack": 104 } changes one number and keeps the rest.
  • Sprites: your own pixel art goes in assets/chars/sprites/<id>/. See Sprite atlas import and Effect frames.
  • Profile: a nationality and a short bio in English, Portuguese and Spanish. See Profile.

5. Check it before you play

cargo test --release -p ume-engine --test it wiki_examples::
cargo test --release --test it native_roster_lab:: -- --nocapture

The first command checks the examples in this guide. The second plays every attack of the roster and prints damage and reach.

Not a UMF fighter?

  • M.U.G.E.N characters (.def, .sff, .cns) go in mugen/chars/. They run without changes. See Characters and CNS scripts.
  • A fighter without sprites: not supported. Every fighter is drawn from pixel-art PNGs, like M.U.G.E.N characters; there is no procedural fallback.

Next

Full UMF reference · Reuse with kits · Make a stage · Wiki home

Remaking a M.U.G.E.N fighter as UMF

Recipe used for the Captain Marlow Reyes rebuild, based on the dissection of four fighters. It turns what a .cmd/.cns/.air pack does into data in one assets/chars/<id>.json. Art stays PNG only: a rebuild reuses the fighter's pixel-art frames and never draws a frame in code.

Steps

  1. Dissect the pack: cargo run --release -p mugen2umf -- inspect <dir-or-zip> for files, commands, states and controller counts, then ... hitdefs <dir-or-zip> for every HitDef.
  2. List the features, not the code: normals and chains, one projectile per button, anti-air, throw, counter, teleport, helper or clone, form or power mode, supers. Each one has a row in the mapping below.
  3. Pick the frames: only poses with a PNG in assets/chars/sprites/<id>/ (ls the folder, check meta.json). A frame given as an inline joint pose object is procedural art and is not allowed in anims.
  4. Write the anims as lists of {pose, ticks, hit?} with the tick counts from the dissection table, then the moves that use them. at is the one-based frame that carries the hit, projectile or velocity.
  5. Keep the first special a quarter circle plus x, and charge inputs on ground-only moves, because the roster smoke test and the real-input audit depend on both.
  6. Run the audits listed in Dev tools, then capture the move showcase and a browser smoke test.

Mapping from M.U.G.E.N to UMF

M.U.G.E.N patternUMF data
Statedef 200..610 with HitDefmoves[] with kind: normal, when, hits[].pausetime, hits[].hitstun
trigger = movehit, numhelper cancelscancels, rekka {after, window, contact}
Projectile with projhits, projpriorityprojectile {at, speed, hits, priority, removeTime}
Air fireball statedefAutomatic: every ground special gets an air state
~60$B,F,a charge"input": "~40$B, F, x" on a ground-only move
PosAdd p2dist x + 40 plus Turn (Shunpo)teleport: <frame> on the move, cost, invuln
ReversalDef / HitOverride counterparry {window}
TargetBind throwthrow {damage, bind, launch} or the cinematic throw.steps
Clone helper (Aizen)helpers.clones (count, maxActive, duration, attacks)
var(11) power mode (Kaio Ken)abilities.forms
SuperPause, AfterImage, EnvShakekind: super, fx, shake
Constants [Data]/[Velocity]stats (life, walk, run, jump, airJumps, airDashes)

Captain Marlow Reyes, rebuilt

What changed in assets/chars/marlow.json, all of it data:

ChangeSource of the idea
Every inline joint pose removed from the anims, 13 frames now use PNG poses (rs0, ws1, ws2, al1, mf1, str1, cjab0, jumpDown)Sprites-only rule
Light normals pause 6/7 with 12 ticks of hit stun, heavy normals pause 11/12 with 15Normal attack table of the four packs
tide_step (~D, DF, F, c, 200 power): teleports behind the opponent on frame 3, 58 damage, cancels into riptide or spoutAizen Shunpo and Kaname Flash Step; on the free c button (Aizen uses Z for his Shunpo) because D, D, a loses to the crouching normals and a half circle contains the quarter circles of the other specials
flurry (~D, DF, F, a): five light hits and a launching finisher while stepping forwardGoku SSJ 1050 rush
broadside (~B, F, x): three-hit projectile with priority 2, a quick back-forward motion instead of a charge because every special also gets an air version and the real-input audit cannot reach an air version of a 40-tick chargeGoku SSJ charge fireballs
helpers.clones Phantom Crew (F, B, F, 500 power, 300 ticks, one active): an autonomous copy that chases and jabs; a direction-only input because the summon block is compiled after every move, so any input that includes a button is taken first by a normal, and it only starts from the standing stateAizen clone (state 700)
stats.airDashes = 1Aizen and Gogeta air mobility

Art status: no new art was made. Marlow's frame set has gaps for a rush and a teleport (the poses are reused and retimed), so a dedicated flurry and tide_step frame set is the open art task for the person who recreates the sprites.

MUGEN to UMF conversion checklist

tools/mugen2umf (Rust crate, skill mugen-to-ume-migrator) migrates a M.U.G.E.N fighter to a UMF bundle with identical behavior. It no longer rewrites states as native UMF moves: the bundle carries the original data and the engine loads it through the same code as a M.U.G.E.N character (ume_engine::loader::assemble_mugen_char). See UMF Character for the format.

What is carried

AreaIn the bundle
States and controllersmugen.cns, mugen.st, mugen.stcommon verbatim (CNS and ZSS), including helpers, Statedef -2/-3, AI and custom throws
Commandsmugen.cmd verbatim: [Defaults], every [Command] and the Statedef -1 routes
Constantsparsed from the original [Data], [Size], [Velocity], [Movement] with the same localcoord scaling
Animationsmugen.anims: every action with offset, ticks, flip, blend and alpha, scale, angle, every Clsn1/Clsn2 box, loopstart
Spritesone indexed PNG per SFF sprite (same indices and palette), true color as RGBA, SFF order and duplicates kept for palette selection
PalettesSFF palettes (sffpal_<k>.png) and pal1.act..pal12.act: palette swaps and RemapPal/PalFX see the same colors
Soundsevery .snd entry as snd_g_i.wav
UMF-only fieldsprofile (country, nationality, origin, bio, title, fighting style, affiliation in en/pt/es), series, quotes, rivals: profile_facts gathers the facts, the skill writes, set_profile validates
Improvements--extra: move names (mugen.names), mugenRoutes for states the .cmd left without a command, new moves as scripts (CNS/ZSS) or as native UMF moves whose anim is a M.U.G.E.N action number

Proof

mugen2umf parity <original> <bundle> (also run by convert) compares:

  • data: states, commands, constants, animations, sprites (pixels and axes), indexed sprites and palettes, sounds, sizes;
  • behavior: every Statedef -1 command is played from its real input on the original and on the bundle, 150 ticks in the same match, and every tick of every fighter (state, animation, frame, position, velocity, control, life, power, helpers, sounds) must match.

The verdict is IDENTICAL or the first tick where they part. cargo test --release -p mugen2umf converts Kung Fu Man from assets/mugen/elecbyte.zip and requires IDENTICAL.

Limits

What the engine does not support from M.U.G.E.N is listed in the bundle's report.md (engine diagnostics). It affects the original and the bundle the same way: fix it in the engine, not in the converter.

Ability library

Reusable blocks for UMF fighters. A converted or hand-written fighter should name an ability and tune it, not re-write the controllers. The blocks are engine features (data fields) plus a built-in kit (abilities) with ready-made moves.

Gap map: what a M.U.G.E.N pack does and where UMF covers it

Pattern in the packUMF blockStatus
Fireball helper, Projectileprojectileexisting
Ki volley (several Projectile controllers, one per frame)projectile.repeatnew
Teleport behind or to the rival (PosAdd p2dist, Turn)blink (behind, front, above, back) and the older teleportnew
Charge flash, aura burst, Explod of an animationvfxnew
EnvShake outside a hitquakenew
Beam with many hits (projhits)projectile.hitsexisting
Flight (physics = N), clone helper, form (var flag)abilities.fly, helpers.clones, abilities.formsexisting
Rush with several HitDefshits[] plus moves[].velexisting
Helper with its own AI, Statedef -2/-3 logic, Lua/ZSSscripts, or stay in the legacy formatnot migrated

Move fields

{ "id": "salvo", "kind": "special", "anim": "arcbolt", "cost": 250,
  "blink": { "at": 2, "to": "behind", "gap": 36 },
  "vfx": [{ "at": 1, "anim": "boltHit", "offset": [0, -50], "time": 12, "follow": true, "scale": 1.5 }],
  "quake": [{ "at": 3, "time": 12, "amp": 2 }],
  "projectile": { "at": 3, "anim": "boltFx", "speed": [6, 0], "offset": [44, -78], "damage": 22,
                  "repeat": { "count": 5, "every": 1, "offsetStep": [0, 8], "speedStep": [0.4, 0], "damageStep": 0 } } }
FieldMeaning
blink (object or list)at frame, to = behind (turns around, default), front, above, back; gap distance in units (default 40); y vertical offset
vfx[]An Explod of an animation of the fighter on frame at: offset (default [0, -50]), time ticks (default: until the animation ends), follow binds it to the fighter, scale, behind draws it under the fighter
quake[]EnvShake on frame at: time (8), amp (4)
projectile.repeatFans one projectile into count (max 24): the k-th fires on frame at + k * every (default 2), shifted by k * offsetStep, k * speedStep and k * damageStep. A volley longer than the animation fires its tail on the last frame, so a fan needs no extra frames

vfx reuses animations the fighter already has (PNG frames). The engine never draws a frame in code.

Built-in kit abilities

A library kit: "extends": ["abilities"] adds nothing by itself; only the moves you list (by id or with use) enter the fighter. Moves: ki_blast, ki_barrage, beam, instant_transmission, blink_strike, power_surge. Each ships with sane numbers; change only what differs. projectile and blink merge field by field:

{ "extends": ["abilities"],
  "moves": [
    { "id": "volt_blink", "use": "instant_transmission", "name": "Volt Blink", "anim": "overclock", "input": "B, F, x", "blink": { "gap": 36 } },
    { "id": "arc_salvo", "use": "ki_barrage", "input": "~D, DF, F, a", "anim": "arcbolt",
      "projectile": { "anim": "boltFx", "hitAnim": "boltHit", "element": "lightning", "damage": 22 } }
  ] }

Always override anim (and projectile.anim) with the fighter's own animations: the template defaults use strong so the kit stays valid for every roster fighter. Tools that read a roster file without parse_char (some tests) do not understand extends; the roster fighters write the blocks out, and kits fit packs and mods.

Volta shows the data fields in assets/chars/volta.json (volt_blink, arc_salvo).

Converter

tools/mugen2umf maps Explod to vfx and EnvShake to quake (at most 3 and 2 per move), and matches command names case-insensitively, which MUGEN does and many packs rely on (SPECIAL 1 in the .cmd, "special 1" in the trigger). Before that fix a pack with such names kept only its normals: Goku SS4 went from 5 to 15 moves.

Rules of thumb

  • Repeating the same controllers in two moves is a missing block: add a field or a kit move instead.
  • A new block needs a unit test of the expansion and an engine test that runs it (crates/engine/tests/native_ability_blocks.rs).
  • Check every at against the animation length; the compiler does not stretch an animation.

Creating a UMF character

UMF (Ultimate Mugen Format) describes a whole fighter in one JSON file. The compiler (crates/native/src/compile.rs) generates commands, states, HitDefs, projectiles, super pause, cancels and hitboxes. The result runs on the same state machine as M.U.G.E.N characters.

How a move is defined

This is an excerpt of the jab entry from Kaito’s definition. It belongs in moves, and anim refers to an entry in anims.

{
  "id": "jab",
  "name": "Snap Jab",
  "input": "x",
  "kind": "normal",
  "anim": "jab",
  "hits": [{ "at": 2, "damage": 28, "level": "light", "hitstun": 13 }],
  "cancels": ["strong", "gale", "rise", "tide", "launcher", "overhead", "slide", "string_a"]
}

at: 2 selects the second animation frame. Each frame’s ticks value sets its duration at 60 simulation ticks per second. The compiler produces the input command, combat state and HitDef for damage and hit reaction. cancels lists the move IDs that can follow before the current animation finishes.

Step by step

  1. Copy a finished fighter as a base: cp assets/chars/kaito.json assets/chars/mine.json.
  2. Change id (unique, lowercase, no spaces), name, series, author and color.
  3. Optional: add the id to assets/chars/index.json to set its order in the select screen. Missing ones follow alphabetically.
  4. Run cargo run --release. build.rs embeds every .json in the folder into the executable.
  5. Test in Training with F2 on to see hitboxes and hurtboxes.

UMF fighters also load from a folder without recompiling: drop the .json in umf/ next to the game (or in mugen/umf/, or in the folder named by UME_UMF_DIR). Kit files in the same folder are registered first, whatever their names.

File skeleton

{
  "format": "umf/2",
  "id": "mine",
  "name": "My Fighter",
  "series": "My Series",
  "author": "you",
  "description": "Select screen text",
  "color": "#e85d2a",
  "winQuote": "Victory line",
  "intro": "Line said at round 1 start",
  "taunt": "Reply/provocation",
  "form": "Awakened form name",
  "boss": false,
  "speed": 1.0,
  "stats": {},
  "art": { "type": "sprites", "style": {}, "poses": {} },
  "palettes": [],
  "awakeningPalette": { "hair": "#f6c83e" },
  "anims": {},
  "moves": []
}
FieldRequiredDescription
formatyesumf/2 (umf/1 still loads)
extendsnoFighter or kit ids to inherit from, see Reuse. Required fields may then come from the parent
id, name, series, author, coloryesIdentity; color is the select card color
bossnotrue hides it from select and makes it the final Arcade boss
npcnotrue hides it from select and every random pool; used by Story mode thugs, no boss empowerment
profilenoNationality and biography, see Profile
speednoAnimation speed multiplier (>1 = faster moves)
statsnoAttributes, table below
artyesArt: style.colors drives palette recolouring of the PNG sprites, poses names the pose keys
palettesnoAlternate colors; each item overrides keys of art.style.colors
awakeningPalettenoColor overrides applied on top of the selected palette while awakened; effect sprites are unchanged
animsyesAnimations by name
movesyesMoves

Reuse: extends, use and kits

A fighter does not have to be written from scratch. Three tools remove the copy and paste that M.U.G.E.N packages need (see the numbers in M.U.G.E.N code study):

ToolWhereWhat it does
"extends": "kaito"top levelInherits everything from a loaded fighter or kit: stats, art, animations, moves. A list (["kaito", "storm-kit"]) layers several, left to right.
"use": "gale"inside a moveClones another move (from a parent or from an earlier move of the same file) under a new id, changing only the fields you write.
kit file"format": "umf-kit/1"A partial definition (moves, animations, poses, stats) with an id, shared by many fighters. core is built in and carries the universal launcher and escape_burst.

Rules of the merge, applied by crates/native/src/kit.rs before the normal UMF parser runs:

  • Objects (stats, art, abilities, passives) merge key by key, so "stats": { "life": 1080 } changes one number. An animation in anims replaces the inherited one as a whole. A value of null removes the inherited key.
  • moves are matched by id. An entry with only some fields keeps the rest ({ "id": "gale", "name": "Crimson Gale" }), a bare string ("launcher") lists an inherited move unchanged, and { "id": "slide", "remove": true } drops one. Moves you list come first, in your order; inherited moves you did not mention follow.
  • Identity is personal: name, author, description, profile, boss and npc are never inherited from a fighter.
  • spriteSet lets the new fighter reuse the parent's pixel-art pack. Recolour it with palettes and leave art.style.colors inherited: those are the reference colours of the pack.
  • Mistakes name the culprit (unknown kit or fighter, move x uses y, which no kit or earlier move defines), and extends chains deeper than 8 are rejected.

A complete fighter in 20 lines (docs/examples/umf/mika.json, which inherits a 39 KB definition and the kit storm-kit.json):

{
  "format": "umf/2",
  "id": "mika",
  "name": "Mika Arashi",
  "author": "Ultimate MUGEN",
  "color": "#b8433a",
  "extends": ["kaito", "storm-kit"],
  "spriteSet": "kaito",
  "stats": { "life": 1080, "attack": 104 },
  "palettes": [{ "top": "#b8433a", "trim": "#6a1e1a", "hair": "#1a1a22" }],
  "moves": [
    { "id": "gale", "name": "Crimson Gale" },
    { "id": "squall", "use": "gale", "name": "Squall Volley", "input": "~D, DF, F, x+a", "cost": 500, "fx": "aura" },
    { "id": "slide", "remove": true }
  ]
}

Try it with UME_UMF_DIR=docs/examples/umf cargo run --release.

Profile (nationality and biography)

Every fighter has a nationality and a short biography, written in English (en), Brazilian Portuguese (pt) and Spanish (es). A missing language falls back to en.

"profile": {
  "country": "jp",
  "nationality": { "en": "Japanese", "pt": "Japonês", "es": "Japonés" },
  "bio": { "en": "Two short sentences.", "pt": "Duas frases curtas.", "es": "Dos frases cortas." }
}
  • Built-in fighters, the final boss and the Story mode thugs keep their profiles in assets/char_profiles.json, keyed by id. A profile field inside the fighter file wins over that table, so imported UMF fighters carry their own.
  • country picks the flag drawn next to the nationality: jp, br, no, us, cn, es, mn, de, kr, ar, au, ru, fr, plus the fictional underworld and eclipse. Flags are vector shapes in src/flag/designs.rs (no image files); add a new entry there for another country. An unknown code simply shows no flag. UME_SHOTS_ONLY=flags saves a sheet with every flag.
  • The flag appears on the roster tile, on the fighter card, in the profile strip under the roster and on the Story mode stage card.
  • Keep each biography under 260 characters: it must fit two lines of the select screen.
  • tags is an optional list of fighting-style tags ("tags": ["rushdown", "zoner"]). The select screen shows up to three as chips under the roster. Known keys are translated (rushdown, grappler, zoner, balanced, aerial, trapper, counter, power); any other key is shown uppercased (storm-caller becomes STORM CALLER). The list lives in src/profile_tags.rs.
  • The select screen shows the nationality and the biography of the highlighted fighter under the roster (thugs and the boss appear with the Bosses filter). The Story mode stage card shows the profile of the stage boss.
  • Fighters without a profile (M.U.G.E.N content) keep showing description.
  • cargo test --release -p ultimate-mugen profile checks that every fighter file of assets/chars has a complete profile in the three languages.

stats

FieldExampleMeaning
life1000Life
power3000Max super meter (1000 per level)
attack / defense100Multipliers in %
walk[2.4, 2.2]Forward / backward walking speed
run[5.2, 4.6]Run forward / back hop
jump[-8.4, -2.5, 0, 2.6]Vertical speed, horizontal back, neutral and forward
gravity—Vertical acceleration
airJumps—Extra air jumps
airDashes1Air dashes per jump (movement.airdash.num)
height100Body height
width[16, 15]Front / back width for pushing

anims

Each animation is a list of frames:

"jab": { "frames": [
  { "pose": "jab0", "ticks": 3 },
  { "pose": "jab1", "ticks": 3, "hit": { "part": "handR", "radius": 10 } },
  { "pose": "jab0", "ticks": 5 }
], "loop": 0 }

A frame with only a pose and a tick count can be written as "pose*ticks", and both forms mix in one list:

"jab": { "frames": ["jab0*3", { "pose": "jab1", "ticks": 3, "hit": { "part": "handR", "radius": 10 } }, "jab0*5"], "loop": 0 }

Run node scripts/umf2-migrate.mjs before committing a shipped fighter: it writes the canonical layout that CI checks. See ADR 0007. The format is also a JSON Schema checked in CI: UMF schema.

Frame fieldDescription
poseName of a pose in art.poses, or an inline pose object
ticksDuration in ticks (60 per second); -1 = forever
hitActive hitbox: part (limb or weapon) + radius, or box [x1, y1, x2, y2]
hurt"none" removes the hurtbox (invincible frame)
effectDraws an effect instead of the body (projectiles, sparks), see Effect frames
offsetDrawing offset [x, y]
loopFrame index where the loop restarts

How an attack frame becomes a hit box

Frames drawn from pixel sprites take their strike box from the explicit box when given, otherwise from a standard box seeded by the hit part (low for feet and knees, high for the head, middle otherwise) and radius, trimmed to the sprite silhouette. The compiler then reshapes it to the proportions measured on 605 M.U.G.E.N characters (native/pixel_hit.rs, H = standing height, 96 units for height 100):

  • like a M.U.G.E.N Clsn1, the box spans from the body to the tip: it starts at most 0.10 H in front of the origin and reaches at least 0.60 H (the M.U.G.E.N median for punches is 0.72 H, kicks 0.80 H);
  • at least 0.36 H tall and never above 0.95 H or below the floor (M.U.G.E.N punches sit between -0.75 H and -0.33 H, kicks down to -0.05 H);
  • the standing hurtbox is 0.46 H wide (M.U.G.E.N median 0.46 H) and the crouching one 0.67 H tall (M.U.G.E.N median 0.67 H);
  • an explicit box is used as written, so keep it inside those proportions; the audit fails otherwise.

cargo test --release -p ume-engine --test it native_hitbox_audit:: checks every strike frame of the roster (height, reach, start, width, above the head, under the floor), and native_normal_reach prints and compares the reach and damage of the four stand normals of every fighter.

Standard names

Animations with these names become the reserved M.U.G.E.N actions, so the common states work with no extra code.

NameActionNameAction
idle0guardHit150
turn5crouchGuardHit152
crouchTurn6airGuardHit154
crouchStart / crouch / crouchEnd10 / 11 / 12lose / draw / win170 / 175 / 181
walk / walkBack20 / 21intro190
jumpStart / jumpUp / jumpFwd / jumpBack / jumpDown40–44taunt / powerUp195 / 196
land47defeat1…defeat4197–200
run / hop100 / 105hitLight / hitMedium / hitHeavy5000–5002
guardStart / crouchGuardStart / airGuardStart120–122hitLowLight / hitLowMedium / hitLowHeavy5010–5012
guard / crouchGuard / airGuard130–132hitCrouch / hitAir5020 / 5030
guardEnd140airRecover / fall / trip5040 / 5050 / 5070
bounce / bounceAir / lieDown / getUp / dead5100 / 5101 / 5110 / 5120 / 5150

taunt, powerUp and defeat* have default versions if you do not define them. Other names get free numbers in file order.

moves

{ "id": "gale", "name": "Wind Wave", "input": "~D, DF, F, x", "simple": "sp1",
  "kind": "special", "anim": "gale", "invuln": [1, 3],
  "moves": [{ "at": 2, "vel": [2, -9] }],
  "hits": [{ "at": 2, "damage": 90, "level": "heavy", "launch": true }],
  "projectile": { "at": 3, "anim": "galeOrb", "hitAnim": "galeHit", "speed": [5, 0], "offset": [40, -60], "damage": 70 } }
FieldValuesEffect
id, nametextIdentifier and name in the move list
inputcommand syntax, belowCommand
simplesp1 sp2 sp3 superOne-button shortcut (keys 1/2/3, touch)
kindnormal special superPriority and cancels: normal → special → super on hit or guard
whenstand (default) crouch airState the move starts from
animname in animsMove animation
hitslistOne HitDef per item
moves[{ "at": frame, "vel": [x, y] }]VelSet on the frame; use null to keep an axis
projectileobject or listProjectiles
costnumberMeter spent; super defaults to 1000
invuln[start, end]Invincible frames
teleportframe, object, or list of { "at", "mode", "offset", "turn" }Single or multi-step warp (behind, front, above, or fixed offset [x, y]); exits cleanly to state 50 when ending airborne (Pos Y < 0)
fxauraExtra visual effect
explods[{ "at", "anim", "pos", "postype", "bind", "removeTime", "priority", "scale", "superMove" }]Spawns visual effects (ki charge spheres, auras, super overlays)
afterimage{ "at", "time", "length", "framegap", "trans", "palBright", "palContrast", "palAdd", "palMul" }Customizes the afterimage trail
shake{ "at", "time", "ampl", "freq" } (object or list)Move-level screen shake (EnvShake)
flash{ "at", "time", "color", "under", "superMove" } (object or list)Screen flash / background darken (EnvColor)
superPause{ "at", "time", "pos", "anim", "darken" }Customizes the super freeze
velMul / velAdd[{ "from", "to", "x", "y" }]Multiplies or adds velocity every tick between animation elements from and to (to 0 = until the end). A velAdd in y is the move's own gravity, so native gravity is skipped there (VelMul, VelAdd)
posFreeze[{ "from", "to" }]Pins the fighter between those elements (PosFreeze)
posSet[{ "at", "x", "y" }]Sets the absolute position on an element (PosSet)
palFx[{ "at", "time", "add", "mul", "sinAdd", "color", "invertAll" }]Colour flash on the fighter (PalFX)
followUp{ "to": "move_id", "on": "hit" | "contact" | "hitNow" | "end" | "command" | "release", "command", "at" }Transition into a follow-up move: on hit-confirm, at the end, while command is held (command) or once it is released (release)
holdRelease{ "button": "y", "tiers": [{ "at": 0, "to": "move_id" }, { "at": 45, "to": "move_id" }] }Hold-to-charge: the move stays in its (looping) anim while button is held and, on release or when the anim ends, jumps to the tier with the largest at (ticks held) reached. Charge vfx explods are cleared on release
spawn[{ "at", "state", "id", "name", "pos", "postype", "facing", "ownPal", "superMoveTime", "pauseMoveTime" }]Spawns a helper running a scripts.cns state (Helper) on animation element at
cinematic{ "letterbox", "hideUi", "freeze", "title", "camera", "cuts", "finishSlow" }Multi-beat movie direction (Zoom, Camera, EnvColor, EnvShake, Cinema, SlowMo, AssertSpecial(NoBarDisplay))
voice1000, 0Character sound group and index played at move start, when that sample is bundled
airPhysicstrueKeeps air physics
cancelslist of move idsThis move may be cancelled into those moves on contact (hit, guard or projectile contact). Declaring it replaces the automatic gatling out of this move
throw{ "damage", "bind", "launch", "at" }Grab: see Combat traits
armor{ "hits", "threshold" }Absorbs hits while the move is active
parry{ "window": [from, to], "spark" }Returns attacks during the animation-element window
timestopticksFreezes everyone else
bursttrueCombo breaker usable while being hit
requires{ "life": {"max": 0.5}, "enemyLife": {"min": 0.1, "max": 0.5} }Life condition: the move only starts while the fighter's life (life) and/or the rival's (enemyLife) is inside min..max, as a fraction of max life (0 to 1). Either bound may be omitted. Compiles to life <= lifemax * max and enemy,life <= enemy,lifemax * max triggers
flighttrue8-way hover while the move lasts

Built-in kits (extends). Fighters can inherit reusable capabilities with "extends": ["core", "ki_fighter", "clone_arts", "aerial_rush"] (crates/native/src/kits/): core provides universal launcher and escape_burst; ki_fighter provides abilities.fly, abilities.teleport, abilities.superSpeed, abilities.charge (customizable auraColor, shake, sound, explod) and a multi-hit ki_beam template (missTime, hitflag); clone_arts attaches autonomous shadow clones (helpers.clones); aerial_rush adds flight, super speed and double air-jump.

Finisher. A move with "kind": "finisher" (use throw or hits for the effect) is only available after a KO (RoundState = 3 and WinKO). When the final round ends by KO and the winner has a finisher, the round waits up to 6 seconds on "FINISH HIM" for the winner to perform it; performing it (or the timeout) ends the wait. Rosters with no finisher are unaffected.

Ultimate. A move whose id starts with ult_ is the fighter's ultimate, and every native fighter declares one (the command is ~D, DF, F, D, DF, F, x+y). The compiler spends the whole meter on it: cost defaults to 3000 (the three bars drawn by the HUD), the move gets a 70 % damage bonus where a normal super gets 30 %, and its super freeze lasts 75 ticks instead of 55. cargo test --release -p ume-engine --test it native_ultimates:: fails when a fighter has no ultimate, when the cost is not three bars, when the ultimate does not start from its command or drains the meter, or when the measured damage is below 380 or not above every one of the fighter's supers.

Combat traits

  • Automatic gatling. A move without cancels follows the genre rules: a normal cancels into any stronger normal (light < medium < heavy by the strongest hit level, ties by declaration order, so strings can never loop), ground normals link into crouching ones, air normals chain with air normals, and every normal cancels into every special and super on contact. Specials cancel into other specials only through explicit cancels; supers cancel out of any move.
  • Explicit routes. "cancels": ["strong", "rush"] on jab makes strong and rush accept jab on contact. A projectile special can be cancelled once its projectile touches the opponent. An air special may start from a ground launcher that lists it (uppercut, then dive).
  • throw (damage, bind [x, y] in front of the thrower, launch [vx, vy], at = grab frame, default 1). The grab HitDef fires on animation element at (give that frame a hit box), the victim is held on at + 1, takes the damage on at + 2 and is launched, so the animation needs at least at + 2 frames. Throws ignore guarding and whiff when the target is out of reach.
  • armor (hits absorbed, optional threshold = damage above which the armor breaks). From move start until the last hit frame the move takes 35 % chip damage and is not interrupted; once hits are spent the next hit staggers normally.
  • Multi-hit glue. Moves with three or more hits push the target away only a little on every hit except the last (so the whole string connects) and piercing projectiles (4+ hits) do not shove the target out of the beam. Set knockback explicitly to opt out.

Validate with cargo test --release --test it native_roster_lab:: -- --nocapture (every attack state must connect; prints damage and reach per move), --test it native_combo_routes:: (every declared cancel chains end to end) and python scripts/audit_native_moves.py.

hits[]

FieldDefaultDescription
at—Frame (1 = first) where the HitDef activates
damage—Damage
guardDamagedamage / 8Damage on block
levelmediumlight (hitstop 9, hitstun 12), medium (11, 16), heavy (13, 20)
guardmidhigh, low, mid or unblockable
knockback / airKnockbackby levelVelocity [x, y] applied to the opponent
launchfalseKnocks down
hitstop, hitstun, spark, shakeby levelFine tuning

projectile

FieldDescription
atFrame it is fired on
anim / hitAnimFlight / impact animation
speed / accelVelocity and acceleration [x, y]
offsetSpawn position [x, y] relative to the fighter
damage, level, launch, knockbackAs in hits
hitsNumber of hits
removeTimeTicks until it disappears
priorityPriority against other projectiles

Elements and stun

hits[] and projectile accept element (fire, ice, lightning, earth, wind, water) and stun (extra hit-stun ticks). The compiler adds the element's hit-stun and shake and tints the victim for a moment (PalFX): ice freezes longest (+16), lightning shocks (+22 and a 8-tick shake), fire burns red, earth shakes the screen, wind and water add a short tint. stun stacks on top and adds a 5-tick shake when none is set. Unknown elements are ignored.

hits[] and projectile also accept ownSound: true: hitSound then plays from the fighter's own sound bank (S prefix in M.U.G.E.N) instead of the common fight bank.

Command syntax

SymbolMeaningExample
F B U D / DF DB UF UBDirections (relative to facing)D, DF, F, x
x y z a b cButtons (s = start)x
,In sequenceF, F
+At the same timex+y
~Release~D, DF, F, x
/Hold/B, F, x
$Inclusive direction ($D accepts DB, D, DF)$D, x
>No other input between stepsF, >F
NNeutral direction (no direction held)N, x

Power normals (Punch 3 and Kick 3)

Every native fighter that does not declare a move bound to z or c gets four extra normals at compile time (native/power_normals.rs): power_punch and crouch_power_punch on z (default key E, shown as Punch 3), power_kick and crouch_power_kick on c (default key D, shown as Kick 3). Each one reuses the animation, timing, guard height and cancels of the fighter's heaviest ground normal of that family (y then x for punches, b then a for kicks, crouching variants take the crouching normal), named <base name> Max. Hits deal 130 % damage, are promoted to heavy, gain 4 hit-stun and 2 hit-stop ticks when those are set, and push 25 % harder. Moves that cancel into the base normal also cancel into its power version, and the new moves appear in the pause move list. Declare your own z or c move to opt out. Air versions are not generated here.

All native fighters also receive two down-light-kick normals at compile time (native/low_normals.rs): lowkick on D+a while crouching and airlowkick on D+a in the air. They use the character's existing crouch-light-kick and air-kick animations, respectively, keep their pixel-art frames, and use low guard. The aerial version moves forward and downward to close short gaps. A fighter that already declares a move with the same id or D+a state/input keeps its authored move.

Energy charge (every fighter)

Every native fighter can charge its meter: hold R (the s / Start input; the pause key in a fight is Esc or P). The fighter enters state 3920, plays its powerUp animation on a loop with a blue glow and gains 9 to 48 power per tick (native/charge_ramp.rs, filling a 1000-power super in about one second) until the button is released (after at least 6 ticks) or the meter is full. The state is movetype = I, so a hit interrupts it, and a form-capable fighter still transforms with T once the meter reaches the form cost. The command is charge_cmd (/s) and shows as Charge Energy in the move list. The built-in AI charges only at level 3 or above, with less than 700 power, when the rival is more than 190 units away and is not attacking.

taunt, powerUp and defeat* have default versions if you do not define them. Other names get free numbers in file order. Add "id": 8801 to any animation entry to pin a fixed action number for custom scripts or p2Anim.

Exotic mechanics (helpers, cinematic throw, bossRules, scripts)

Every Ikemen GO / M.U.G.E.N expressive pattern works declaratively inside a single UMF JSON without editing Rust:

SectionReplaces in M.U.G.E.N / ZSSKey capabilities
helpers.standManual Helper(keyctrl=1) + BindToParent + HitOverrideIndependent hitbox/hurtbox Stand fighting alongside parent (input or triggerMove), toggle summon/recall, optional meter drain, lifeTransfer to parent via ModifyPlayer
helpers.clonesManual AI clone HelpersKage Bunshin autonomous clones (count, maxActive, duration, walkSpeed, attackRange, oneHitPoof), chase + random AI attack selection, camera freedom (ScreenBound movecamera = 0, 0)
moves[].throw (cinematic)Custom TargetState + ChangeAnim2 choreographyp2Anim (ChangeAnim2), cameraFree, camera (zoom, pos, delta, delay, bound, time, lag, freeze, hideUi, bars), beat-by-beat steps[] (at, bind, anim, p2Anim, p2State, damage, shake, facing, launch, camera, flash, sound, slowmo, invert), auto !GetHitVar(IsBound) failsafe
moves[].cinematicMovie direction on attacks & supersletterbox, hideUi, freeze, title, camera, cuts[] (keyframes for zoom/pan, flash, shake, slowmo, invert, bars, lines, darken, text) and finishSlow; emits Zoom, Cinema, SlowMo, AssertSpecial, EnvColor & anime Cut-In
bossRulesUI-breaking [StateDef -4] AssertSpecial / Text / ModifyPlayerhideHud, hideLifeBar, hidePowerBar, hideTimer, freezeTimer, continuous or triggered HUD texts[], modifyPlayer[] (self or "enemy"), phases[] (lifeBelowRatio, when, once, attackMul, defenceMul)
scriptsRaw .zss / .cns files ([StateDef -4], map())Inline zss and/or cns strings (supports [StateDef -4] running even during SuperPause, map(k) := v, teamMap(k) := v), custom commands[], and @anim(name) / @move(id) macro expansion

In-game and CLI Debug Tool

  • In-game (F2): renders translucent-filled Clsn1/Clsn2 boxes, amber pushbox, pivot crosshairs, velocity vectors, helper/target link tethers, stage bounds, top toolbar, and a 4-tab inspector (F4: Overview / Vars & Maps / Clipboard & HitDef / Console & Engine); F5 freezes simulation; F6 or . advances +1 frame; F7 cycles speed (1x/0.5x/0.25x/0.1x); F8 cycles box layers.
  • CLI: cargo run --release -p ume-devtools --bin ume-tools -- debug-fight <char1> [char2] [--frames N] [--only-moves] [--json] prints per-move frame data (startup, active, recovery, reach), clipboard, console, warnings, and cinematic events.

Air abilities (every special and super)

Every special and super with when unset or "stand" also gets an air version (state 20000 + ground state, label State -1, air <name>), entered with the same command while the fighter is airborne. The fighter hovers at the start of the move (drift kept at 40 %), gravity returns at 45 % after 12 ticks, the move ends into the jump fall state (50) with control, and touching the ground interrupts it with the landing state (52). Air versions deal 70 % of the ground damage, projectiles leave angled down (slope 0.85) so they reach a grounded rival, and each jump allows one air special (var(57), cleared on landing). Throws, flight moves and moves that declare when: "crouch" or "air" keep their own rules.

Pixel-art sprites (optional)

If assets/chars/sprites/<id>/ exists, the fighter is drawn from PNG files, the same way M.U.G.E.N fighters are drawn from sprites. Use transparent PNGs facing right, with the feet on the bottom edge and the same canvas size (400×400 RGBA) for every file of one fighter. Generate missing combat PNGs using generate_image with a validated canonical pixel-art anchor of that fighter (procedural or code-generated fighter art is forbidden).

FilePoses that use it
01_idleidle0, walk, run, crouch, guard, jump and every pose with no art of its own
02_attack1 … 06_victoryjab / punch, kick, special, projectile and victory / taunt poses
07_idle1, 08_idle2the other breathing frames of idle (idle3 reuses 07_idle1)
09_hit1, 10_hit2, 11_hit3hitH1, hitH2, hitH3 (damage)
12_fall1, 13_fall2hitAir1/fall1/trip and hitAir2/fall2/bounce (knocked into the air)
14_lielie, dead, lose and every df* pose (knocked out, with a low and wide hurt box)
15_power0, 16_power1, 17_power2powerup0, powerup1, powerup2 (transformation, key T)

meta.json holds {"refHeight": N}: the height in pixels of the standing body in 01_idle.png. Every pose of the fighter is scaled so that body is 100 units tall, so a lying or crouching sprite keeps the same pixel size. Without it each PNG is scaled to 100 units by its own height.

When awakeningPalette overrides hair, each sprite's frames.<stem>.awakeningHair supplies [left, top, right, bottom] in source pixels. Hair recoloring is confined to that rectangle; sprites without one retain their original hair. Web packing rescales these coordinates with the sprite.

Palette entries also apply to these PNGs: each pixel is matched to the shading line of a colour declared in art.style.colors, and the matching palette colour replaces it at the same shade. A palette key with no matching art.style.colors entry, or a colour nothing in the art resembles, is left untouched.

The web build does not read this folder from disk. scripts/build-web.sh runs ume-tools pack-sprites (crates/devtools), which writes one assets/chars/sprites/<id>.pack per fighter (images capped at 768 px, 256 colours stored as LZ4 sprites, see Sprite Container, meta.json anchors rescaled) into web/dist; the browser fetches a pack when the fighter is focused on the select screen or loaded for the fight, and the engine reads it through the same virtual folder. A failed download leaves the fighter without art, so the match waits for the pack and reports the failure.

Validate

cargo test --workspace --release

Review fighter art with ume-tools audit-sprites, which lists missing and reused poses, or in the game itself.

Browser sprite packs load asynchronously. A newly downloaded or replaced pack invalidates the affected native fighter’s cached previews and all palettes; other fighters keep their caches. Match loading waits for the chosen built-in fighters’ packs and reports download failures rather than starting with a cached procedural fallback. Imported native definitions without a bundled pack remain supported.

Share a fighter as a pack

A zip (or a mugen/ folder) that holds one UMF .json next to a sprites/ folder with 01_idle.png, the pose PNGs and an optional meta.json (axisX, axisY, refHeight per pose) is imported as a native fighter, with no .def. The marketplace installs it like any other pack. Goku SSJ4 UMF is the reference example.

M.U.G.E.N parity (exact migration)

tools/mugen2umf convert turns a M.U.G.E.N folder or zip into such a pack with identical behavior. The json carries a mugen block and art.type: "mugen":

  • mugen.cns, mugen.st, mugen.stcommon, mugen.cmd: the original state and command files, verbatim.
  • mugen.anims: every AIR action by number, with sprite, offset, ticks, flip, blend and alpha, scale, angle and every Clsn1/Clsn2 box.
  • mugen.info, mugen.mugenVersion, mugen.localcoord: the original .def [Info].
  • mugen.names: optional move names for the move list, keyed by command name.
  • sprites/: one indexed PNG per SFF sprite (exact indices and palette), sffpal_<k>.png for the SFF palettes, pal1.act..pal12.act, every sound as snd_g_i.wav, and meta.json (axes, sizes and palette of each sprite in SFF order).

The engine builds the fighter from these with the same code as a M.U.G.E.N character (ume_engine::loader::assemble_mugen_char), so states, commands, constants, animations, palettes and sounds are the same. UMF fields (profile, series, quotes, rivals, scripts) are layered on top. mugen2umf parity proves it move by move.

Native moves work on top of an exact fighter: each anim (and projectile anim) names a M.U.G.E.N action number ("anim": "3000"), and the moves compile like those of a native fighter, with commands m_<id>, chains, throws, projectiles and air variants. Their states live in a block of 100000 numbers above the highest original state, and their Statedef -1 routes run before the original ones, so original states are never replaced. parity compares the exact part without them and lists them under "Added by UMF", played from their real input.

SFF v1 palettes follow M.U.G.E.N: in a shared-palette SFF (header palette type 1), a sprite flagged "same palette" uses the character palette (the selected .act), never the private palette of the sprite before it (usually the 9000 portrait). Individual-palette SFFs still inherit from the previous sprite.

Fighter element

The optional top-level element field accepts fire, ice, lightning, water, earth, wind or neutral. The fight HUD shows the assigned element beside the fighter portrait, with a localized text fallback. This metadata has no effect on damage or match rules.

UMF schema

docs/schema/umf-2.schema.json is the machine-readable definition of UMF 2 fighters and umf-kit/1 kits. It is a JSON Schema (2020-12) that mirrors the serde structs in crates/native/src and rejects unknown keys, so "hitz" or "lyfe" fails instead of being ignored by the loader.

Check a fighter

node scripts/umf-schema.mjs                       # every fighter, kit and example in the repository
node scripts/umf-schema.mjs path/to/fighter.json  # one file, e.g. a pack from mugen-assets

The validator is in-repo (scripts/umf-schema.mjs, no dependency). CI runs it through scripts/umf-schema.test.mjs in the release-scripts job, so a shipped fighter that breaks the schema fails the pull request. Errors name the JSON pointer: assets/chars/kaito.json: /moves/3/hits/0/level: "mid" is not one of ["light","medium","heavy"].

Use it in an editor

Add "$schema" to the fighter (the loader ignores it) or map the file in your editor settings. VS Code:

{ "json.schemas": [{ "fileMatch": ["assets/chars/*.json", "umf/**/*.json"], "url": "./docs/schema/umf-2.schema.json" }] }

What it covers

AreaDefinition
Identity and profileid (^[a-z0-9][a-z0-9_-]*$), profile with en, pt, es texts, element, alignment
stats, passives, abilitiesTyped numbers, fly, teleport, superSpeed, charge, forms
animsframes as "pose*ticks" strings or objects with pose, sprite, effect, hit, hurt, offset, ticks
moveskind, when, hits, projectile (one or list), cancels, rekka, throw, cinematic, explods, afterimage, shake, flash, superPause, followUp, blink, vfx, quake, velMul, velAdd, posFreeze, posSet, palFx
helpers, bossRules, scriptsStand, clones, boss phases, ZSS and CNS hooks
Kits and extendsA fighter with extends or format: "umf-kit/1" may omit the required fields; a move then needs only its id

art.poses and art.style are open objects: they belong to the sprite pipeline and the deprecated rig. The legacy top-level stage and country are allowed and ignored.

What it does not check

References between parts (an anim name that exists, a cancels id that exists, a PNG that exists) and the balance floor. Those stay in the Rust tests (native_quality_bar and the roster tests).

Changing the format

A change to a serde struct in crates/native/src must change the schema in the same pull request. Run node --test scripts/umf-schema.test.mjs: it fails when the schema rejects a shipped fighter, which is how a field added to the loader but not to the schema shows up.

Storage format

JSON for definitions and PNG for sprites were measured against MessagePack, CBOR, bincode, postcard, QOI, lossless WebP, LZ4 and atlases: see ADR 0008.

Passives

Native (UMF) fighters opt into passive systems through the passives object of their JSON. Nothing is hardcoded to a fighter name: M.U.G.E.N. characters and native fighters without these keys are not affected.

"passives": {
  "meterRegen": 0.35,
  "lifeRegen": 0.04,
  "rage": { "maxMultiplier": 4.0, "exponent": 1.0, "startRatio": 1.0, "fullRatio": 0.01 },
  "enrageTime": { "maxMultiplier": 5.0, "startSeconds": 15, "rampSeconds": 105, "exponent": 1.0 },
  "stacks": { "damageGain": 0.07, "defenceGain": 0.015, "speedGain": 0.015, "maxStacks": 10, "decayTicks": 420, "resetOnRound": true, "specials": true, "supers": true }
}

Regeneration

meterRegen adds power every tick and lifeRegen adds life every tick while a round is in progress (compiled into [Statedef -2]).

Rage (damage grows as life drops)

Used by Bruno. With r = life / lifemax:

progress   = clamp((startRatio - r) / (startRatio - fullRatio), 0, 1)
multiplier = 1 + (maxMultiplier - 1) * progress ^ exponent
KeyDefaultRangeMeaning
maxMultiplier4.01 to 6Damage multiplier reached at fullRatio
exponent1.00.25 to 41 is linear, above 1 stays low longer then ramps, below 1 ramps early
startRatio1.00.05 to 1Life share where the bonus starts (1.0 = from full life)
fullRatio0.010 to startRatio - 0.01Life share where the maximum is reached

With the defaults the curve is 1.0x at 100%, about 2.5x at 50%, about 3.7x at 10% and 4.0x at 1%. It is continuous: no steps.

Ability stacks (stronger with every special)

Used by Sylene. Each time the fighter enters a special state (1000 to 1999) or a super state (3000 to 3899), including the air variants (+20000), it gains one stack up to maxStacks (1 to 30). Normals, fly, teleport and super speed do not stack.

KeyDefaultEffect per stack
damageGain0.05Damage multiplier 1 + damageGain * stacks
defenceGain0Defence multiplier 1 + defenceGain * stacks (capped at 3x)
speedGain0Horizontal movement speed 1 + speedGain * stacks (capped at 1.5x, not applied while being hit)
maxStacks10Stack ceiling
decayTicks0When above 0, one stack is lost after this many ticks without gaining one
resetOnRoundtrueStacks are cleared when a round starts
specials, superstrueWhich move kinds count

Enrage over time (stronger the longer the fight lasts)

Used by Garan, the Ashen Oni. Damage grows with the time spent fighting in the current round. The counter runs only while the round is live (not during intro, KO or victory), stops when the fighter dies and restarts at every round.

progress   = clamp((fightSeconds - startSeconds) / rampSeconds, 0, 1)
multiplier = 1 + (maxMultiplier - 1) * progress ^ exponent
KeyDefaultRangeMeaning
maxMultiplier5.01 to 6Damage multiplier reached at the end of the ramp
startSeconds00 and upSeconds of fight before the bonus starts
rampSeconds60above 0Seconds from the start to the maximum
exponent1.00.25 to 41 is linear, above 1 ramps late, below 1 ramps early

Garan uses 15 s of grace and 105 s of ramp: 1x until 0:15, 3x at 1:07, 5x from 2:00.

Composition rule and cap

effective attack  = min(attackMul * rage * time * (1 + damageGain * stacks), max(attackMul, 8.0))
effective defence = defenceMul * superDefenceMul * (1 + defenceGain * stacks)

attackMul already contains the base stats.attack and the awakened or ascended form multipliers (PR #415), so every source multiplies. A time enrage of 5x alone is never clipped (even with a 1.3x awakened form it stays under the ceiling); combined with a full rage the 8x ceiling applies. The global ceiling is 8x the base damage; a fighter whose own attackMul is already higher (for example a M.U.G.E.N. AttackMulSet) keeps it. Without a rage or stacks key the original multipliers are used unchanged.

HUD and effects

  • A thin strip along the bottom of the health bar shows rage progress (orange to gold) and a row of pips shows stacks.
  • A second strip (violet to red) above the rage strip shows the time enrage progress.
  • The awakened-form aura is reused: it appears once rage or stacks pass 8% and grows with the largest of the three. Rage alone tints it red, time alone tints it violet.
  • Stack state is part of the netplay checksum.

Code

crates/engine/src/passives.rs (rules, state, Fighter::effective_attack), crates/native/src/passive_spec.rs (JSON), src/hud/passive_meter.rs, src/passive_fx.rs, crates/engine/src/passive_time.rs. Tests: crates/engine/tests/passives.rs, crates/engine/tests/passive_time.rs. Screenshots: UME_TOUR=passives ultimate-mugen --shots <dir>.

Rush Cancel

Every fighter (native UMF and M.U.G.E.N) can cancel a connected move into neutral by spending half a meter bar. It is the engine's universal combo extender: no character data is needed.

How to use

Press the energy key (R, the s / Start input) while the move you are performing has just hit or been guarded.

RuleValue
Cost500 power
Window1 to 45 ticks after contact (CONTACT_WINDOW)
Input bufferThe press is remembered for 6 ticks, so pressing a hair early still works
Cooldown40 ticks between cancels
Conditionmovetype = A, the move hit or was guarded, the fighter is alive and the round is running
Not allowedWhiffed moves, helpers, a fighter in the lying state, a frozen super pause

The same key still charges energy when you are idle: a fighter with control and no attack in progress charges as before. After a cancel the key is masked until it is released once, so holding it never turns the cancel into a charge.

What happens

  1. 500 power is spent and the fighter changes to the neutral state of its stance (0 standing, 11 crouching, 50 airborne) with control.
  2. The attacker's hit pause and shake are cleared and the air-dash counter is refilled, so the next normal, special or dash can start at once.
  3. Every rival that is in a hit or guard state receives 8 extra ticks of stun (VICTIM_STUN_BONUS), which is what lets the follow-up connect.
  4. The match drops into slow motion for 15 ticks, the fighter flashes blue and leaves an afterimage trail.
  5. Overdrive starts: for 150 ticks the fighter deals 20 % more damage (effective_attack, applied on top of passives and under their ceilings).

Whiff cancel

Pressing Start during a move that has not touched anything also cancels it, for a higher price. It needs 1000 meter (a Rush Cancel costs 500), works from 10 to 60 ticks into the move and shares the Rush Cancel cooldown. It returns control like a Rush Cancel but gives no Overdrive, no slow motion and does not count as a Rush Cancel. A move that has connected or been blocked still uses the cheaper Rush Cancel. Constants live in crates/engine/src/rush/whiff.rs (WHIFF_COST, WHIFF_MIN_TICKS, WHIFF_MAX_TICKS).

Dash cancel

A connected normal (jab through heavy, standing or crouching) can be cancelled into a forward or back dash by double tapping the direction within 20 ticks of contact, for 250 meter. It is cheaper than a Rush Cancel, does not trigger Overdrive and does not use the cooldown. It needs contact (hit or guard) and enough meter, so a whiffed normal cannot be dash cancelled. Code: crates/engine/src/rush/dash.rs.

Perfect guard

Pressing back within 6 ticks before a hit lands, with the guard not already held, makes the block perfect: no chip damage and the guard stun is a third shorter. Holding back early is a normal guard, and releasing back locks the window for 12 ticks, so mashing back does not work. It applies to grounded native fighters only and gives no meter (meter from guarding fed Shion's flight indefinitely). Code: crates/engine/src/rush/perfect.rs.

Chase

During a connected attack (normal, special, not a super), double tap up within 30 ticks of the hit to teleport next to a juggled enemy for 500 meter. You land in the air with control, 38 pixels from them and facing them, so air combos keep going after a launcher. It needs the enemy airborne and in hitstun, so it never works on a standing or guarding opponent. Code: crates/engine/src/rush/chase.rs.

Engine map

PieceFile
State, buffer, constantscrates/engine/src/rush.rs
The cancel itself (Match::rush_step, rush_ready)crates/engine/src/rush/cancel.rs
Cancel window query for the HUD (Match::rush_window: None when no cancel is possible, otherwise the share of the window left)crates/engine/src/rush/cancel.rs
"RUSH CANCEL" marker with a shrinking window bar under the lifebarsrc/hud/rush_marker.rs (UME_SHOTS_ONLY=rush captures it)
Event for the presentationEvent::Rush { fighter, side, guarded } in crates/engine/src/matchs/types.rs
Effects (rings, glow, sparks, tag, Overdrive embers)src/vfx/rush.rs
Rollback checksumoverdrive, cooldown and cancels in crates/netplay/src/checksum.rs
Testscargo test --release -p ume-engine --test it rush_cancel::

rush_step runs once per simulation tick after the input phase and is allocation-free (the afterimage trail only grows when a cancel happens). Everything is plain data on Fighter::rush, so Match stays Clone and replays and rollback are unaffected.

Combo Tiers and Energy Notch

The combo counter shows a tier badge under the hit count. Tiers are computed in src/hud/combo_tier.rs.

HitsBadge
3-5GOOD
6-9GREAT!
10-14SUPERB!
15+CLIMAX!!

A COUNTER! badge is drawn above the tier when the opening hit was a counter hit.

The energy bar has a notch at 500 power, the cost of a Rush Cancel.

Roster mobility and bounces

  • Suzume and Jin have stats.airDashes = 2.
  • Wall bounce: Suzume swallow, Jin gustdash, Kaito tempest, Garan ascent, Bruno bullrush, Shion cleave, Daichi daybreak.
  • Ground bounce: Garan brimstone, Daichi landslide.

Combo strings

Every native fighter (the 16 roster fighters and the 5 Story NPCs) has a signature three-part string on top of the shared gatling rules. Moves and animations are data only: each string_* animation is composed from the fighter's own jab, kick and strong frames (same poses, same hit parts, so sword users swing the weapon and brawlers use fists) with a per-fighter speed, hit count and recovery.

InputMove idRole
B+xstring_aOpener. Also reachable by cancelling jab on contact
B+astring_bMiddle link. Cancel from string_a on contact
B+ystring_cFinisher. Launch, wall bounce or ground bounce depending on the fighter; heavy fighters get one hit of armor

string_a and string_b cancel into string_c and into the fighter's two signature specials on contact, so every fighter has its own route. Examples:

FighterStyleRoute
Akio, Jin, Suzume, Phantom, RazorRushdown: three to four fast light hits, long advancestring_a > string_b > string_c > starburst/chakram/volley
Bruno, Brute, Colossus, ValdricHeavy: two slow hits, wall bounce finisher with armorstring_a > string_c > quake/ridgeblast/royallance
Kaname, Shion, Marlow, OboroBlade: weapon strikes, ice/water element where it fitsstring_a > string_b > frost arc/crescent/riptide
Garan, Sylene, Kaito, Volta, SpitfireElemental: every hit carries fire, ice, wind or lightning stunstring_b > string_c > element special
Garan, Lian, Jin, Suzume, Phantom, RazorGround-bounce finisher for a follow-up jugglestring_c

Validated by cargo test --release -p ume-engine --test it native_combo_routes:: (every declared cancel chains on contact), native_roster_lab and native_hitbox_audit.

Same-button mini combos

Pressing the same attack button again after a hit chains into the next move, with no extra direction needed. Each chain move is a normal with a rekka gate (after, window, contact: true), so it only fires from its source on contact and never from neutral. The chain animations reuse the fighter's existing sprites (same pixel art) in new orders and faster timings.

PressChain
xjab > jab2 > jab3 (finisher with small pushback, cancels into the two signature specials)
alkick > lkick2 > lkick3
ystrong > strong2
crouch xcjab > cjab2
air xajab > ajab2

Fighter speed (> 1 shortens every timed frame) and forward walk/run velocity were raised roster-wide; the final boss is scaled with it so it stays faster. Back-walk speeds are unchanged. Validated by cargo test --release -p ume-engine --test it native_same_button_chains::.

Projectile variants

Every roster fighter has a slow heavy and a fast low variant of its signature projectile, reusing the same effects: ~D, DB, B, y (slow, two hits, long range) and ~D, DB, B, x (fast, low, hits crouching foes). Fighters whose input is already taken use the first free of ~D, DF, F, y and ~D, DF, F, a.

Bleach-inspired kits

Three native fighters borrow abilities from Bleach characters. Names stay as they are: it is inspiration and copied abilities only. Everything is data in assets/chars/*.json; no sprites, stages or engine code changed, and new moves reuse each fighter's existing animations.

Kaname Fuyutsuki (Byakuya-style)

Noble, precise swordsman: fast steps, thin cuts, petals.

MoveInputIdea
Frostmoon Arc (frostarc)~D, DF, F, xBlade scattered into petals
Piercing Needle Beam (byakurai)~D, DF, F, yVery fast thin beam
Crimson Cannon (shakkaho)~D, DB, B, xHeavy red fireball, two hits
Flash Step Behind (shunpo_behind)D, D, aFlash step that ends in a cut
Thousand Petal Storm (kageyoshi)~D, DF, F, D, DF, F, ySuper: six-lane petal storm

Meter regeneration rises to 0.5.

Suzume Kagerou (Yoruichi-style)

Speed fighter: Lightning Palm (shunko, ~D, DB, B, y, three-hit teleport strike) and Flash Cat Burst (flash_cat, D, D, b). Stack speed gain rises to 0.04 per stack.

Shion Kurogane (Zaraki-style)

Brute with a greatsword: Reckless Reiatsu Swing (reckless, D, D, x, two-hit armor) and a rage passive from 50% life (up to 1.5x) on top of the existing time enrage.

Byakuren Sakuraba (Secret Story Mode Unlock — Full Byakuya-Inspired Fighter)

Unlocked automatically upon clearing Story Mode (stats.story.clear >= 1 in assets/routes/unlocks.toml). Features a dedicated sakura-blossom & black-shihakusho pixel-art sprite set (assets/chars/sprites/byakuren/), 6 original synthesized WAV sound effects (snd_200_0..5.wav), and exploits the full UMF 2.0 engine:

  • Core Abilities: Air-Walk (fly), Shunpo (teleport), Senka (superSpeed), Reiatsu Charge (charge), and Utsusemi autonomous petal clone (helpers.clones).
  • Kido & Shikai: Chire, Sakuramai (ground + air), Hadō #4: Byakurai, Hadō #33: Sōkatsui, Bakudō #61: Rikujōkōrō, Bakudō #81: Dankū, and Shunpo: Senka behind-teleport strike.
  • 2-Stage Bankai Transformations: Form 1 (Bankai: Mil Pétalas da Sombra — unlocks Kageyoshi: Petal Wave & Gokei: Blossom Dome) and Form 2 (Shukei: Hakuteiken — unlocks the 2-bar White Emperor ultimate).

Effect frames

Fighters are drawn only from pixel-art PNG sprites (assets/chars/sprites/<id>/). The only engine-drawn art left is the projectile and spark effects below.

A frame with effect draws an effect in place of the body. Use it for projectiles and sparks.

{ "effect": { "type": "slash", "size": 26, "color": "#ff3a5c", "color2": "#ffd0d8", "phase": 0 }, "ticks": 3 }
typeShape
orb (default), burstEnergy ball / explosion
dragonForward-facing energy dragon with a trailing body
beam (length)Horizontal ray
pillar (length)Vertical column
shockwaveGround wave
slash, wave, waterArc cut
kunai, shurikenThrowables
ice, fire, darkfire, lightning, petalElements

Without color, the effect uses the palette's energy color. The effect hitbox is generated from its shape.

CNS scripts

All fight logic, including UMF fighters, runs as CNS: states ([Statedef]), controllers ([State]) and triggers. To program a fighter by hand, use the M.U.G.E.N format (a folder with .def, .cns, .cmd) and put it in mugen/chars/.

Modern ZSS syntax (from Ikemen GO) is planned, compiling to the same bytecode.

.def file

[Info]
name = "My Fighter"
displayname = "My Fighter"
author = "you"
localcoord = 320, 240

[Files]
cmd = mine.cmd
cns = mine.cns
st = mine.st
stcommon = common1.cns
sprite = mine.sff
anim = mine.air
sound = mine.snd
pal1 = mine1.act

localcoord = 1280, 720 marks an HD character; the engine scales it automatically.

State example

[Statedef 1000]
type = S
movetype = A
physics = S
anim = 1000
ctrl = 0
velset = 0, 0
poweradd = 30

[State 1000, hit]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
damage = 90, 10
animtype = Heavy
guardflag = MA
pausetime = 12, 12
sparkno = 2
ground.type = High
ground.hittime = 18
ground.velocity = -5
air.velocity = -4, -6
fall = 1

[State 1000, end]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

And in the .cmd:

[Command]
name = "hadou"
command = ~D, DF, F, x
time = 20

[Statedef -1]

[State -1, hadou]
type = ChangeState
value = 1000
triggerall = command = "hadou"
trigger1 = statetype = S && ctrl

Command extras (Ikemen GO 1.0):

FeatureBehavior
N stepNeutral direction: no direction key held (command = N, x, ~D, N, x, N+x). A neutral step is a held state, like /, so it matches while no direction is pressed
pausebuffer[Command] (or command.pausebuffer in [Defaults]) keeps a command that fired during hit pause, hit shake or a pause/super pause active for that many extra ticks, so it can be read when the pause ends. Also accepted as buffer.pausetime. Default 0
Custom statesWhen a player runs a state owned by another character (TargetState, p2getp1state), Command is evaluated with the commands of the state owner against the input of the player in the state

Supported state controllers

AfterImage AfterImageTime AllPalFX AngleAdd AngleDraw AngleMul AngleSet AppendToClipboard AssertSpecial AttackDist AttackMulSet BGPalFX BindToParent BindToRoot BindToTarget ChangeAnim ChangeAnim2 ChangeState ClearClipboard CtrlSet DefenceMulSet DestroySelf DisplayToClipboard DizzyPointsAdd DizzyPointsSet DizzySet EnvColor EnvShake Explod ExplodBindTime FallEnvShake ForceFeedback GameMakeAnim Gravity GuardBreakSet GuardPointsAdd GuardPointsSet Helper HitAdd HitBy HitDef HitFallDamage HitFallSet HitFallVel HitOverride HitVelSet LifeAdd LifeSet MakeDust MapAdd MapReset MapSet ModifyExplod ModifyProjectile ModifySnd MoveHitReset NotHitBy Null Offset PalFX ParentVarAdd ParentVarSet Pause PlayerPush PlaySnd PosAdd PosFreeze PosSet PowerAdd PowerSet Projectile RedLifeAdd RedLifeSet RemapPal RemoveExplod RemoveText ReversalDef RootVarAdd RootVarSet ScreenBound SelfState SndPan SprPriority StateTypeSet StopSnd SuperPause TagIn TagOut TargetBind TargetDrop TargetFacing TargetLifeAdd TargetPowerAdd TargetState TargetVelAdd TargetVelSet Text Trans Turn VarAdd VarRandom VarRangeSet VarSet VelAdd VelMul VelSet VictoryQuote Width

Also supported: Zoom Camera Cinema SlowMo GroundLevelOffset Depth DepthBound ReversalDef HitOverride FallEnvShake RemapPal StopSnd SndPan VictoryQuote FinishDone ForceFeedback Offset Null DisplayToClipboard AppendToClipboard ClearClipboard. Limits of the lighter controllers: Offset shifts only the drawn sprite, never the collision boxes or the position; Null does nothing; VictoryQuote stores its value on the fighter for the win-quote presentation; ForceFeedback becomes a rumble event for the character (self = 1) or for its opponent; StopSnd and SndPan act on the sound channels the character started; DisplayToClipboard, AppendToClipboard and ClearClipboard keep the last 10 lines on the fighter (%d, %i, %f, %%, \n and \t in the text, up to 5 params).

Shake and sound notes: EnvShake (and the envshake.* / fall.envshake.* HitDef parameters) take dir: 0 (default) shakes the stage on both axes, 1 only horizontally and 2 only vertically; values above 2 count as 2. PlaySnd accepts stopongethit and stoponchangestate. A flagged sound is stopped when the player that started it is hit (or guards) or enters another state; a new PlaySnd on the same channel replaces the previous flags, and StopSnd stops the channel as usual. The flags travel with the sound event, so the engine only reports them and the front end does the stopping.

Explod notes: ignorehitpause defaults to 1 (set 0 to freeze with the owner's hit pause). postype = left/right/front/back and space = screen keep the explod fixed on screen while the camera moves. ModifyExplod accepts vel, accel, pos, scale, bindtime, removetime, sprpriority, ontop, under, removeongethit, ignorehitpause, facing, vfacing, supermovetime, pausemovetime and trans; facing is relative to the owner. ExplodBindTime only changes the bind time.

Palette effects stack in this order: the stage BGPalFX, then AllPalFX, then the fighter's own PalFX. They apply on the tick they change (no extra frame of latency), and a Sub trans skips the palette tint while additive trans keeps it. hue (degrees) rotates colours around the grey axis and sinhue oscillates that rotation using the sinadd period; both work on the three palette controllers.

Sound channels: PlaySnd accepts loop, loopstart/loopend (milliseconds), loopcount (0 = endless), stopongethit, stoponchangestate, pan/abspan, volumescale and freqmul; ModifySnd retunes channel, pan, volumescale and the loopstart/loopend of a live channel. Unsupported music formats log a warning and fall back to the built-in track (tracker formats are rejected by design, see compatibility decisions).

HitDef life-system parameters: redlife is subtracted from the defender red life (the band between Life and RedLife is the part of the damage it does not cover), dizzypoints and guardpoints drain the dizzy and guard meters (zero sets Dizzy/GuardBreak and enters the dizzy state 5300 or the guard-break state 5400, see Life systems), score feeds the attacker and defender scores, sparkscale scales the hit spark, missonoverride shows a MISS text when a HitOverride absorbs the hit, unhittabletime grants the defender invincibility for N ticks (the countdown pauses during hit pause) and xaccel drifts the defender horizontally while in the hit state. attack.depth is parsed and ignored (the engine is 2D). p2clsncheck = 0 lets the hit connect without defender boxes and p2clsnrequire = n requires the defender's Clsn2 box n (index -1 = any).

Helper notes: a helper freezes during Pause and SuperPause unless it has pausemovetime / supermovetime ticks left or was spawned with pausebool = 1, which makes it ignore every pause. Helpers with keyctrl = 1 only receive their root's commands while the round is being fought; once the round is decided they get none. A helper runs its own -1 (only with keyctrl = 1), but never the root's -2 or -3. On the victory screen (round state 4) helpers are frozen and hidden.

Ikemen, stage and player controllers

PlayBGM StopBGM ModifyBGM ModifyStageVar ModifyStageBG ModifyBGCtrl ModifyPlayer PrintToConsole RunState Height GetHitVarSet ModifyHitDef ModifyReversalDef OverrideClsn ResizeClsn TransformClsn TargetAdd TargetScoreAdd TargetRedLifeAdd TargetDizzyPointsAdd TargetGuardPointsAdd ScoreAdd RoundTimeSet RoundTimeAdd AssertCommand AssertInput ShiftInput RemapSprite TransformSprite MatchRestart

Missing (planned or rejected by design, parsed and ignored with one warning): Storyboard RemoveStoryboard Dialogue SaveState LoadState LifebarAction ChangeMovelist LoadFile SaveFile ShaderSet

Their parameters and behaviours are listed in Ikemen extensions.

Supported triggers

Abs ACos AILevel Alive Anim AnimElem AnimElemNo AnimElemTime AnimElemVar AnimExist AnimLength AnimPlayerNo AnimTime ASin ATan AuthorName BackEdge BackEdgeBodyDist BackEdgeDist BottomEdge CameraPos CameraZoom CanRecover Ceil Clamp ClsnOverlap ClsnVar Command Cond Const Const240p Const480p Const720p Cos Ctrl DisplayName Dizzy DizzyPoints DizzyPointsMax DrawGame E Exp ExplodVar facing Floor Form FrontEdge FrontEdgeBodyDist FrontEdgeDist FVar form GameHeight GameTime GameWidth GetHitVar GuardBreak GuardPoints GuardPointsMax HelperIndexExist HelperName HelperVar HitCount HitDefAttr HitFall HitOver HitPauseTime HitShakeOver ID IfElse IkemenVersion Index InGuardDist InputTime IsHelper IsHomeTeam LeftEdge Life LifeMax Ln Log Lose LoseKO LoseTime MajorVersion Map MatchNo MatchOver Max Min MoveContact MoveGuarded MoveHit MoveReversed MoveType MugenVersion Name NumEnemy NumExplod NumHelper NumPartner NumProj NumProjID NumTarget NumText P1Dist P1Name P2BodyDist P2Command P2Ctrl P2Dist P2Life P2MoveType P2Name P2Power P2StateNo P2StateType P3Name P4Name P5Name P6Name P7Name P8Name PalFXVar PalNo ParentDist Physics Pi PlayerIDExist pos Power PowerMax PrevStateNo ProjCancelTime ProjClsnOverlap ProjContact ProjContactTime ProjGuarded ProjGuardedTime ProjHit ProjHitTime ProjVar Random RandomRange RedLife RightEdge RootDist RoundNo RoundsExisted RoundState RunOrder ScreenPos SelfAnimExist SelfCommand Sign Sin SpritePlayerNo SpriteVar Sqrt Standby StateNo StateTime StateType SysFVar SysVar Tan TeamMap TeamMode TeamSide TicksPerSecond Time TimeMod TopEdge UniqHitCount Var vel Win WinKO WinPerfect WinTime AirJumpCount Alpha Angle BotBoundBodyDist BotBoundDist Const1080p HitByAttr HitDefVar HitOverridden HitVel InCustomAnim InCustomState InRunState IntroState IsAsserted JugglePoints LastPlayerID LayerNo LocalCoord MemberNo MoveCountered MoveHitVar NumPlayer NumStageBG OutroState ParentExist PlayerIndexExist PlayerNo PrevAnim PrevMoveType PrevStateType Scale ScreenHeight ScreenWidth SelfStateNoExist SprPriority StageBackEdgeDist StageBGVar StageConst StageFrontEdgeDist StageVar TeamLeader TeamSize TopBoundBodyDist TopBoundDist XAngle XShear YAngle ZoomVar Attack Defence AttackMul DefenceMul ReceivedDamage ReceivedHits ComboCount Score ScoreTotal Round RoundTime TimeRemaining TimeElapsed TimeTotal FightTime RoundsWon FirstAttack DecisiveRound

form returns the active native UMF transformation form index (0 for the base form); legacy M.U.G.E.N characters evaluate it as 0.

Projectile notes: a projectile records its team side and its root player when it is spawned. Turning, or the owner changing side afterwards, does not change whom it can hit. NumProj and NumProjID count every projectile of the player's root, including the ones its helpers fired, and keep counting them after the helper is destroyed. A projectile whose helper is gone still hits and is credited to the root.

Missing (planned): PlayerID.

Screen edge triggers

LeftEdge and RightEdge are absolute: they always return the left and right screen edges. FrontEdge and BackEdge depend on Facing: a right-facing player reads FrontEdge = RightEdge and BackEdge = LeftEdge, a left-facing player reads the opposite. All four are in the player's localcoord units and use the same edges as FrontEdgeDist and BackEdgeDist, so (FrontEdge - X) * Facing equals FrontEdgeDist (with X the player's world position).

Distances between different localcoords

Every position and distance trigger converts its world-space result into the localcoord of the player that evaluates it (P2Dist, P2BodyDist, RootDist, ParentDist, ScreenPos, LeftEdge/RightEdge/FrontEdge/BackEdge and the ...EdgeDist family). In a 1280x720 versus 320x240 match the same gap reads 4 times larger for the HD player. P2BodyDist subtracts both players' front widths after each width is converted to world units, so it is 0 when the boxes touch no matter which localcoord each character was drawn for. P2Dist and P2BodyDist only depend on the two player positions: the camera never influences them, including inside a throw's custom states.

Camera zoom

Zoom changes the camera scale (1 = normal, above 1 = closer). The camera is deterministic: it eases one step per tick, with no clock involved.

ParameterDefaultMeaning
scale1Requested camera scale
time1Ticks the request stays active; re-trigger every tick to hold it
delta0Added to the requested scale after every tick of the request (a ramp)
pos0, 0Camera focus offset in the player's localcoord
lag00 jumps to the requested scale in one tick, values towards 1 ease slowly (1 - lag of the remaining distance per tick)
zoomindelay0Ticks to wait before a zoom-in (scale > 1) starts
bound11 keeps the scale inside the stage limits (zoomin as the largest scale, 1 / zoomout as the smallest, widened by the team zoom-out) and the offset inside the stage bounds; 0 only limits the scale to 0.25..4 and ignores the stage bounds

When the request ends the camera eases back to its normal scale using the stage zoominspeed / zoomoutspeed.

CameraZoom returns the live camera scale. ZoomVar(<name>) exposes the camera zoom state: scale (live), target (requested scale), active, time (ticks left), posx, posy, lag, delta, delay, bound, min and max (the scale limits currently allowed by the stage). All names return 0 (or the live scale for target) when no Zoom is active.

Camera and ground level controllers

The engine is 2D, so there is no Z axis: Pos Z, Vel Z and the other Z components always read 0.

  • Camera (pos, zoom, bound, lag, time): moves the camera focus by pos (player localcoord) and optionally sets the camera scale with zoom. It uses the same machinery as Zoom (see above): bound = 1 keeps the offset inside the stage bounds and the scale inside the stage zoom limits, lag eases the zoom, time is the number of ticks the request stays active. Without zoom the current scale is kept.
  • Cinema (bars, slow, invert, lines, flash): activates widescreen letterbox bars (bars 0..1), deterministic slow motion (slow ticks), an impact-frame invert flash (invert = 1), speed lines (lines 0..1), and a flash color (flash = r, g, b).
  • SlowMo (time): enables deterministic slow motion for time ticks.
  • GroundLevelOffset value = n: raises the floor under this character by n pixels (negative digs it), so it stands on the raised floor with normal landing, ground physics and ground/air hit detection. Pos Y is measured from the character's own floor (0 while standing on it), ScreenPos Y and the spawn height of projectiles, explods and helpers include the offset. The offset resets at round start.
  • Depth and DepthBound are accepted but ignored (Z is out of scope); the first use prints one warning (depth is accepted but ignored: the engine has no Z axis) and the character is not changed.

Screen, camera and stage triggers

All distances and sizes are in the evaluating player's localcoord. "Zoom-relative" triggers change when the camera zooms (the 5v5 zoom-out, Zoom, Camera).

TriggerZoom-relativeMeaning
ScreenWidth, ScreenHeightyesSize of the visible area (GameWidth / GameHeight keep returning the raw view size in game pixels)
TopBoundDistyesDistance from the player's position up to the highest point the stage lets the camera show (boundhigh, raised by dynamicboundhigh)
TopBoundBodyDistyesSame, minus the player's size.height (head to ceiling)
BotBoundDist, BotBoundBodyDistyesDistance from the player's feet down to the lowest point the camera can show (boundlow plus the view height); identical because the origin is at the feet
StageFrontEdgeDist, StageBackEdgeDistyesDistance to the stage's side limits (boundleft / boundright extended by half the view) in front of / behind the player, depending on Facing
NumStageBG / NumStageBG(id)noNumber of stage background layers, optionally only those with the given id
StageBGVar(id, name)noLive value of the first layer with that id: pos.x, pos.y (start plus scroll and sine offset), start.x/y, delta.x/y, velocity.x/y, tile.x/y, layerno, id, visible, enabled, sprite.group, sprite.index; unknown id or name gives 0
StageConst(name)noNumber from the stage's [Constants] group (0 when missing or on built-in stages)
Const1080p(n)non scaled from a 1920 pixel wide design to the player's localcoord
LocalCoord X / LocalCoord YnoThe player's localcoord width / height
Angle, Scale X/Y, Alpha X/Y, SprPriority, LayerNonoThe player's current draw state (Alpha is source / destination, 256 / 0 when opaque). XAngle, YAngle and XShear read 0: the 2D renderer has no tilt or shear
ZoomVar(name), CameraZoomyesSee "Camera zoom"

Redirections

parent root helper target partner enemy enemynear playerid p2 stateowner nearestfoe

helper(id) and target(id) take an optional ID; partner(n) is the n-th other non-helper player on the same side (default 0; a helper redirects through its root; NaN when there is none); enemy(n) and enemynear(n) pick the n-th opponent. Example: trigger1 = enemynear, life < 200. nearestfoe (engine extension) picks the living, non-standby opponent closest in 2D (x and y), which matters in team fights; it falls back to enemy(0) when nobody is alive. Homing example: x = (NearestFoe,Pos X - Pos X) * Facing.

Expressions

  • Integer vs float like M.U.G.E.N: 7 / 2 = 3, 7.0 / 2 = 3.5.
  • Ranges: stateno = [200, 299], (200, 299].
  • Operators: + - * / % ** ! && || ^^ & | ^ ~ = != < <= > >= and := in var(n) := value.

Pause and freeze rules

EntityHit pause (attacker) / hit shake (defender)PauseSuperPause
Fighter or helperAnimation, Time, physics and timers stop; only controllers with ignorehitpause = 1 runFrozen, except the pauser during movetime and helpers with pausemovetime ticks leftFrozen, except the pauser during movetime and helpers with supermovetime ticks left
ExplodKeeps going with ignorehitpause = 1 (default); with 0 it stops while its owner is in hit pause or hit shake, position binding includedFrozen unless pausemovetime ticks are leftFrozen unless supermovetime ticks are left
ProjectileNot affected by the owner's hit pauseFrozen unless pausemovetime ticks are leftFrozen unless supermovetime ticks are left
  • A pausemovetime/supermovetime budget is spent one tick per frozen frame and only by its own kind of pause.
  • AnimTime, AnimElemTime, AnimElemNo and Time hold their value for the whole hit pause or shake and resume on the first free tick.
  • HitPauseTime is the attacker's remaining hit pause; GetHitVar(hitshaketime) and HitShakeOver describe the defender's shake. Every other GetHitVar field is a snapshot taken when the hit lands and does not change during the shake; the recovery clock (HitOver) also waits for the shake to end.
  • Regression tests: crates/engine/tests/freeze_rules.rs.

Debugging

  • F2 in training shows hitboxes.
  • cargo run --release -p ume-engine --example mugen_check -- <folder> lists states and expressions with errors.

Load diagnostics

Every character load audits the controllers, triggers and parameters it parsed against what the engine actually implements. Nothing is hardcoded in a list: each unknown name is run once against a throw-away match and flagged when the dispatch falls through, so the report follows the engine as controllers and triggers are added.

The audit reports, per source file and state (.cns, .cmd, .st, .zss):

FindingMeaning
unsupported controllerthe type has no implementation
unknown triggerthe trigger name is not evaluated by the engine
unsupported redirection / string triggera redirection kind (partner, ...) or a string comparison (p3name = ...) the engine does not resolve
unknown parameterno code path of the controller reads that parameter
unknown AssertSpecial flagthe flag is not recognised

Each load prints one summary on stderr (n unsupported controllers, m unknown triggers, ...), deduplicated by name; TRACE=1 adds the names with the files and states that use them. Set UME_QUIET_DIAGNOSTICS=1 to silence it.

mugen_check prints the summary per character and, with --strict, prints the details and exits with a non-zero status when any character has findings:

cargo run --release -p ume-engine --example mugen_check -- --strict mugen/chars/kfm

CI runs it with --strict over crates/engine/tests/data/chars, so a feature used by the fixture characters that the engine does not implement fails the build. In code, ume_engine::diagnostics::audit_cns(file, text) returns the findings for a snippet and CharDef::diagnostics() for a loaded character.

Introspection triggers

Triggers that read back what a character created or what it is drawing. The last argument is a variable name written bare, like Ikemen GO; an axis is a second word (pos x). A lookup that finds nothing (no such explod, projectile or box) is undefined (NaN): any comparison with it stays undefined and counts as false, so test for existence with NumExplod, NumProj or HelperIndexExist first when the difference matters. Positions and velocities are in the character's own coordinates, positions follow the Pos convention (x relative to the camera, y relative to the floor).

TriggerVariables
ExplodVar(id, index, var)id time removetime bindtime bindid anim animelem animelemtime animtime animplayerno spriteplayerno facing ignorehitpause layerno pausemovetime supermovetime sprpriority pos x/y/z vel x/y/z accel x/y/z scale x/y. Reads the index-th explod of the caller with that id (id below 0 matches any)
ProjVar(id, index, var)projid time projremovetime projhits projmisstime projpriority projsprpriority projedgebound projstagebound lowbound highbound projhitanim projremanim projcancelanim projremove anim animelem facing teamside pausemovetime supermovetime pos x/y/z vel x/y/z accel x/y/z velmul x/y remvelocity x/y/z scale x/y. Reads the index-th live projectile of the caller with that id
PalFXVar(var)time (ticks left) add.r/g/b mul.r/g/b color invertall; prefix bg. or all. for the background and global effects. No effect active reads as the identity (add 0, mul 256, color 256)
ClsnVar(type, index, edge)type is clsn1, clsn2, size or dummy; edge is back, front, top or bottom, relative to the character and its facing. size is the body size box from size.ground.back/front and size.height; dummy has no boxes
ClsnOverlap(type, playerid, type)now accepts size (both sides) and dummy (first side, never overlaps) besides clsn1 and clsn2
ProjClsnOverlap(index, playerid, type)the attack box of the caller's index-th projectile against a box of that player
HelperVar(var)for a helper: id helpertype keyctrl ownpal preserve; undefined for a non-helper
SpriteVar(var)the current sprite: group image width height xoffset yoffset
AnimElemVar(var)the current animation element: group image time hflip vflip xoffset yoffset xscale yscale angle alphasource alphadest numclsn1 numclsn2
InputTime(key)ticks the key has been held: U D L R, relative F B, N (nothing pressed) and the buttons a b c x y z s (case matters: B is back, b is the button)
AnimLength AnimPlayerNo SpritePlayerNototal ticks of the animation (-1 when it never ends); player number that owns the animation and the sprites
Index RunOrder HelperIndexExist(n)position of the character among the root and its helpers (root is 0); 1-based update order in the match; whether the root has an n-th (0-based) helper
IkemenVersion(major) IkemenVersion(minor)version of the Ikemen GO behaviour followed: 1 and 0
DisplayName = "x" SelfCommand = "x"string comparisons against the display name and the character's own command buffer

Not implemented yet, and reported by the load diagnostics: BGMVar, SoundVar (the engine core holds no audio state), AnimLoopCount, AnimPrefix, HelperName, the angle, friction, xshear, drawpal.* and shader variables of ExplodVar, and the attr, guardflag, hitflag, shadow variables of ProjVar. An unknown variable name is reported once per character load as explodvar(name) and evaluates to 0.

Overlays for migrated fighters

tools/mugen2umf/overlays/ holds CNS patches layered on an exact migration through --extra (scripts.cns, with override: true for patches that replace a whole state). goku_ssj4_ryuken.cns replaces the Ryu Ken dragon helper (state 3050) with a homing version: it steers toward NearestFoe with a smoothed turn, flips with Turn when the target is behind, tilts with AngleDraw and slows on contact. goku_ssj4_afterimage.cns adds AfterImage trails to the Goku skills through [Statedef -2], which appends to the original instead of replacing it.

AssertSpecial flags

AssertSpecial accepts flag, flag2, flag3, flag4 and flag5 (a comma list also works in one parameter) and an optional enabled (default 1). Flag names are case insensitive. The full Ikemen GO v1.0.0 set is understood: 58 per-character flags and 19 global flags, plus the engine extension Immovable.

A flag lasts for the tick in which it is asserted. During hit pause the flags asserted before the pause stay on (Ikemen behavior); AnimateHitPause always has to be asserted again. IsAsserted(<flag>) reads the same table, so IsAsserted(NoWalk) and IsAsserted(TimerFreeze) both work.

A flag that is not in the table is ignored. The loader prints one AssertSpecial flags not recognised and ignored line per character, and mugen_check prints an UNKNOWN-FLAGS line for it.

Global flags (19)

FlagEffect
IntroHolds the round in the intro (capped at 10 s)
RoundNotOverHolds the round-over state (capped at 15 s)
TimerFreezeRound timer stops
RoundFreezeRound timer and round state clock stop
RoundNotSkipThe attack-button skip of the first-round face-off is disabled
CameraFreezeThe camera does not move
GlobalNoKONobody is KO'd; life stops at 0 and the round goes on
GlobalNoShadowNo shadows or reflections
NoKOSlowNo slow motion on KO
NoKOSndNo KO sound
NoMusicMusic is muted
NoBG / NoFGBack / front stage layers are not drawn
NoBarDisplayThe whole fight HUD (bars, timer, partner tiles, combo counter) is hidden
NoTimeDisplayThe timer is hidden
SkipFightDisplay / SkipRoundDisplay / SkipKODisplay / SkipWinDisplayThe "FIGHT!", "ROUND n", "K.O." or win announcement is not shown

Per-character flags (58 + Immovable)

FlagEffect
Invisible, NoShadowSprite or shadow is not drawn
UnguardableThe player's attacks cannot be guarded
NoStandGuard, NoCrouchGuard, NoAirGuardThe player cannot guard in that state type, and does not enter the guard state
NoJuggleCheckJuggle points are not enforced against the player's hits
NoAutoTurn, NoWalk, NoJump, NoAirJump, NoCrouch, NoStandDisable the built-in turn, walk, jump, double jump, crouch and stand-up transitions
NoHardcodedKeysDisables every built-in key transition (walk, jump, crouch, guard)
AutoGuardGuards as if back were held
NoKOThis player is not KO'd at 0 life; in team modes, they also keep their team from being eliminated while they remain in play
NoHitDamage, NoGuardDamageHits / guarded hits do no life damage to the player
NoRedLifeDamageHits do not raise the player's red life
NoDizzyPointsDamageHits do not lower the player's dizzy points
NoGuardPointsDamageGuarded hits do not lower the player's guard points
NoScoreHits do not change the player's score
NoGuardKOA guarded hit cannot kill the player
NoKOFallA KO'ing hit does not force the fall
NoKOVelocityA KO'ing hit does not add the extra KO launch velocity
NoFallHitFlagThe player ignores the F hitflag while falling
NoCornerPushThe player is not pushed back after hitting an opponent in the corner
ImmovableEngine extension: the opponent's pushbox cannot move the player
AnimateHitPauseThe animation keeps playing during hit pause
AnimFreezeThe animation stops
NoInputButton and direction input is cleared
PostRoundInputCommands are read after the round ended
RunFirst, RunLastThe player's states run before / after everyone else's on the next tick
NoDestroySelfDestroySelf has no effect
NoMakeDustThe built-in dust effect is not spawned
NoAILevelAILevel returns 0 for the player
DrawUnderThe player is drawn behind other fighters
NoLifeBarDisplay, NoPowerBarDisplay, NoFaceDisplay, NoNameDisplay, NoWinIconDisplay, NoComboDisplayThe matching HUD part is hidden

Recorded and readable through IsAsserted, but the engine has no matching mechanic yet: NoAIButtonJam, NoAICheat, NoBrake, NoFaceP2, NoFallCount, NoFallDefenceUp, NoFastRecoverFromLieDown, NoGetUpFromLieDown, NoIntroReset, NoLifeBarAction, NoGuardBarDisplay, NoStunBarDisplay, NoTurnTarget, ProjTypeCollision, SizePushOnly.

Red life, dizzy and guard points

Every fighter carries three Ikemen GO life systems next to Life. They are always on; a character that never reads them is unaffected apart from the extra bars of state.

Red life

RedLife is the recoverable part of the life bar. It never drops below Life and never rises above LifeMax.

  • A hit subtracts the HitDef redlife value from RedLife, so the red bar grows over the real life bar. A guarded hit uses the second redlife value.
  • LifeAdd, LifeSet, RedLifeAdd and RedLifeSet keep the rule above. When Life rises over RedLife, RedLife follows it.
  • A new round resets RedLife to LifeMax.
  • NoRedLifeDamage stops hits from changing it.

Dizzy points

DizzyPoints start at DizzyPointsMax (the data.dizzypoints constant, data.life when absent).

  • A hit that is not guarded subtracts the HitDef dizzypoints value, multiplied by the defender's defence multiplier.
  • At 0 the defender enters common state 5300 (dizzy) with Dizzy set and control removed. Airborne or falling defenders do not become dizzy.
  • The points refill as the state starts; Dizzy clears when the state ends and the defender is out of hit state.
  • NoDizzyPointsDamage stops hits from lowering the points.

Guard points

GuardPoints start at GuardPointsMax (data.guardpoints, data.life when absent).

  • A guarded hit subtracts the HitDef guardpoints value, multiplied by the defender's defence multiplier.
  • At 0 the defender enters common state 5400 (guard break) with GuardBreak set and control removed.
  • The points refill as the state starts; GuardBreak clears when the state ends and the defender is out of hit state.
  • NoGuardPointsDamage stops guarded hits from lowering the points.

Common states

common1.cns ships states 5300 (dizzy, animation 5300 then 5000) and 5400 (guard break, animation 5400 then 150 then 5000). A character may override either state in its own CNS. When neither state exists the matching system only tracks the numbers.

HitDef defaults

When a HitDef omits redlife, dizzypoints or guardpoints, the engine derives them from the damage with the character's [Constants] multipliers:

ConstantDefaultSuper default (attr has H)
lifetoredlifemul0.750.75
lifetodizzypointsmul1.80
lifetoguardpointsmul1.5-0.33

The keys are written default.lifetoredlifemul and super.lifetoredlifemul in a [Constants] section. A negative guard-points value gives guard points back, so a super move restores a little guard on contact. score = <hit>, <guard> is also read by HitDef and stored for GetHitVar(score).

Triggers and controllers

RedLife, Dizzy, DizzyPoints, DizzyPointsMax, GuardBreak, GuardPoints, GuardPointsMax, GetHitVar(redlife), GetHitVar(dizzypoints) and GetHitVar(guardpoints) read these values. RedLifeSet, RedLifeAdd, DizzyPointsSet, DizzyPointsAdd, DizzySet, GuardPointsSet and GuardPointsAdd change them (see Ikemen extensions).

ZSS states / Estados ZSS

ZSS is the brace-based state syntax introduced by Ikemen GO. List a .zss file in a character's .def (st, st1…st9, stcommon) and it is compiled to the same state controllers as CNS.

ZSS é a sintaxe de estados com chaves criada pelo Ikemen GO. Liste um arquivo .zss no .def do personagem (st, st1…st9, stcommon) e ele vira os mesmos controllers de um CNS.

[StateDef 200; type: S; movetype: A; physics: S; anim: 200; ctrl: 0;]

if AnimElem = 2 {
	HitDef{ attr: S, NA; damage: 20, 0; animtype: Light }
}
if Time = 0 {
	PlaySnd{ value: 0, 0 }
} else {
	VarAdd{ v: 1; value: 1 }
}
persistent(0) ignorehitpause {
	PowerAdd{ value: 10 }
}
switch Var(1) {
case 1, 2:
	CtrlSet{ value: 1 }
default:
	CtrlSet{ value: 0 }
}
FeatureStatus
[StateDef n; key: value;], negative statesSupported
if / else if / else, switch / case / defaultSupported
persistent(n), ignorehitpauseSupported
Any state controller Name{ key: value; … }Supported
let locals (compiled to var(59) downwards, 20 slots)Supported
for / while (unrolled up to 32 iterations per tick, then bounded)Supported
break / continueSupported
call name(args) and [Function name(params)] (inlined, arity checked)Supported

A ZSS file that fails to compile (wrong arity, unknown function, malformed loop, too many locals) is reported as a compile error and not loaded; it never silently drops logic. Loops are bounded to 32 iterations per tick; a while that never changes its condition stops at the cap instead of hanging the match.

Conditions are checked per controller, as in CNS. A controller that changes a value used by its own if affects the controllers that follow it.

As condições são avaliadas por controller, como no CNS. Um controller que muda um valor usado no próprio if afeta os controllers seguintes.

Ikemen extensions / Extensões do Ikemen

State controllers and triggers from Ikemen GO that characters can use in CNS or ZSS.

Controllers e triggers do Ikemen GO que personagens podem usar em CNS ou ZSS.

ControllerParametersEffect
MapSetmap, value, type (1 = add)Sets a named value on the player
MapAddmap, valueAdds to a named value
MapResetmap (omit for all keys)Removes one key, or every key, from the player's map
TeamMapSet / TeamMapAdd / TeamMapResetsame as MapSet / MapAdd / MapResetSame operations on the map shared by every player and helper on the same side
RootMapSet / RootMapAdd / RootMapResetsame as MapSet / MapAdd / MapResetSame operations on the root player's map
ParentMapSet / ParentMapAdd / ParentMapResetsame as MapSet / MapAdd / MapResetSame operations on the parent's map; does nothing without a parent
RootVarSet / RootVarAddvar(n), fvar(n), sysvar(n), sysfvar(n) or v / fv + valueWrites variables on the root player, like ParentVarSet does on the parent
RedLifeSet / RedLifeAddvalue, absoluteRecoverable (red) life, kept between life and lifemax
DizzyPointsSet / DizzyPointsAddvalueStun points, 0..data.dizzypoints
DizzySetvalueDizzy flag
GuardPointsSet / GuardPointsAddvalueGuard points, 0..data.guardpoints
GuardBreakSetvalueGuard break flag
Texttext, params, pos, velocity, scale, color, align, removetime, idDraws text on the fight screen; %d, %f, %s and \n in text take values from params (%s prints the mode name for a bare TeamMode, otherwise the integer)
RemoveTextid (omit for all)Removes the player's texts
TagOut / TagInself, stateno, ctrl, partnerstateno, partnerctrlMoves the player to or from standby (hidden, cannot be hit or pushed); partnerstateno swaps with the first teammate. In Tag mode they perform a real swap (cooldown ignored): TagOut brings the next living teammate in, TagIn on a standby fighter brings it in
ModifyProjectileid, velocity, accel, velmul, removetime, projhits, projpriority, projscaleChanges the player's live projectiles
ModifySndchannel, pan, abspan, volumescaleChanges sounds already playing on a channel
PlayBGMbgm, volume, loop, loopstart, loopend, freqmulStarts a music track (volume in percent); an empty bgm stops the music. The engine only emits an event; the app resolves the file: "stage" is the stage's own track, "builtin:N" a built-in track, other names must have been registered by the app
StopBGMStops the music
ModifyBGMvolume, loop, loopstart, loopend, freqmulvolume applies to the playing track at once; loop is used by the next PlayBGM; loopstart, loopend and freqmul are emitted as events but changing them while a track plays is not applied yet
ModifyStageVarcamera.boundleft, camera.boundright, camera.boundhigh, camera.boundlow, camera.verticalfollow, camera.tension, camera.startx, camera.starty, camera.zoomout, stageinfo.zoffset, playerinfo.p1startx, playerinfo.p2startxChanges the running stage; the part before the dot is optional. Values are in character units; camera position is clamped to the new bounds at once and zoffset is re-applied through the zoom. startx / starty apply on the next round
ModifyStageBGid (omit or -1 for all layers), visible, enabled, velocity, pos, offset, sinx, siny, animChanges background layers of the running stage; pos is absolute, offset is added
ModifyBGCtrlid (target layer id), time (start, end, loop), looptime, value, x, yEdits the stage's BGCtrl entries that target id (all when omitted); the edits last until the round restarts
ModifyPlayerid (omit for self), life, lifemax, power, powermax, ctrl, ailevel, redlife, dizzypoints, guardpointsWhitelisted fields only, always clamped (ailevel 0..8, power lives on the root)
PrintToConsoletext, paramsAppends a line to the match's compatibility log (Match::console); %d, %f and \n as in Text. At most 20 lines per second per match, 200 lines kept, 240 characters per line
RunStatevalueRuns the controllers of state value (from the state owner) once, in the current tick, without changing stateno or Time; variables are shared, persistent and ignorehitpause of the inner controllers are respected, nesting stops after 8 levels
Heightvalue = top[, bottom]Sets the body height for the current tick (default size.height, bottom 0); used by player push and as the hurtbox of frames that have none
GetHitVarSethittype, animtype, airtype, groundtype, damage, hitcount, guardcount, hitshaketime, hittime, slidetime, ctrltime, xvel, yvel, yaccel, chainid, guarded, fall, fall.damage, fall.xvel, fall.yvel, fall.recover, fall.time, fall.recovertime, fall.kill, kill, id, playernoWrites the listed GetHitVar fields (type is spelled hittype because type names the controller); GetHitVar(attr) is not available yet
ModifyHitDefany HitDef parameterOverwrites only the listed fields of the HitDef that is active; nothing happens without one
ModifyReversalDefany ReversalDef parameter, reversal.attrSame for the pending ReversalDef
OverrideClsnclsn (1 attack, 2 hurt, default 2), index (-1 replaces the whole list), value = x1, y1, x2, y2, time (default 1, -1 = until replaced)Replaces a collision box in animation units
ResizeClsnclsn, index (-1 = all boxes), value = dx1, dy1, dx2, dy2, timeMoves each edge of the box by the given deltas
TransformClsnclsn, scale = sx[, sy], offset = x, y, timeScales then shifts every box of that type
AssertCommandvalue (or name), time (default 1)Makes that command active for time ticks; Command and the built-in walk, guard and jump states see it even outside the input window
AssertInputvalue (input bits), time (default 1)ORs the bits into the player's input for time ticks, so Command matches the injected press
ShiftInputvaluePositive pushes value extra history ticks (the input arrives later), negative drops that many ticks

Collision modifiers apply in the order they were added, are replaced when the same kind of change is issued again for the same box type (and index), count down once per tick, and are reflected by the F2 box view. time = -1 keeps a modifier until another one replaces it.

PT-BR: RunState executa os controllers de outro state sem trocar de state; Height ajusta a altura do corpo no tick; GetHitVarSet grava campos do GetHitVar (hittype no lugar de type); ModifyHitDef e ModifyReversalDef alteram só os campos listados; OverrideClsn, ResizeClsn e TransformClsn (clsn = 1 ataque, 2 corpo) mudam as caixas de colisão e aparecem no F2.

PT-BR: AssertCommand mantém um comando ativo por time ticks; AssertInput injeta bits no input do jogador pelos próximos time ticks; ShiftInput empurra (positivo) ou descarta (negativo) ticks do histórico de inputs.

TriggerReturns
Map(name)Named value, 0 when unset (use Root, Map(name) or Parent, Map(name) to read another scope)
TeamMap(name)Value in the team map of the player's side, 0 when unset
RedLifeRed life
Dizzy, DizzyPoints, DizzyPointsMaxDizzy flag and points
GuardBreak, GuardPoints, GuardPointsMaxGuard break flag and points
StandBy1 while tagged out
NumTextTexts the player has on screen
ClsnOverlap(clsn1, id, clsn2)1 when the player's box type overlaps the box type of the player with that id
NumPartnerTeammates on the same side
IsAsserted(flag)1 while the AssertSpecial flag is on (character or global flag)
TeamMode0 single, 1 simul (Parallel), 2 turns (Sequence), 3 tag (reserved, no tag mode yet). Also accepts TeamMode = Simul, TeamMode = turns, TeamMode = 1 (names are case-insensitive)
TeamSizeMembers of the player's team (the whole roster in Sequence mode, the fielded players otherwise)
TeamLeaderPlayerNo of the player's team leader
NumPlayerPlayers in the match (both rosters; 6 for a 3v3 Sequence, 10 for a 5v5 Parallel)
PlayerNo1-based slot of the player: P1, P2, P3... interleaved by side (a helper reports its root's slot); in Sequence mode member * 2 + side + 1
MemberNo1-based position of the player in its team (a helper reports its root's position)
PlayerIndexExist(n)1 when the 0-based index n exists in the match player list (helpers included)
LastPlayerIDID of the most recently created player or helper
IntroState1 before the intro starts, 2 while the intro plays, 0 afterwards
OutroState1 while the round is decided (KO / time over), 2 during the win poses, 0 otherwise

Map keys are case-insensitive. Each map holds at most 256 keys of at most 64 characters; writes that would exceed either limit are ignored.

Chaves de map não diferenciam maiúsculas. Cada map guarda no máximo 256 chaves de até 64 caracteres; escritas acima desses limites são ignoradas.

data.dizzypoints and data.guardpoints in the [Data] section default to data.life. How hits spend these values is described in Red life, dizzy and guard points.

data.dizzypoints e data.guardpoints na seção [Data] usam data.life como padrão.

Helper accepts helpertype = projectile: the helper's HitDef contacts count as projectile hits (ProjHit, ProjContact, ProjGuarded and their *Time forms fire on the helper and on its root, keyed by the helper id), the attacker is not put in hit pause and the helper has no hurtbox. ownprojectile = 1 keeps the projectiles the helper fires on the helper: NumProj and NumProjID of the helper count them and the root does not. size.* parameters (for example size.xscale, size.yscale, size.height, size.ground.back) override the character constants for that helper only, including Const(size.*) and the size of its hurtboxes. A helper spawned by another helper inherits the parent's size.* overrides unless it is spawned with ownclsnscale = 1, which starts from the character's own constants.

Helper aceita helpertype = projectile: os contatos do HitDef do helper contam como acertos de projétil (ProjHit, ProjContact, ProjGuarded e as formas *Time valem no helper e no root, indexados pelo id do helper), o atacante não entra em hit pause e o helper não tem hurtbox. ownprojectile = 1 mantém no helper os projéteis que ele dispara: NumProj e NumProjID do helper os contam e o root não. Os parâmetros size.* (por exemplo size.xscale, size.yscale, size.height, size.ground.back) substituem as constantes do personagem só para aquele helper, inclusive Const(size.*) e o tamanho das hurtboxes. Um helper criado por outro helper herda os size.* do pai, a menos que seja criado com ownclsnscale = 1, que parte das constantes do próprio personagem.

Module controllers / Controllers de módulo

Ikemen GO modules and motifs use these controllers. They are always parsed (a character that contains them still loads and runs); the table says what each one does here. A controller that is not supported does nothing and writes one warning line to the match's compatibility log (Match::console) the first time it runs. The list lives in ume_engine::sctrl::module::MODULE_CONTROLLERS so tools can query it with module_status(name) / rejected_by_design().

Controllers de módulo do Ikemen GO são sempre interpretados (o personagem carrega e roda); os não suportados não fazem nada e registram um aviso único no log de compatibilidade.

ControllerStatusNotes
MatchRestartsupportedResets wins and the round counter and restarts at the start of the next tick
LoadFile, SaveFilerejected by designCharacters never get file access; content runs in a sandbox
ShaderSetrejected by designThe renderer has a fixed pipeline; user shader code is not loaded
Storyboard, RemoveStoryboard, Dialogueplanned[SceneDef] files are parsed but there is no storyboard runtime yet
SaveState, LoadStateplannedNeeds the rollback snapshot of the match (see the roadmap)
LifebarActionplannedThe HUD has no scripting hooks yet
ChangeMovelistplannedThe movelist is fixed at load time

Screenpacks

🇧🇷 Screenpacks são os menus, telas de seleção e barras de vida no formato M.U.G.E.N. Coloque o pacote em data/ e rode o verificador abaixo.

A screenpack is the set of files that draws everything around a fight: title menu, character select, lifebars, fonts, intro and logo storyboards.

Status: the runtime now loads a screenpack when one is present (mugen/data/system.def, mugen/screenpacks/<pack>/system.def or UME_SCREENPACK). The native UI stays as the fallback for anything a pack does not provide:

  • system.def menu.itemname.* labels replace the main-menu titles (Arcade, Survival, teams, Training, Watch, Exit).
  • select.def [Characters] order drives the select grid order.
  • intro.storyboard text scenes are played over the arcade opening cutscene, timed by each scene's end.time.
  • fight.def lifebar pos/range.x place and size the life bars (converted from the pack localcoord to the 426×240 HUD space); the rest of the HUD stays native.
  • Parsed sprites/fonts/sounds are kept in ume_formats::screenpack::Screenpack for the remaining screens, but system/fight sprite drawing (backgrounds, bar sprites, fonts) is still native.

The checker below tells whether a pack parses; the game never refuses to start because of a broken pack (it falls back to the native UI and logs the warnings).

Layout

data/
  system.def      title menu, select screen, music, storyboards
  select.def      roster grid and stage list
  fight.def       lifebars, power bars, round/KO announcers
  system.sff      sprites used by system.def
  system.snd      menu sounds
  fight.sff/.snd  lifebar sprites and announcer voices
font/
  *.fnt           bitmap fonts (v1 binary or v2 text)

File names in [Files] are looked up next to system.def, then in data/, font/ and the game root.

Supported files

FileSections read
system.def[Info] localcoord, [Files], [Music] (*.bgm, .loop, .loopstart, .loopend, .volume), [Title Info] menu.itemname.*, [Select Info] grid, every [<name>BGdef] / [<name> N] background
select.def[Characters] (randomselect, empty, per-character stage and key=value), [ExtraStages], [Options]
fight.def[Files], every pN.* bar part (bg0, bg1, mid, front, counter, pos, range.x) and any element by prefix
Storyboards[SceneDef] spr, startscene, [Scene N] timings, fades, clearcolor, layerall.pos, layerN.*, bg.name, bgm
.fnt v1embedded PCX, [Def] Size, Spacing, Colors, Offset, Type=Fixed/Variable, [Map] with literal or 0xNN chars
.fnt v2[Def] Type=bitmap/truetype, Size, Spacing, Offset, File

Elements

Every visual item follows the same pattern, so anything you can place in one screen works in another:

prefix.anim = 10
prefix.spr = 5,0
prefix.font = 1,0,1
prefix.text = "Round %i"
prefix.offset = 160,120
prefix.scale = 1,1
prefix.facing = -1
prefix.layerno = 1
prefix.displaytime = 60

Checking a screenpack

cargo run -p ume-formats --example screenpack_check -- <game root> data/system.def

It prints what was loaded and one warning: line per missing or broken file. A screenpack with no error: line parses cleanly; displaying it in the engine is not implemented yet.

Screenpack study

What M.U.G.E.N and Ikemen GO screenpacks (motifs) do differently from a plain menu, and what Ultimate MUGEN took from it. Only ideas are used; no third-party art, layouts or sounds are copied.

Sources

The search was limited to forum threads and wiki mirrors; the default motif files themselves could not be fetched, so parameter names below are from secondary sources.

What packs do differently

AreaDifferentialUltimate MUGEN
StructureOne system.def points to select.def, fight.def, sprites, sounds and fonts; any missing file falls back to the default motifSame layout and fallback, see Screenpacks
SelectGrid size and cursor set by parameters, animated portraits, per-character stage and slotsGrid, cursors, team slots and palette row already native, see Character select
VersusOrder select on the versus screen, animated portraits, KOF98-style pickVersus screen with team strips exists; order select is a follow-up
VictoryWinner portrait, name and a typed victory quote after Arcade, Versus, Quick Match and WatchWinner pose and name existed; quote is a follow-up
ResultsTime, combo and damage grading, time-challenge best times on the select screenNew stats strip (below)
ResolutionPacks ship for 4:3 and 16:9 with localcoordlocalcoord is converted to the 426x240 HUD space
ParserUnknown fields produce warnings instead of silent failureChecker prints one warning: per broken file

Implemented from this study

The results screen shows four glass chips under the winner line: match time, best combo of each side, total damage dealt by each side and life left of each side as a percentage. src/match_stats.rs observes the match after every tick (outside the deterministic engine, so rollback and replays are unaffected) and src/app/results_stats.rs draws the chips. Texts are localized in English, Portuguese and Spanish.

Preview: UME_SHOTS_ONLY=results xvfb-run -a target/release/ultimate-mugen --shots <dir> --res 1280x720 --mute.

Next candidates

  1. Order select inside the versus screen for team modes.
  2. Victory quote line typed under the winner name.
  3. Rank grade (S to D) from time, life left and combo.
  4. Best-time records per character in the select screen for time-attack modes.

Deeper survey (second pass)

Community screenpacks checked by their stated features (no art or layout copied):

PackDifferentialTakeaway for the engine
IKEMEN Generations HD (OroCrimson)Category-first select: up/down picks a category, left/right a character; custom KOF 2002 style lifebarsCategory navigation for big rosters
Infinite Legacy X HDVery large slot counts (700 slots); author notes the engine struggles with huge gridsPaging and virtualized grid already exist; keep it that way
Capcom vs SNK HD Black EditionSelectable slot densities (120 to 840)Grid density as a setting
Anything VS Anything999 slots navigated only up and down; users report it is slow to pickConfirms need for jump keys (PgUp/PgDn already in place)
Ikemen-GO-Screenpack and PR #56Official default motif being replaced with original art and MIT fontsReference for a clean default motif
Engine PR #4146Alpha and blend on every animation and text element; slot cycling; stage select buttonsPer-element alpha is worth copying in our HUD tokens
Ikemen-GO-Plus screenpack.luaLua hooks read localcoord from system.defScripting is out of scope; keep data-driven
external-lua-modulesCarousel-style select as external modulesCandidate for a future carousel layout

Also noted: the grid in recent Ikemen nightlies is oblique and capped near 80 slots by default, which suggests a single fixed grid model is a weak point for the whole ecosystem.

Caveats: several pages are older (2023 to 2025), and popularity is inferred from forum and listing pages, not download counts.

Implemented in the second pass

  • Select categories: Tab now cycles four categories: all, originals (no bosses), M.U.G.E.N, and bosses (src/app/select_category.rs). Labels are localized.
  • Per-element HUD opacity: the advantage banner, passive meter and guard tag draw at 80, 85 and 90 percent alpha (src/hud/opacity.rs, ume_shell::alpha_scale). Glass panels from the post pass are not affected yet.

Grid density

The select grid has three presets, cycled with G on the select screen and saved as grid= in the config: compact (9 rows), normal (7 rows, the previous default) and large (4 rows). The settings file was split into settings/persist.rs, settings/window.rs and settings/tests.rs to make room.

Preview: UME_SHOTS_ONLY=results also writes grid-0.png, grid-1.png and grid-2.png.

Sprite Atlas Import

The CLI limits atlas files to 64 MiB, image dimensions to 16,384 pixels per side and 8 million total pixels, and output canvases to 2,048 pixels to keep local imports bounded.

The import_sprite_atlas example validates and imports a transparent 3-column by 2-row atlas containing six poses. It leaves the source atlas untouched and exports one standalone PNG per requested pose name.

cargo run -p ume-engine --example import_sprite_atlas -- --atlas .\poses.png --out assets\chars\sprites\fighter --cols 3 --rows 2 --names 01_idle,02_walk,03_attack,04_crouch,05_hit,06_fall --canvas 400 --validate-only
cargo run -p ume-engine --example import_sprite_atlas -- --atlas .\poses.png --out assets\chars\sprites\fighter --cols 3 --rows 2 --names 01_idle,02_walk,03_attack,04_crouch,05_hit,06_fall --canvas 400

--canvas defaults to 400 pixels. Every output has that square size; opaque pixels are uniformly scaled with nearest-neighbor sampling, centered horizontally by their cell, and aligned by their alpha bounds to the common floor at y=392. Transparent cell padding does not affect placement. The default standing-pose reference is 80% of the source cell height. Use --reference-height to provide the source alpha height of the standing pose when a character family requires explicit calibration. The same reference is applied to all six poses, so crouching and falling poses retain the standing scale. Only transformed opaque bounds must fit the canvas.

The importer requires actual RGBA alpha, six non-empty cells, and a meaningful connected alpha component in every pose. Alpha below 16 is discarded in exported frames and ignored for border and component validation. It rejects poses whose alpha reaches the cell edge and sheets with excessive isolated alpha components; inspect and repair the atlas instead of accepting clipped poses or noise. These checks are diagnostics, not visual quality approval. --validate-only also normalizes all six poses and checks that their opaque bounds fit before reporting success. All six PNGs are encoded before any output file is written.

meta.json is merged without discarding unrelated fields. Each imported frames[name] entry records the 320-pixel reference and normalized axes (axisX=200, axisY=392 by default). The importer preserves the top-level refHeight exactly as found, including leaving it absent, so older frames keep their image-height fallback. Existing frame entries with the same names are replaced. Existing PNGs are protected unless --overwrite is supplied. --validate-only performs validation and collision checks without writing files.

Validation evidence: a synthetic padded 300x200 RGBA atlas passed validation and produced six 400x400 PNGs. An independent PNG decode confirmed the last opaque row was 391, meeting the floor edge at axisY=392, with no exported alpha below 16. A fixture with alpha crossing a cell border and an oversized normalization request were rejected; validate-only created no output directory. The generated Bruno walk-cycle atlas also passed validation and import with --reference-height 468; its output bbox was x=115..271, y=75..391 with no alpha below 16. The source atlas SHA-256 remained 56AED5E92D7F55A80C0CD288DA983E033DA17EEB6F67D8A95D099F0147ACE1D7.

The PNG writer converts straight RGBA channels to tiny-skia's premultiplied pixel representation and encodes the result. Atlas bytes are never modified.

Sprite Toolkit

Local, dependency-light tools (Rust, charforge binary) in crates/charforge/ (spritekit module) that turn generated art into MUGEN-ready assets. They never touch assets/chars or stages: output goes to a folder you choose.

cargo run --release -p ume-charforge -- slice sheet.png out/ --group 9000 --axis feet
cargo run --release -p ume-charforge -- slice sheet.png out/ --mode grid --grid 6 2
cargo run --release -p ume-charforge -- palettes base.act variants/ --only red blue dark --keep 1 2
cargo run --release -p ume-charforge -- air out/manifest.json --action 200 --ticks 4 --attack
cargo test --release -p ume-charforge
ToolWhat it does
sliceDetects the background (transparency or border color), cuts sprites by connected pieces or by grid, sets each axis at the feet (shared floor per row), builds one shared 256-color palette (index 0 transparent, flagged when quantized) and writes indexed PNGs plus manifest.json
palettesBuilds .act variants (hue, saturation, brightness presets) from a base .act; index 0 and --keep indices never change
airEmits an AIR action from the manifest with Clsn2 anatomical boxes (head, torso, legs) and optional Clsn1 for extended limbs, relative to each sprite axis

Library functions in collision_boxes.py also offer interpolate_boxes for in-between frames.

What was not ported

The move generator is in Move Generator. CharFactory's GUI editors, AI assistant and MCP server, tick-by-tick simulator and SFF/SND writers overlap with the engine itself (crates/formats, crates/engine, mugen_check) or are large. Candidates for later work are listed in the Move Generator page.

Acknowledgments

Approach inspired by CharFactory by eduardovbe, MIT License, Copyright (c) 2026 eduardovbe. The code here is a fresh, smaller implementation; the MIT notice is reproduced in REFERENCES.md.

Move Generator

crates/charforge/ (movekit module) turns a TOML description of moves into MUGEN text: animations with automatic Clsn boxes, statedefs, command entries and a [Statedef -1] block. Edit the spec and regenerate instead of hand-editing the output.

cargo run --release -p ume-charforge -- moves moves.toml out/
cargo test --release -p ume-charforge

Writes moves.air, moves.cns, moves.cmd and statedef-1.cns. A full example is in crates/charforge/examples/moves.toml; it expects sprites sliced by Sprite toolkit at sprites/manifest.json.

Spec

KeyMeaning
[defaults]sprite_manifests, clsn1_height (standing height, grows the attack box), hitsound, guardsound, super_sound, voice_channel
kindnormal, crouch, air, special, air_special, super, projectile, throw (sets damage, pause, power and attribute defaults)
state, animState number and animation number (default: the state)
command, command_name, command_timeMUGEN input notation; default name spec_<state>
frames[group, item, ticks, "hit"?, {x, y, flip, trans, clsn1, clsn2}?]; "hit" adds an automatic Clsn1
hitHitDef list; elem or elems choose the animation elements (default: first frame with Clsn1); extra adds raw parameters
sounds, vel, vfx, helpers, cancel, extra, voicePlaySnd, velocity, Explod, Helper, cancel and raw controllers
power, superpausePower cost and SuperPause for supers
phasesExtra chained states with name, next, like; the move is the first state

Generated entries in [Statedef -1] are ordered super, special, throw, normal and gated by roundstate = 2, state type and power.

Validating

cargo run --release -p ume-charforge -- check <char_dir> --strict loads the character with the engine loader and prints the same diagnostics as mugen_check; --strict fails on unsupported controllers, triggers or parameters.

Next candidates from CharFactory

A tick-by-tick move simulator for frame data, a combo tuner, palette range tools and a contact-sheet renderer. Not ported yet.

Acknowledgments

Approach inspired by CharFactory (MIT, Copyright (c) 2026 eduardovbe). Fresh implementation; see REFERENCES.md.

Make a stage (quick start)

English · Português (BR)

There are three kinds of stage work. Pick the one you need:

You wantNeeds code?Go to
A new background from your own art, with the M.U.G.E.N formatNoM.U.G.E.N stage
More content for one of the five story arenas (objects, music, animated sky)NoStory arenas
A new arena in the story mode or a new built-in arenaYes, RustWhat needs code

1. A M.U.G.E.N stage

  1. Put two files in mugen/stages/: my-stage.def and my-stage.sff (the art).
  2. Start from docs/examples/stage/my-stage.def.

The .def file is plain text with sections:

SectionWhat to set
[Info]name, displayname, author
[Camera]startx, boundleft, boundright (how far the camera can go), boundhigh, boundlow, verticalfollow, tension
[PlayerInfo]p1startx, p2startx (where each fighter starts)
[StageInfo]zoffset (height of the floor line on screen), localcoord (the drawing size, for example 320, 240)
[BGdef]spr: the .sff file
[BG name]One section per layer (see below)

Each background layer:

[BG Sky]
type = normal          ; normal (one sprite) or anim (an action from the .air file)
spriteno = 0, 0        ; group, image of the .sff
layerno = 0            ; 0 = behind the fighters, 1 = in front
start = 0, 0          ; position in local units
delta = .2, .2         ; parallax: 1, 1 moves with the floor, smaller moves slower
tile = 1, 0            ; repeat on x, on y (0 = no repeat)

Every key of the stage format, including scale, rotation and clipping windows, is in the stage reference.

Text after ; is a comment. Key names are the M.U.G.E.N ones, so a stage copied from a M.U.G.E.N pack is a good starting point.

Limits of this path: the animated loop, story strips, breakables and per-stage music from the next sections do not apply to M.U.G.E.N stages.

2. Story arenas

The story mode has five arenas: brazil, neon, bamboo, volcano and dojo. Each one can be extended with data:

WhatWhereNotes
Backdrop stripassets/stages/story/<arena>.pngOne segment per fight (four waves and the boss). Regenerate with python3 tools/story_segments.py
Animated backgroundassets/stages/animation/<arena>/Eight opaque 1672×941 keyframes (00.png through 07.png) and eight interleaved -mid.png frames. Playback advances every four ticks and wraps after 64 ticks. Keep the camera and fighting floor registered throughout the loop.
Breakables, food, bonus roundassets/story/objects.toml, table [stages.<arena>]Full format in Stage objects
Fight musictweaks.toml, section [music], key <arena id>Path to .ogg, .mp3, .wav or .flac, relative to tweaks.toml. Desktop only. See Configuration

Example tweaks.toml:

[music]
fight = "music/my-fight.ogg"   ; every fight without its own track
dojo = "music/dojo.ogg"        ; wins over fight, only in the dojo

Example objects.toml entry:

[stages.dojo]
objects = [
  { fight = 0, kind = "crate", x = -78.0, lane = -22.0, drop = "apple" },
]

Verify with the Stage objects evidence tour: UME_TOUR=storyobjects and UME_TOUR=storyloop.

Built-in arena loops, size and interactivity

  • True 60 FPS seamless loop: built-in animated stages (assets/stages/animation/<id>/00.png..07-mid.png) decode in parallel (ume_formats::par::map) and cross-fade smoothly between consecutive frames across a closed 96-tick cycle (loop_sample), eliminating wrap jumps from the last frame back to frame 0.
  • Expanded arena dimensions: built-in arenas span bound_left = -680 to bound_right = 680 (bound_high = -140, zoom_out = 0.62, zoom_in = 1.05) with 0.21 panoramic parallax in illustration_layout.
  • Reactive floors & interactive arena props: all 21 illustrated stages (including brazil and the 14 World Wonders via StageKind::Arena) render StageReact ground cracks, scorch marks, ripples and impact debris. In Versus/Arcade fights, src/stages/interactive.rs places destructible crates and explosive hazard barrels (ObjectEvent::Blast) on the outer wings (|x| >= 220, keeping the center fighting lane clear); knocked-back fighters slamming into props shatter them, and both sides can collect dropped pickups (any_collector = true). Set UME_STAGE_PROPS=0 to disable arena props.

3. What needs code

These things cannot be done with files today. Each one is a feature gap, not a bug in your files:

  • A new built-in arena. Native stages are Rust functions in src/stages.rs (builtin()). A new one needs code, an embedded PNG and a thumbnail. See Creating stages.
  • A new story arena. The list of arenas is fixed in src/stages/story_strip.rs (STORY_ARENAS) and the story mode data in src/story/stages.rs.
  • An animated sky for a M.U.G.E.N stage. Loop frames are only read for built-in arena ids.
  • A [Music] section in a .def. Music per stage comes from tweaks.toml only.
  • A type = parallax layer. Planned, not in the format.

Test

cargo test --release -p ume-engine --test it wiki_examples::
UME_SHOTS_ONLY=stages cargo run --release -- --shots out/   # screenshots of every stage

The first command checks the sections of the example .def. The second saves screenshots of the stages to out/.

Next

Stage reference · Stage objects · Story mode · Make a character · Wiki home

Creating stages

There are two paths: a M.U.G.E.N stage (.def + .sff files, no programming) or a native stage (Rust code, with procedural layers and reactive effects).

M.U.G.E.N stage

Put my_stage.def and my_stage.sff in mugen/stages/.

[Info]
name = "My Stage"
displayname = "My Stage"

[Camera]
startx = 0
starty = 0
boundleft = -150
boundright = 150
boundhigh = -25
boundlow = 0
verticalfollow = .2
tension = 50

[PlayerInfo]
p1startx = -70
p2startx = 70

[StageInfo]
zoffset = 210
localcoord = 320, 240

[BGdef]
spr = my_stage.sff

[BG Sky]
type = normal
spriteno = 0, 0
layerno = 0
start = 0, 0
delta = .2, .2
tile = 1, 0
velocity = .1, 0

[BG Floor]
type = normal
spriteno = 1, 0
start = 0, 160
delta = 1, 1
mask = 1

[BG Flag]
type = anim
actionno = 10
start = 80, 60
delta = .8, .8

[Begin Action 10]
2,0, 0,0, 6
2,1, 0,0, 6
SectionSupported keys
[Info]name, displayname
[Camera]startx, boundleft, boundright, boundhigh, boundlow, verticalfollow, tension
[PlayerInfo]p1startx, p2startx
[StageInfo]zoffset, localcoord
[BGdef]spr
[BG ...]type (normal, anim, parallax), spriteno, actionno, layerno (0 behind, 1 in front), start, delta, tile, tilespacing, velocity, trans, mask, scalestart, scaledelta, angle, xshear, window, maskwindow, windowdelta, spacing

Layer transform parameters (Ikemen / M.U.G.E.N 1.1), applied by both the live renderer and the stage-select preview:

KeyMeaning
scalestart = x, yBase scale of the sprite, anchored at its axis (default 1, 1).
scaledelta = x, yScale change per stage unit of camera movement, multiplied by delta: scale = scalestart + scaledelta * camera * delta, so the layer grows or shrinks as the camera moves (default 0, 0).
angleRotation in degrees around the sprite axis, counter-clockwise for positive values.
xshearHorizontal shear: each row is shifted by xshear times its distance from the axis.
window = x1, y1, x2, y2Clipping rectangle in stage units.
maskwindow = x1, y1, x2, y2Second clipping rectangle; when both are present the layer is clipped to their intersection.
windowdelta = x, yHow fast the clipping window scrolls with the camera (defaults to the layer delta).
spacing = x, yGap between tiles; used when tilespacing is absent (tilespacing wins when both are set).

Planned: configurable shadows and reflections.

Music, sky and parallax

[Music] plays the stage track when the fight starts (it replaces the default track; without it the fight uses the usual music). The file is resolved relative to the .def, then from the root of the content folder.

[Music]
bgmusic = sound/my_theme.ogg
bgmvolume = 80
bgmloopstart = 0
bgmloopend = 0
KeyDefaultMeaning
bgmusicnoneTrack file (.ogg, .mp3, .flac or .wav)
bgmvolume100Percent of the normal music volume
bgmloopstart, bgmloopend0Loop points in samples; both 0 loops the whole file

type = parallax is a layer that repeats without end on the X axis and drifts with its velocity, without tile = 1, 0. Use it for a sky strip, far hills or clouds. delta still sets how much the layer follows the camera.

[BG Ridge]
type = parallax
spriteno = 2, 0
layerno = 0
start = 0, 140
delta = 0.8, 1
velocity = 0.1, 0

[Sky] draws an animated sky behind the fighters, on top of the first background layer. It works for every stage, including those that come from a .def. type is one of:

TypeLook
auroraGreen-blue bands of light that drift sideways over the top of the screen
godraysLight rays fanning out from the top centre
starsA starfield that twinkles
cloudsSoft clouds that drift across the upper part of the screen
KeyDefaultMeaning
color255, 255, 255Tint, r, g, b from 0 to 255
intensity0.6Opacity at its brightest, 0 to 1
speed1Speed of the drift and pulse, 0 to 8
[Sky]
type = aurora
color = 120, 255, 200
intensity = 0.5
speed = 1

The bundled example stage assets/stages/data/example/ uses all three.

Reading the stage from scripts

StageVar(<name>) returns the stage value in the stage's own localcoord units. The section prefix is optional: StageVar(camera.boundleft) and StageVar(boundleft) are the same query.

NameValue
info.name, info.displayname, info.author, info.mugenversiontext, compared with StageVar(info.author) = "name" (case-insensitive)
camera.startx, camera.starty, camera.boundleft, camera.boundright, camera.boundhigh, camera.boundlownumbers
camera.verticalfollow, camera.tension, camera.zoomin, camera.zoomoutnumbers
playerinfo.p1startx, playerinfo.p2startx, playerinfo.leftbound, playerinfo.rightboundnumbers
playerinfo.autoturn1 unless the stage sets autoturn = 0
stageinfo.zoffset, stageinfo.localcoord.x, stageinfo.localcoord.y, stageinfo.roundtimenumbers (localcoord alone means the width; roundtime is -1 when the stage does not set it)
shadow.intensity, shadow.yscale, reflection.intensitynumbers

Text queries evaluate to 0 when used as a number. Unknown names evaluate to 0 and print one warning when the expression is compiled. On the built-in flat and native stages the values come from the engine defaults.

Camera parameters

The [Camera] group accepts these extra keys. Every key is optional and its default reproduces the previous camera, so a stage that omits them behaves exactly as before.

KeyDefaultEffect
verticalfollow0.2Fraction of the highest fighter's height the camera follows upward
tension50Horizontal dead zone: the camera only pans when a fighter comes closer than this to a screen edge, so a cornered fighter stays put while the opponent walks in
verticalfollowdelta0Dead zone in stage pixels: the vertical target only changes when it moved at least this much, which stops small jumps from shaking the camera
yscrollspeed0.3Share of the remaining vertical distance covered per tick (clamped to 0..1)
zoominspeed, zoomoutspeed0.04Share of the remaining zoom difference covered per tick when the camera zooms in or out (clamped to 0..1; 0 holds the zoom, 1 snaps in one tick)
lowestcap0When 1 the camera never sinks below starty
dynamicboundhigh0When 1 boundhigh is raised by boundhighdelta for every unit of zoom-out above 1x, so the sky stays reachable while zoomed out
boundhighdelta0Used by dynamicboundhigh

autoturn in [PlayerInfo] (default 1) controls whether fighters turn around by themselves when the opponent crosses over them in the stand, walk and crouch states. autoturn = 0 keeps their facing until a controller changes it (AssertSpecial flag = noautoturn still disables it per character). StageVar(camera.<key>) and StageVar(playerinfo.autoturn) read all of these.

Built-in stage from data only

A built-in stage does not need Rust. Create a folder assets/stages/data/<id>/ with a stage.def and the sprite file it names (for example example.sff). At build time every folder there is embedded in the binary (build.rs), appears in the stage selector as a built-in stage, and is loaded like any MUGEN stage, including [Music], [Sky] and parallax layers. The display name comes from [Info] displayname.

assets/stages/data/example/
  stage.def
  example.sff

The example folder is a working stage with an aurora sky and a parallax ridge. scripts/make-example-stage.py regenerates it. Rebuild after adding or changing files, because the files are embedded.

Native stages in Rust remain available for procedural art and reactive effects (see below).

Native stage

Native stages live in src/stages.rs and their animated effects in src/stagefx.rs.

  1. Write a fn mine() -> Stage that builds layers with lay(...) and the primitives from ume_engine::raster (rect, lin, gradients) and texgen (blobs, grain, haze). Use dojo() as a model.
  2. Register it in builtin():
#![allow(unused)]
fn main() {
StageEntry { id: "mine".into(), name: "My Stage".into(), thumb: [[10, 10, 30], [40, 40, 90], [200, 120, 60]], build: Box::new(mine) },
}
  1. For reactive effects (dust, crowds, water), add a StageKind variant and handle it in stagefx.rs.
  2. Capture screenshots to review: UME_SHOTS_ONLY=stages UME_STAGE=mine cargo run --release -- --shots out/.

Each Layer has delta (parallax), y, front (drawn in front of the fighters) and dynamic (no bitmap, drawn by stagefx).

Built-in pixel art

The twenty-one native arenas use embedded full-color PNG artwork in assets/stages/: seven core realms (dojo.png, neon.png, bamboo.png, plains.png, spirit.png, volcano.png and brazil.png), seven world landmarks (great_wall.png, petra.png, christ_redeemer.png, texas.png, chichen_itza.png, colosseum.png, taj_mahal.png), and seven Ancient Wonders of the World (pyramids_giza.png, hanging_gardens.png, temple_artemis.png, statue_zeus.png, mausoleum_halicarnassus.png, colossus_rhodes.png, lighthouse_alexandria.png). Generation prompts and tool provenance are recorded in assets/stages/prompts.json. No external image service or filesystem access is needed at runtime.

StageArt::Illustrated draws the background with nearest-neighbor filtering, aligns the fighting floor at 85% of the image height, and clamps horizontal camera movement to the image edges. Team zoom retains the native ground proportion. Fighter shadows, reflections and combat effects remain active; the old procedural prop animations are exclusive to procedural artwork.

All twenty-one built-in stages have eight ambient animation phases under assets/stages/animation/<stage_id>/. Each 1672×941 transparent PNG adds stage-specific petals, leaves, embers, rain, dust, or spirit motes while preserving the original artwork and fight floor. The game composites the overlays once when a stage loads, then advances the loop every eight simulation ticks. Native builds embed the small overlays; the web build fetches them only for the selected stage. Regenerate the overlays with python tools/gen_stage_loops.py; prompts and event descriptions are recorded in assets/stages/prompts.json.

Living layers

Every illustrated stage also carries an ambience profile (src/stages/ambience.rs, data in src/stages/ambience/profiles/): translucent mist banks that drift sideways, particles (petals, embers, fireflies, dust, leaves, sparks, birds), additive light pools anchored to lanterns, windows, fire and sun, and slanted god rays. They are drawn every frame with vertex-coloured polygons over the flat artwork (front: true layers pass in front of the fighters), react to camera parallax, use Match::game_time for motion and scale their particle count with the effects setting. A unit test caps every profile at 420 polygons per frame and checks every value range. To animate a new illustrated stage add a Profile for its id in profiles/classic.rs or profiles/wonders.rs; unknown ids fall back to a few drifting dust motes.

The stage selector displays the same artwork, cropped to each tile without changing its aspect ratio. Random selection and imported M.U.G.E.N stages retain their existing gradient tiles. Imported stages keep their own artwork during combat.

Set UME_STAGE_ART=procedural to compare the original procedural stages. The selector continues to show the default pixel-art illustrations. Capture the selector with UME_SHOTS_ONLY=stage-select ultimate-mugen --shots out/ --res 1280x720 --mute, or all seven fights with UME_SHOTS_ONLY=stages.


Native Arenas, Lore & Character Affinities

Each native arena in Ultimate MUGEN represents a critical focal point in the convergence of dimensions. Below is the full guide to the seven native battlegrounds, their world lore, and the fighters who call them home.

1. Sunset Dojo Roof (dojo) — Telhado do Dojo — Pôr do Sol

Sunset Dojo Roof

  • Atmosphere: An ancient mountain pagoda dojo perched above misty valleys at golden hour. Cherry blossom branches frame the weathered timber deck, with warm paper lanterns flickering against amber-rose clouds.
  • Native Fighters (Home Stage):
    • Kaito Arashi: The sacred training grounds where Kaito completed his Arashi-ryu mastery before beginning his wandering journey.
    • Akio Hoshi: Neighboring mountain summit where the Starfall Dojo observes the evening sky.
  • Key Challengers & Story Battles:
    • Lian Feng: Travels from Mount Wudang for an exhibition duel between Chinese flowing silk kicks and Japanese storm karate.
    • Jin Kazaguruma: Arrives via the rooftops to test his wind chakrams against Kaito's gale fist.
  • Narrative Context: Represents traditional martial honor, disciplined breathing, and the tranquil purity of combat before cosmic corruption touches the world.

2. Neo-Metropolis 2099 (neon) — Neo-Metrópole 2099

Neo-Metropolis 2099

  • Atmosphere: The rain-slicked rooftop of a mega-skyscraper in a cyberpunk metropolis. Towering holographic ads in cyan and magenta glow through the midnight mist, while aerial cruisers drift between neon-lit towers.
  • Native Fighters (Home Stage):
    • VX-9 Volta: The cybernetic testing ground and rooftop escape route where Volta severed his corporate telemetry.
    • Valdric Morn: The industrial command sector where the Red Star Empire deploys heavy mechanized garrison units.
  • Key Challengers & Story Battles:
    • Captain Marlow Reyes: Raids corporate data servers with his sky-galleon, dueling security units on the helicopter deck.
    • Akio Hoshi: Climbs the mega-towers to challenge Valdric's cold military technology with pure stellar plasma.
  • Narrative Context: Symbolizes the collision of rampant technocracy with human spirit, where high-voltage capacitors and corporate tyrants clash with rogue awakenings.

3. Moonlit Bamboo Grove (bamboo) — Bambuzal ao Luar

Moonlit Bamboo Grove

  • Atmosphere: An ancient, whispering jade bamboo forest illuminated by a radiant full moon. Deep teal shadows, a murmuring mountain brook, glowing fireflies, and weathered stone lanterns create an aura of silent danger.
  • Native Fighters (Home Stage):
    • Shion Kurogane: Shion's secluded sanctuary where he meditates under the pale moon, practicing his heavy lunar sword forms.
    • Suzume Kagerou: The shadow corridor through which Suzume stalks her targets, moving silently between bamboo stalks.
    • Lian Feng: Sacred groves surrounding the lower slopes of the Jade Lantern sanctuaries.
    • Jin Kazaguruma: The high canopy highways where Jin leaps between bamboo tips with his gale chakrams.
  • Key Challengers & Story Battles:
    • Kaname Fuyutsuki: Dueling Shion under the full moon to determine whether sorrow or divine duty wields the truer blade.
    • Mikazuki Oboro: The shadows twist into nightmare ravens as Oboro sends phantom assassins to eliminate the surviving clan heirs.
  • Narrative Context: The battleground of stealth, patience, and poetic stillness, where a single rustle of bamboo leaves heralds a lethal strike.

4. Rocky Plateau (plains) — Planalto Rochoso

Rocky Plateau

  • Atmosphere: Immense sandstone mesas and sun-baked canyon terraces beneath a luminous azure sky. Golden steppe grasses sway along weathered geological strata, offering an expansive, unobstructed natural arena.
  • Native Fighters (Home Stage):
    • Daichi Ginrou: The rugged canyon perimeter where Daichi runs with silver wolves and tests his golden ki against solid stone.
    • Akio Hoshi: Ancient meteorite impact sites where Akio meditates on fallen cosmic stones.
    • Captain Marlow Reyes: The open desert canyons where Marlow grounds his sky-galleon for repairs and duels.
    • Sylene Vashti: A windswept highland where Sylene practices freezing the arid air into protective glacial walls.
  • Key Challengers & Story Battles:
    • Bruno Volk vs. Daichi Ginrou: A clash of titans where heavy boxing punches collide with lupine claws, shaking the mesa.
    • Marlow Reyes vs. Lian Feng: A high-stakes duel over ancient maps found within the sandstone ruins.
  • Narrative Context: Represents raw, untamed natural vitality, geological endurance, and the honest joy of physical combat beneath the open sun.

5. Gate of Spirits (spirit) — Portão dos Espíritos

Gate of Spirits

  • Atmosphere: Weathered vermilion torii gates standing sentinel over an ancient mist-shrouded shrine courtyard. Turquoise spirit motes drift between mossy stone lanterns and colossal sacred camphor trees beneath a quiet night sky.
  • Native Fighters (Home Stage):
    • Kaname Fuyutsuki: The sacred gateway protected by Kaname's Everwinter blade, serving as the border between the mortal and spirit realms.
    • Haruki Sumi: The ancient shrine vaults where Haruki studies forgotten sealing texts and prays to keep the Twilight Titans asleep.
  • Key Challengers & Story Battles:
    • Mikazuki Oboro: Manifests his shadow illusions directly at the torii gate, seeking to tear open the veil between the living and the dead.
    • Garan the Ashen Oni: Stalks the shrine perimeter, seeking to shatter Haruki's paper talismans and consume the spirits within.
    • Suzume Kagerou: Infiltrates the sacred grounds to intercept Oboro's disciples before they desecrate ancestral graves.
  • Narrative Context: The metaphysical heart of the world, where divine judgments are passed and the spiritual fabric of reality is either defended or corrupted.

6. Volcanic Crater (volcano) — Cratera Vulcânica

Volcanic Crater

  • Atmosphere: An active basalt caldera glowing with incandescent rivers of orange magma. Crimson volcanic smoke, floating embers, and intense amber rim lighting illuminate a solid obsidian fighting terrace laced with glowing fissures.
  • Native Fighters (Home Stage):
    • Garan the Ashen Oni: The hellish subterranean threshold from which Garan crawled into the mortal realm.
    • Mikazuki Oboro: The convergence apex where the ritual of the Scarlet Eclipse focuses planetary cosmic energy.
    • Valdric Morn: The industrial geothermal smelting foundries where the Red Star Empire manufactures heavy warmachines.
  • Key Challengers & Story Battles:
    • Sylene Vashti: Sylene ventures into the burning caldera to freeze the molten veins and avenge her frozen homeland.
    • Kaito Arashi: The climactic final confrontation against Oboro and Garan to disperse the crimson clouds with the Eye of the Storm.
  • Narrative Context: The domain of primordial chaos, destruction, and ultimate stakes. The final testing ground where the fate of all converging realities is decided.

7. Hinterland Plaza — Brazil (brazil) — Praça do Interior — Brasil

Hinterland Plaza

  • Atmosphere: A warm, charming small town square in the Brazilian interior (inspired by historic Minas Gerais and São Paulo countryside) at golden hour. Pastel colonial stucco houses with aged wooden shutters, a cream-and-blue church in the background, a traditional bandstand (coreto), flowering ipê and jacarandá trees, and classic Portuguese stone paving (calçada portuguesa).
  • Native Fighters (Home Stage):
    • Bruno "Bulldozer" Volk: The beloved town square where Bruno grew up, works out at the local gym, and protects his neighbors.
  • Key Challengers & Story Battles:
    • Haruki Sumi: Arrives seeking quiet shelter and warm hospitality, welcomed by Bruno with fresh coffee and cheese bread (pão de queijo).
    • Daichi Ginrou: Enters the town with a wide grin, drawn by rumors of an unbeatable heavyweight champion who fights with bare fists.
    • Valdric Morn: An imperial scouting squad attempts to annex the town for raw resources, only to be met by Bruno and an outraged community.
  • Narrative Context: Represents the warmth of community, the resilience of everyday working people, and the peaceful mortal lives that the heroes are fighting to protect. It uses the plains theme music and has no legacy procedural counterpart.

The 7 Modern Wonders of the World

8. Great Wall of China (great_wall) — Grande Muralha da China

Great Wall of China

  • Atmosphere: An ancient stone fortification winding across rugged mist-shrouded green mountain ridges at sunrise. Imposing brick watchtowers frame the battlement fighting deck, with golden morning sunlight breaking through soft clouds and fluttering imperial banners.
  • Lore & Affinities: Sacred bastion where martial artists of the East test their endurance and footwork. Lian Feng and Jin Kazaguruma hold exhibition clashes along the winding ramparts.

9. Petra — Al-Khazneh (petra) — Petra — Al-Khazneh

Petra

  • Atmosphere: The monumental rose-red rock-cut Hellenistic temple facade of The Treasury carved into towering sandstone canyon walls of the Siq. Warm desert sunlight, glowing bronze braziers, and a level sandstone arena floor.
  • Lore & Affinities: Hidden desert sanctuary of forgotten merchant princes and desert nomads. Daichi Ginrou and Marlow Reyes duel for ancient relics stored within the rock-cut vaults.

10. Christ the Redeemer (christ_redeemer) — Cristo Redentor — Corcovado

Christ the Redeemer

  • Atmosphere: Perched atop Mount Corcovado in Rio de Janeiro at golden sunset. The colossal Art Deco statue opens its arms over Guanabara Bay and Sugarloaf Mountain far below as twilight colors wash across the sky and city lights flicker to life.
  • Lore & Affinities: A beacon of divine grace and sanctuary overlooking the metropolis. Bruno Volk and Haruki Sumi clash under the sacred silhouette at dusk.

11. Inland Town — Texas, USA (texas) — Cidade do Interior — Texas, EUA

Inland Town — Texas

  • Atmosphere: A historic frontier small town in inland West Texas at dusty golden sunset. Weathered wooden clapboard saloon and general store with covered boardwalk porches, an old red brick courthouse with a bell tower cupola, a spinning steel windmill water tower, telegraph poles with drooping wires, the Texas Lone Star flag fluttering in the breeze, saguaro and prickly pear cactus framing the edges, and a broad level packed sand and dirt fighting road.
  • Lore & Affinities: The rugged heartland of lone wanderers, brawlers, and frontier lawmen. Bruno Volk and Captain Marlow Reyes duel in high-noon brawls along the dusty thoroughfare.

12. Chichén Itzá (chichen_itza) — Chichén Itzá — Templo de Kukulcán

Chichén Itzá

  • Atmosphere: The grand Mesoamerican step-pyramid of El Castillo under a deep purple twilight sky scattered with ancient Mayan constellations. Carved feathered serpent heads flank the stone balustrades amid lush tropical jungle foliage.
  • Lore & Affinities: Nexus of celestial alignments and feathered serpent deity worship. Mikazuki Oboro and Garan invoke eclipse magic on the ceremonial plaza.

13. Colosseum of Rome (colosseum) — Coliseu de Roma

Colosseum of Rome

  • Atmosphere: The monumental Roman amphitheater in late golden-hour afternoon. Multi-tiered travertine arches, weathered Corinthian columns, imperial red vexillum banners, and packed golden fighting sand.
  • Lore & Affinities: Legendary epicenter of gladiator combat and martial glory. Bruno Volk, Daichi Ginrou, and Valdric Morn clash in ruthless exhibition duels before the imperial banners.

14. Taj Mahal (taj_mahal) — Taj Mahal — Palácio de Mármore

Taj Mahal

  • Atmosphere: The radiant ivory-white marble mausoleum reflected in the tranquil Yamuna reflecting pool at pink-gold dawn. Slender cypress trees, lotus pools, and intricate carved marble jali screens frame the polished fighting deck.
  • Lore & Affinities: Eternal monument of love and perfection. Akio Hoshi and Lian Feng exchange harmonious ki strikes across the pristine marble terrace.

The 7 Ancient Wonders of the World

15. Great Pyramids of Giza (pyramids_giza) — Pirâmides de Gizé

Great Pyramids of Giza

  • Atmosphere: Colossal limestone pyramids of Khufu and Khafre rising against a burning desert sunset. The limestone profile of the Great Sphinx and distant date palm silhouettes gaze over the level sandstone terrace.
  • Lore & Affinities: Primordial tomb complex where Pharaohs attained immortality. Garan and Marlow Reyes search for forbidden astral relics beneath the shifting dunes.

16. Hanging Gardens of Babylon (hanging_gardens) — Jardins Suspensos da Babilônia

Hanging Gardens of Babylon

  • Atmosphere: Monumental multi-tiered palace terraces cascading with tropical blossoms, date palms, weeping willows, and aqueduct waterfalls. Lapis lazuli glazed brick walls with gold lion reliefs overlook the Euphrates.
  • Lore & Affinities: Mesopotamian wonder built by royal love. Haruki Sumi and Sylene Vashti duel amid fragrant jasmine and cascading mountain waters.

17. Temple of Artemis at Ephesus (temple_artemis) — Templo de Ártemis em Éfeso

Temple of Artemis at Ephesus

  • Atmosphere: Colossal Greek temple colonnade of fluted Ionic marble columns under a starry Aegean night sky. Glowing bronze sacrificial braziers, olive groves, and coastal hills frame the polished marble courtyard.
  • Lore & Affinities: Sacred sanctuary of the huntress goddess. Suzume Kagerou and Shion Kurogane cross blades under the cool lunar light.

18. Statue of Zeus at Olympia (statue_zeus) — Estátua de Zeus em Olímpia

Statue of Zeus at Olympia

  • Atmosphere: Sanctuary interior housing the colossal chryselephantine seated Zeus on an ornate cedarwood throne. Ivory skin, golden robes, winged Nike, and burning bronze cauldrons casting dramatic shadows across mosaic marble.
  • Lore & Affinities: The seat of Olympian authority and thunderous power. Kaito Arashi and Valdric Morn test storm energy against imperial authority.

19. Mausoleum at Halicarnassus (mausoleum_halicarnassus) — Mausoléu de Halicarnasso

Mausoleum at Halicarnassus

  • Atmosphere: Monumental marble tomb with sculpted Amazonomachy friezes, 36 slender Ionic columns, a stepped pyramid roof, and a crowning marble four-horse chariot overlooking the turquoise Aegean harbor.
  • Lore & Affinities: Splendor of Anatolian and Hellenic artistry. Kaname Fuyutsuki and Akio Hoshi duel beneath the guardian marble lions.

20. Colossus of Rhodes (colossus_rhodes) — Colosso de Rodes

Colossus of Rhodes

  • Atmosphere: Titanic bronze statue of Helios crowned with a spiked solar halo standing tall over the stormy twilight harbor entrance. A blazing beacon brazier pierces violet tempest clouds while turquoise waves crash against the pier.
  • Lore & Affinities: Guardian of the Mediterranean sea routes. VX-9 Volta and Marlow Reyes clash on the rain-swept harbor pier beneath the beacon flames.

21. Lighthouse of Alexandria (lighthouse_alexandria) — Farol de Alexandria — Pharos

Lighthouse of Alexandria

  • Atmosphere: The monumental three-tiered Pharos tower projecting a brilliant golden light beam over churning Mediterranean waves at midnight. White limestone battlements and royal Ptolemaic banners frame the ramparts.
  • Lore & Affinities: Guiding light across dangerous seas and cosmic crossroads. Kaito Arashi, Shion Kurogane, and Jin Kazaguruma meet at the midnight ramparts as the beacon sweeps the horizon.

Visual Effects

Presentation-only effects live in src/vfx.rs and src/vfx/; the simulation never reads them.

  • Impact tiers (src/vfx/impact.rs): light (<40 damage), medium (<90), heavy (heavy hitdef or >=90) and hyper (>=150). Each tier sets spark count and speed, glow, shockwave radius, flare, camera punch, shake, flash and chromatic kick. Works for any character because it reads the engine Hit event.
  • Ground cracks (src/vfx/crack.rs): heavy and hyper hits on a grounded defender leave glowing cracks that fade out (high quality only).
  • Quality (src/vfx/quality.rs): follows the fx option (0 low, 1 medium, 2 high). Counts scale by 0.35 / 0.7 / 1.0; medium drops cracks and stage lights, low also drops debris and half of the flare. Touch devices already start at medium.
  • Particles stay in the shared MAX_PARTS pool; no allocation happens per hit beyond the pool.
  • UME_SHOTS_ONLY=fx renders hit, heavy, hyper, counter, guard and super stills.
  • Super and awakening (src/vfx/awaken.rs): layered rings (chest and ground), energy pillar of embers, 360 degree spark burst, ground cracks on high quality.
  • Dash (src/vfx/dash.rs): speed streaks and a ground ring when a fighter starts a ground dash.
  • KO finish (src/vfx/ko.rs): three staggered shockwaves, white core, 360 degree sparks, radial slashes, debris and ground cracks on the loser. Simulation-side cost: cargo test --release --bin ultimate-mugen cost -- --ignored --nocapture.

Cinematic post-processing (assets/postfx.toml)

src/postfx/look.rs reads postfx.toml (next to the executable, or localStorage on the web) and falls back to the embedded assets/postfx.toml. Missing keys keep neutral values and out-of-range values are clamped.

SectionKeysEffect
bloomintensity, threshold, knee, tintGlow strength, where it starts, soft-knee width (Bevy/Unreal style, no hard cut) and a warm halation tint
gradetonemap, exposure, split, shadows, highlightsACES filmic curve (0 off, 1 full), exposure, and a split tone that tints shadows and highlights
distortionshockwave, heatScreen refraction from impact rings and heat haze around supers
lenschroma, vignette, grain, sharpenMultipliers for the existing lens effects and contrast-adaptive sharpening (4 extra taps)
qualitygrade_from_level, shockwave_from_level, heat_from_level, bloom_from_levelLowest fx level (0 to 2) where each effect runs
  • Shockwaves: rings with a radius of 24 or more push up to 4 refraction bands (ume_shell::waves::shockwave) into the composite pass; no extra render pass.
  • All of it lives in the single composite shader, so the cost is one extra texture-free math block per pixel; fx level 0 skips post-processing entirely.
  • Tests: cargo test -p ume-render --test headless and cargo test --bin ultimate-mugen postfx.

How it compares

TechniqueWhere it comes fromHere
Soft-knee bloom thresholdBevy, Unrealbloom.knee
Warm halation tintFilm look, Godot glow colourbloom.tint
Contrast-adaptive sharpeningFidelityFX CAS, Bevy ContrastAdaptiveSharpeninglens.sharpen
ACES filmic tonemapGodot, Bevy tonemappinggrade.tonemap
Impact refractionSF6 and Strive hit shockwavesdistortion.shockwave

Not done yet: HDR scene target (Godot/Bevy glow on float textures; the scene is 8-bit here), multi-mip bloom and anamorphic streaks, and normal-mapped 2D lights.

Antialiased shapes

Vector shapes drawn through ume_shell::quad carry a one-pixel alpha fringe built in the vertex data (crates/render/src/canvas/shape.rs), so slanted UI bars, circles, rings and diagonal lines have smooth edges on every backend without MSAA.

  • draw_convex (used by Ui::quad), draw_circle, draw_ellipse, draw_poly, draw_circle_lines and draw_line are feathered. draw_triangle, draw_mesh and rectangles stay hard, because they are used as pieces of larger meshes and a fringe would leave seams.
  • Axis-aligned edges are never feathered: they already land on the pixel grid, and stacked strips keep touching.
  • Corners are mitered with a 3x limit, and shapes with an inradius under 1 px fall back to the plain fan.
  • Lines and rings thinner than 1 px keep their width and fade their alpha instead, so hairlines stop flickering.
  • glow (src/glow.rs) is one radial gradient mesh (241 vertices, one layer of overdraw) whose falloff integrates the 14 stacked discs it replaced (910 vertices, 14 layers), so the look is the same without banding.

Cost, measured with UME_TOUR=perf (Kaito vs Shion, 1280x720): fight frames went from 2999 to 3921 vertices on average and batch build from 0.20 to 0.23 ms; draw calls did not change (12.5).

CPU tactics

crates/engine/src/ai.rs picks moves by distance and dice; crates/engine/src/ai/tactics.rs adds reactions for CPU level 3 and above. Works for native (UMF) and M.U.G.E.N fighters alike, because it only reads commands, the move list and fighter state.

TacticTriggerAction
Anti-airRival airborne, descending (vel.y > 0) and within ~105 unitsPicks a usable command whose motion starts F, D, DF (dragon punch)
Whiff punishRival attacking, no contact yet, state time over 6 ticks, just out of reach (0.8 to 2.0 times the near range)Picks a multi-step (ranged) command
Hit confirmOwn attack connected (move_hit > 0) and control not back yetPicks a multi-step command; the compiler's cancel rules let it connect
Meter disciplineEvery random or reactive pickNeeds power >= cost; EX moves keep one bar in reserve; supers only while the rival is in hit-stun, below 40 % life, or the fighter is below 50 % life

Each reaction fires with probability 0.35 + 0.6 * skill and sets a short cooldown.

Evidence

cargo run --release -p ume-engine --example native_duel (21 fighters, 1260 rounds, level 6, 3 seeds): see docs/evidence/ai-tactics/.

BeforeAfter
Knockout rate83.4 %96.7 %
Average round70.9 s54.5 s
Damage per round13881527
Win-rate spread24.7 pts23.2 pts
Rounds with stuck fighter00

Tests: cargo test --release -p ume-engine --test it ai_tactics:: and the unit tests in ai/tactics.rs.

Reading the rival (ai/reading.rs)

SkillBehaviour
Reaction delayThe CPU only sees an attack after (8 - level) * 2 ticks, so low levels block late and level 8 reads at once
Guard heightBlocks low or high from the attack's guardflag instead of guessing
Block punishRival move was guarded and he is still recovering: answers with a single-input normal (more often at higher levels)
Rival profileMoving averages of how often the rival jumps and guards: jumpy rivals raise the anti-air chance, turtles raise the attack chance

Evidence in docs/evidence/ai-reading/: cargo run --release -p ume-engine --example ai_ladder plays mirror matches between levels (level 8 beats level 3 in 66.7 % to 86.5 % of rounds, level 6 beats 3 in 54.8 % to 81.0 %), and native_duel shows 96.7 % to 99.4 % knockouts with the average round going from 54.5 s to 45.6 s.

Contributing to Ultimate MUGEN

English · Português (BR)

Thanks for helping. This page gets you from a fresh clone to a merged pull request. The full documentation is the wiki at https://juninmd.github.io/ultimate-mugen/wiki/.

Where to start

Build and run

git clone https://github.com/juninmd/ultimate-mugen
cd ultimate-mugen
cargo run --release

On Linux install libudev-dev libasound2-dev libx11-dev libxi-dev libgl1-mesa-dev pkg-config first. The browser build is ./scripts/build-web.sh, served from web/dist.

Checks to run before a pull request

CheckCommand
Rust testscargo test --workspace --release
File size ceiling (250 lines)node scripts/file-size.mjs
Crate boundariesnode scripts/crate-boundaries.mjs
Script testsnode --test scripts/*.test.mjs
Wiki book./scripts/build-wiki.sh (needs mdbook)
Browser smoke./scripts/build-web.sh then node scripts/web-smoke.js web/dist (Playwright)

Do not run cargo fmt --all: the tree is not rustfmt-clean and it rewrites unrelated files. Format only files you created with rustfmt --edition 2021 <file>.

Rules

  • No comments in code; names must explain intent. Explanations go to the wiki.
  • English is the default language for code, commits, issues and docs. Portuguese lives in *.pt-BR.md files and docs/wiki/pt-BR/; keep both in sync.
  • A source file stays under 250 lines. Files already over the ceiling may not grow; see File layout.
  • crates/engine is deterministic: no clocks, threads, randomness or allocation inside Match::tick.
  • Respect the crate boundaries in Architecture; scripts/crate-boundaries.mjs enforces them in CI.
  • Update docs/wiki/ whenever a format, controller, trigger, flag or folder layout changes.
  • Significant design changes get an ADR in docs/wiki/adr/.

Pull requests

  • Title must be type(scope)?: description with type in feat|fix|perf|refactor|docs|test|build|ci|chore|style|revert; commit-lint rejects anything else.
  • Keep a PR to one concern. Put new logic in a new file and wire it with one line in shared files, so parallel PRs do not collide.
  • Include screenshots or GIFs (before and after) for anything visible, and a browser smoke result for gameplay, rendering, loading or input changes.
  • Releases are automatic from master commit types; feat is minor, fix and perf are patch.

Acknowledgments

Ultimate MUGEN is inspired by Elecbyte's M.U.G.E.N and Ikemen GO. Please keep that credit respectful in docs and discussions.

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.

Extension points

English · Português (BR)

Most content is data. This page maps each kind of content to the file that defines it, the page that documents it and whether a Rust change is needed. Add new content here first, in code only when the data cannot express it.

ContentWhere it livesDocumented inRust change
Native fighterassets/chars/<id>.json, listed in assets/chars/index.jsonUMF character, Make a characterNo
Fighter bios and nationalityassets/char_profiles.jsonCharactersNo
M.U.G.E.N fighter or stagemugen/chars/, mugen/stages/ or the marketplaceAdding M.U.G.E.N content, MarketplaceNo
Built-in stage from dataassets/stages/data/<id>/stage.def and its files, embedded by build.rsMake a stageNo
Stage look (rim light, tint, vignette)assets/stagelook.tomlVisual effectsNo
Stage propsassets/stageprops.toml and assets/props/Visual effectsNo
Story objects (crates, pickups, bonus rounds)assets/story/objects.tomlStage objectsNo
Story epiloguesassets/story/epilogues.jsonStory modeNo
Arcade routes and unlocksassets/routes/unlocks.tomlRoute filesNo
Post-processingassets/postfx.tomlVisual effectsNo
Passives, signature metersfields of a UMF fighterPassivesNo
State controller or triggercrates/engineCustomizing the engine, CNS scriptsYes
New file formatcrates/formatsArchitectureYes
New screensrc/app/<screen>.rsFile layoutYes

Rules for a new kind of content

  1. Define it as a data file under assets/, embedded through build.rs when it ships with the game.
  2. Give it a wiki page with an English and a pt-BR version, and add a row to the table above.
  3. Add a test that loads the shipped files, so a broken data file fails CI instead of the game.
  4. Record the choice in an ADR when it introduces a new format.

Customizing the engine

Architecture

PathResponsibility
crates/formatsM.U.G.E.N file readers: INI, SFF, AIR, SND, ACT, PCX, PNG, stages, virtual file system (folders and zips). No platform dependencies
crates/engineState machine: expressions (expr.rs), triggers (triggers.rs), controllers (controllers.rs), HitDef (hitdef.rs), fight (matchs.rs), commands and input, UMF compiler (native/)
src/Application: window, render, HUD, audio, menus, native stages, visual effects, controls and gamepad
web/Page, service worker and the browser JS bridge
assets/charsBundled UMF fighters

Tick flow: inputs → Match::tick → for each fighter, [Statedef -3/-2/-1] and the current state → controllers whose triggers are true → physics → collision and apply_hit → camera. Simulation runs at 60 ticks per second, is deterministic and independent from rendering.

Add a state controller

  1. In crates/engine/src/controllers.rs, inside run, add a branch with the lowercase name:
#![allow(unused)]
fn main() {
"victoryquote" => { let v = n(m, "value", -1.0) as i32; m.fighters[i].victory_quote = v; }
}

victory_quote is a new field you add to Fighter.

  1. n(m, "param", default) reads a numeric parameter; n2(m, "param", default, index) reads the Nth value; sc.has("param", 0) tests presence; sc.raw("param") returns the text.
  2. Add the field in fighter.rs if you need new state.
  3. Write a test in crates/engine/tests/combat_logic.rs calling ume_engine::controllers::run.
  4. List the name in CNS-Scripts.md and pt-BR/Scripts-CNS.md. cargo test -p ume-engine --test it wiki_sync:: fails for an implemented controller that is not listed and for a listed one that is not implemented. Return true from the module's run (or fall through to the last branch) so the load diagnostics do not report it as unsupported.

Add a trigger

In crates/engine/src/triggers.rs, add a branch to the name match:

#![allow(unused)]
fn main() {
"winko" => b(m.match_over && m.winner_side == f.side as i32 && m.won_by_ko),
}

f is the evaluated fighter and m the match. won_by_ko would be a new field on Match. b(bool) converts to 0/1. Triggers returning floats must appear in is_float in expr.rs. List the new name in CNS-Scripts.md and pt-BR/Scripts-CNS.md; wiki_sync checks both directions.

Add a file format

Put the decoder in crates/formats/src/<format>.rs, export it in lib.rs and test it with real files in crates/formats/tests/real_files.rs. The crate must keep compiling for wasm32-unknown-unknown.

Tests

CommandCovers
cargo test --workspace --releaseEverything
cargo test -p ume-engine --test kfmReference Kung Fu Man
cargo test -p ume-engine --test it combat_logic::Combat rules
cargo test -p ume-formatsDecoders
cargo clippy --workspace -- -D warningsLint
node scripts/web-smoke.js web/distWeb build in Chromium
node scripts/web-match-smoke.js web/distFull match in Chromium: inputs, rounds, no freeze, results

Code rules

  • No code comments: names of functions, types and variables must explain intent. Explanations live in this wiki.
  • Code, commits, issues and documentation are written in English. Portuguese translations live in *.pt-BR.md files and docs/wiki/pt-BR/.
  • The simulation (crates/engine) uses no clock, threads or randomness outside Match::random, to keep replays and rollback working.
  • No allocation inside Match::tick in new code.
  • Files stay under 250 lines with one responsibility each, split by axis of change: see File layout and node scripts/file-size.mjs.
  • Conventional Commits (feat:, fix:), validated by scripts/commit-lint.mjs.

Architecture decisions

TopicChoice
Renderwgpu (Vulkan, Metal, DX12, WebGPU, WebGL2), palette in the shader
ScriptsCNS and ZSS for fighters, UMF JSON for the native format; no Lua
ExpressionsStack bytecode
Audiokira + symphonia
Networkggrs (rollback) + matchbox (WebRTC)

The migration is described in docs/ROADMAP.md.

State ownership and control

A fighter runs a state from the definition that gave it: its own .cns, the shared common1.cns, or another character's definition (TargetState, p2stateno, a throw). Three rules keep control flowing:

  • A state number the character defines always runs from the character's own definition, so returning from an engine state (face-off, awakening) or from a common1 state hands control back instead of leaving the fighter owned by the shared file.
  • States from common1.cns are the player's own: the character's -1 states and the engine's walk/jump/crouch transitions keep running during a get-hit, lie-down or any other shared state — M.U.G.E.N. characters cancel hits from -1 that way.
  • Only a custom state given by the opponent pauses them, because the giver's script owns the fighter until it hands control back.

A fighter whose state owner is not itself and not common1 is "in a custom state"; the helpers that answer this are the guard for every input-driven transition, so losing it makes the character stand still while still reading as alive (ctrl, state 0).

HUD glass and impact effects

  • The in-fight HUD panels are "glass": ume_shell::quad::glass_panel registers up to 16 rounded rectangles per frame, and the post-processing composite pass replaces those pixels with a blurred copy of the scene (quarter resolution, separable blur, no per-frame allocations), plus tint, drop shadow and a rim highlight. With post-processing off (fx level 0) the HUD falls back to translucent polygons.
  • Impact feedback is deliberately small: guard and counter share the same small label and ring, super arts only get a light ring burst and a compact label, and the number of simultaneous floats, rings, lights and particles is capped in src/vfx.rs.

File layout

English · Português (BR)

A feature must be reviewable and mergeable without waiting for other features. That only works when a file has one reason to change: two people editing different features then touch different files, and a pull request that adds a mode does not rewrite the file another pull request is editing.

The 250-line rule

  • No source file exceeds 250 physical lines (node scripts/file-size.mjs).
  • The ceiling is not a target. Most files should stay between 80 and 200 lines: if a file already has two reasons to change at 120 lines, split it now.
  • The rule covers Rust, JavaScript, TypeScript, CSS, HTML and WGSL - every file a developer reads as code.
  • It does not cover content and docs: UMF JSON, .cns, .air, .def, .snd, sprite atlases, .md pages and generated images.
  • Generated Rust tables count as source. When they do not fit, put them in a data-only file under a folder named for the table (for example native/tables/) so nobody edits them by hand.

Grandfathering (the ratchet)

The tree already has files over the ceiling. They are listed in scripts/file-size-baseline.json with the exact line count they had when the rule landed.

  • A file in the baseline may stay large, but it may not grow by a single line.
  • A file that is not in the baseline must be born under 250 lines.
  • A file that goes under 250 lines must leave the baseline. Run node scripts/file-size.mjs --update in the same pull request that split it.
  • Never regenerate the baseline to raise a number. --update is only valid together with a split.

CI runs node scripts/file-size.mjs; a failing run prints each offending path with its count and the limit.

One responsibility per file

A file has one responsibility when all the answers below are the same:

QuestionSame responsibilityDifferent responsibility
Why would it change?two functions change when the format changesone changes with the format, the other with the camera
What data does it own?one struct and its helpersseveral structs that talk to each other
Who reviews it?the same reviewer with the same contexta different specialist
Can it be tested alone?yes, with the crate's public APIonly through the whole screen

The file name states the responsibility: collision.rs, hitdef.rs, palette.rs, lifebars.rs. Names that hide a responsibility are rejected in review: utils.rs, helpers.rs, misc.rs, common.rs, manager.rs.

Folder shape

A feature is a folder; the file next to it is its public face.

crates/native/src/
  mod.rs            facade: declarations and re-exports only
  compile.rs        UMF JSON -> states
  pack.rs           sprite atlas packing
  effects.rs        projectile and spark effects (the only engine-drawn art)
  effects/
    dragon.rs       energy dragon effect
  • feature.rs holds the types every part shares and the functions the rest of the crate calls.
  • feature/<concern>.rs holds one concern each. Rust lets a folder sit next to the file with the same name, so no mod.rs is needed inside it.
  • mod.rs is a facade: module declarations, pub use re-exports, nothing else. Aim for 60 lines; a mod.rs with logic is a file that was not split.
  • Move a type with the code that owns it. Keep the old path working with a re-export (pub use collision::ResolvedHit;) so a split does not become a rename across the whole tree.
  • The app mirrors the same idea: src/app.rs keeps the frame and state, src/app/<screen>.rs owns one screen each.

src/app/ screen map

src/app.rs keeps the App state, the per-frame dispatcher (App::frame) and the screens not split yet (character select, VS loading). Every other screen is one file, so a change to one screen never touches another:

FileOwns
mode.rs, screen.rs, team.rsMode, Screen and Team types (re-exported from app)
title_screen.rs, menu_screen.rs, menu_focus.rsTitle, main menu, eased menu focus
stage_select.rsStage grid
load_plan.rs, vs_screen.rsWho loads with which palette, VS screen, start_fight
fight_screen.rsThe fight frame and team rotation
results_screen.rsResults screen
netplay_session.rsNetplay start, overlay and replay capture
fighter_draw.rsFighter preview drawing shared by menus
pause/, arcade/, story/, cutscene/Features that already had a folder

A screen file is use super::*; plus one impl App block; its entry method is pub(super). Add a screen by creating the file and wiring it with one mod line and one match arm in App::frame.

Splitting an existing file

  1. List the responsibilities in the file. If the list is not obvious, read the callers first; the file is not understood yet.
  2. Create feature/ and move one responsibility per pull request, one commit per extraction.
  3. Change no behavior while extracting. Tests must pass before and after, and the diff must be mostly moves.
  4. Extract the smallest cohesive unit first (the one with fewer callers). Big-bang rewrites conflict with every open pull request.
  5. Update this page if the new layout is different from the one described here.

Working in parallel

  • Prefer new files. A feature adds feat/<thing>.rs and one registration line; it does not append a block to a hot file.
  • Registration points are the only files two features legitimately share. Add one line, in alphabetical order, and never reformat the file: controllers.rs and triggers.rs match arms, mod.rs declarations, assets/chars/index.json, route tables.
  • If a feature must touch a hot file, land the logic in its own file first and rebase the one-line wiring last, so the conflict is a single line.
  • Do not rename or reformat a shared file in a feature pull request. Do it alone, with no behavior change.
  • One wiki page per feature, linked from Home, so two features do not edit the same paragraph.

Hot files to split first

These files hold the most unrelated responsibilities and are the current source of merge conflicts. Splitting one of them removes its baseline entry.

FileLinesSuggested split
crates/native/src/effects.rs1711effects/canvas.rs, effects/raster.rs, effects/kinds.rs
crates/engine/src/matchs.rs1751matchs/round.rs, matchs/collision.rs, matchs/camera.rs, matchs/tick.rs
src/app.rs2238Nine screens already live in src/app/; next are select (830 lines, split by grid, side panel and input) and load_step_inner
src/stages.rs1069stages/load.rs, stages/layers.rs, stages/motion.rs
src/stagefx.rs704stagefx/scenes.rs already exists; extract stagefx/particles.rs, stagefx/weather.rs
src/market.rs700market/install.rs, market/listing.rs; the crate keeps the logic
crates/formats/src/screenpack.rs610screenpack/lifebars.rs, screenpack/motif.rs

Review checklist

  • No new file over 250 lines.
  • No grandfathered file grew.
  • A file that crossed under 250 lines left the baseline in this pull request.
  • New logic lives in a file named after it, not in utils.rs.
  • Shared files show one-line registrations, no reformatting.
  • The wiki page for the feature is updated in English and Portuguese.

Dev tools

English · Português (BR)

Repository build and audit tools are Rust binaries, not scripts. crates/devtools builds ume-tools:

CommandReplacesWhat it does
ume-tools pack-sprites [out] [--sprites dir]scripts/pack_sprites.pyPacks assets/chars/sprites/<id>/ into <out>/assets/chars/sprites/<id>.pack for the web build (768 px cap, 256 colours as LZ4 sprites, meta.json anchors rescaled, parallel). Run by scripts/build-web.sh
ume-tools cook-sff <in.sff> <out.sff>-Repacks an .sff as LZ4 UMSF and fails unless every sprite decodes identically. See Sprite Container
ume-tools stage-thumbs [stages]scripts/generate-stage-thumbnails.pyWrites 240x135 Lanczos thumbnails to <stages>/thumbs
ume-tools audit-moves [dir] [--json]scripts/audit_native_moves.pyStatic roster audit: inputs, cancels, throws, hit boxes
ume-tools audit-sprites --out report.jsonscripts/audit_native_sprites.pyExact-file PNG inventory with alpha bounds
ume-tools roster-audit [--chars dir] [--only text] [--fail-over severity]manual play-testingFights every character and stage and writes a severity report (Roster audit)
ume-tools mugen-census <zip-or-dir>...newCounts states, controllers, commands and animation actions of M.U.G.E.N packages and maps the top controllers to UMF fields, see M.U.G.E.N code study

Run them with cargo run --release -p ume-devtools --bin ume-tools -- <command>. Pose-resolution coverage is native_sprite_audit --require-complete (the removed native_sprite_coverage.py only mirrored it). Character creation tools live in crates/charforge (Sprite toolkit, Move generator).

Still Python

Only tools/story_segments.py remains: it draws the story stage strips with Python's random generator and Pillow rasterizers, and the committed stage art must stay byte-identical, so it is not ported. Everything else is ume-tools: gen-story-npcs (byte-identical to the old script, but it overwrites drifted committed NPC files), motion-descriptor, preview-motion, preview-scene, ability-reel (ffmpeg; captions use a built-in bitmap font) and the umf_edit library (key-order and line-ending preserving JSON edits). The one-off motion showcase image script was dropped; its output stays committed.

Performance

English · Português (BR)

How the engine keeps loading fast and frames smooth, and how to measure it.

Loading

StageWhat happensThreads
SFF v1 decodeSubfile headers scanned; PCX payloads are decoded in parallel across cores; linked sprites share source pixels (Arc)All cores (max 32)
SFF v2 decodeHeaders are read in order; LZ5, RLE5, RLE8 and PNG payloads are decoded in parallel; linked sprites share the source pixels (Arc)All cores (max 32)
Zip Import & DecompressionCentral directory scanned, entries decompressed in parallel with live ZipProgress visual loading bar and hardware thread trackingAll cores (max 32)
Character spritesPalette to RGBA conversion runs in parallel, once per unique pixel buffer and palette; linked sprites share one ImageData, so they also share one GPU uploadAll cores (max 8)
Stage spritesSame parallel RGBA conversion; the RGBA buffer is moved into the stage, never copiedAll cores (max 8)
Stage caching & reusesrc::registryMugenStage instances are cached across selection previews and match initialization in StageEntry, reducing match start stage loading from ~30 ms to 0.0 ms
Single-pass stage parsingume_formats::stageStage .def parsed once with parse_ini_no_lines and shared with 3D model detection, eliminating duplicate INI parsing and string line allocations
Common state cacheume_engine::commoncommon_def() cached via OnceLock<Arc<CharDef>>, eliminating ~4 ms duplicate parse of common1.cns per match
CNS & CMD single-pass parsingume_engine::loader, cnsSections parsed once using parse_ini_no_lines and shared between constants and states; avoids redundant INI passes
Expression & param bytecode cacheume_engine::chardefsafe_expr and Param::new cache parsed AST and bytecode across identical triggers and parameters via thread-local storage
Zero-alloc INI lookupsume_formats::iniSection::get and find_section use eq_ignore_ascii_case avoiding heap allocations; strip_comment short-circuits without comments
Select-screen portraitsload_mugen_portrait decodes only sprites 9000,0, 9000,1 and the first idle frame (plus their link sources) via decode_sff_only1
Native (UMF) sprites and effectsEvery unique frame is decoded or rasterized in parallelAll cores (max 8)
Whole characterLoaded on a char-load thread while the VS screen is shown1 background thread
VFS resolutionShort-circuiting single-candidate lookups, zero-alloc ASCII path normalization, and clone-free BTreeMap::range queriesCalling thread

The helper is ume_formats::par::map. On the web (wasm32) it runs on the calling thread, since the browser build has no threads.

Smooth frames

TechniqueWhereEffect
Frame pacingume_shell::PacerFrame times within 4% of a common refresh rate (30 to 240 Hz) become the exact period; the leftover is paid back once it adds up to a full period, so game time stays real time. With vsync this gives exactly one 60 Hz tick per frame instead of 0/2 jitter
Fixed stepSession::update60 Hz simulation with a tiny tolerance and at most 5 ticks per frame (no spiral of death)
Texture prefetchGfx::prefetch_step, App::warm_stepFighter sprites are uploaded to the atlas one 512 KiB chunk per frame across the loading steps (VS screen) or between yielded frames (start_fight), so no single frame pays for a whole fighter; a rematch with the same roster copies nothing
Sound prewarmAudio::preload_matchEvery fighter sound is decoded in parallel during the VS screen; sounds of characters no longer in the match are freed
Bytecode VMume_engine::bytecodeCNS/ZSS expressions compile into a flat stack VM ([f64; 32]) with inline redirects (parent, root, helper, enemynear), math/comparison intrinsics, zero/one-arg triggers, CmpStr, Special (animelem, timemod), and := assignments
Zero-alloc hot pathscommands, matchs, triggers, ai, ikemenArc<str> command keys, zero-allocation ASCII HitDefAttr matching, reusable scratch buffers for Clsn1/Clsn2 collision detection (fill_boxes), two-pass iterator AI move selection, and in-place RefCell::get_mut variable assignments avoid heap allocations per tick
Quad batch fast pathume_render::Batch, ume_shell::quadDedicated push_quad_verts writes contiguous quad indices without iterator mapping; unrotated quad coordinates bypass trigonometry (sin_cos)
Zero-alloc hot pathscommands, matchs, triggers, ai, ikemenArc<str> command keys, zero-allocation ASCII HitDefAttr matching, two-pass iterator AI move selection, and in-place RefCell::get_mut variable assignments avoid heap allocations per tick
Palette identity bypassume_engine::paletteis_identity() guard skips float trig, multiplications, and clamping on untouched palettes, plus short-circuiting in PalParams::combine and batch apply_slice
Zero-alloc hot pathscommands, matchs, triggers, ai, ikemenArc<str> command keys, zero-allocation ASCII HitDefAttr matching, scratch collision buffers (fill_boxes, fill_proj_boxes), stack array frozen projectiles, prefiltered remove_on_get_hit explods, and in-place RefCell::get_mut variable assignments avoid heap allocations per tick
Zero-alloc hot pathscommands, matchs, triggers, ai, ikemenArc<str> command keys, zero-allocation ASCII HitDefAttr matching, stack-array target indices, linear flat vector persistence, num_opt single-pass parameter evaluation, and in-place RefCell::get_mut variable assignments avoid heap allocations per tick
Zero-alloc hot pathscommands, matchs, triggers, ai, ikemenArc<str> command keys, zero-allocation ASCII HitDefAttr matching, branchless rel_dirs, single-cycle bitwise recent button checks in command matcher, and in-place RefCell::get_mut variable assignments avoid heap allocations per tick
Resilience boundsume_formats, ume_engine::matchsImage decoders reject headers above MAX_IMAGE_PIXELS (1 << 26) before allocating; matches cap helpers (60), explods (512), projectiles (256), and texts (128)
Zero-alloc hot pathscommands, matchs, triggers, ai, ikemenArc<str> command keys, zero-allocation ASCII HitDefAttr matching, branchless abs direction translation, O(1) close-range AI selection, in-place append_seq, zero-alloc stage background tile iteration, and in-place RefCell::get_mut variable assignments avoid heap allocations per tick

GPU memory

TechniqueWhereEffect
Palette in the shaderGfx::sprite_tex, IndexedTexture, PaletteM.U.G.E.N sprites with indexed pixels go to the 8-bit index atlas and are colored by a palette row in the shader: 4x less upload and atlas space than RGBA. RemapPal swaps the palette row instead of baking a new RGBA image
Separate atlas resetsume_shell::quadThe RGBA atlas (UI, text, true-color sprites) and the index atlas (+ palette rows) each reset on their own when full, so filling one never forces the other to re-upload
Composite fast pathspost.wgsl fs_compositeWithout radial blur the full-resolution pass takes 1 sample per pixel (3 with chroma) instead of 21, and glass panels skip pixels beyond their shadow reach. Output is unchanged; software-GPU frame time in UME_TOUR=perf went from 44 ms to 25 ms

Measuring

CommandMeasures
cargo run --release -p ume-engine --example mugen_load_bench [zip] [runs]M.U.G.E.N character load time (default: bundled elecbyte.zip)
cargo run --release -p ume-engine --example load_benchNative (UMF) compile time
cargo run --release -p ume-engine --example tick_bench -- [zip_or_dir] [seconds] [per_side]Simulation throughput (ticks/s) and latency percentiles (p50, p99, max, 16.6 ms frame budget %)
cargo run --release -p ume-engine --example sprite_mem -- <char_dir>...Sprite payload per fighter: sprites, index/RGBA atlas MB, largest sprite (sizes the warm-up budget)
cargo test -p ume-engine --release --test it tick_alloc::Zero allocations per simulation tick
cargo test -p ume-formats --release --test it fuzz_resilience::Mutation fuzzing across SFF v1/v2, SND, PCX, PNG, FNT, RLE8/RLE5/LZ5, AIR and INI decoders
cargo test -p ume-engine --release --test it stress_resilience::Hostile CNS expressions, recursive helper/explod/projectile floods, and 4v4 simul stress
UME_TOUR=perf --shots <dir>Full frame loop of a real CPU-vs-CPU match: simulation and draw time percentiles, vertices, draw calls, atlas uploads/fill and RSS, once per second

Reference (release): kfm went from 48.3 ms to 3.5 ms (13.8x faster), kfm720 from 60.1 ms to 7.8 ms (7.7x faster). Simulation tick throughput reaches 235,000+ ticks/s at p50 0.004 ms (0.1% frame budget).

Frame and memory profiling

UME_TOUR=perf drives the real App (not a synthetic loop) and reports, once per second:

perf: 1s step p50 0.03 p99 0.11 max 0.21 · draw p50 0.09 p99 0.26 max 1.11 ·
frame p50 5.52 p99 5.75 max 5.84 ms · 1661 v 2.0 dc 0 up 143 KB ·
atlas 75%/0% · rss 379 MB

UME_PERF_SECONDS=<n> sets the run length, UME_CHARS=a,b[,c,d…] picks the fighters (four or more ids split into a parallel team) and UME_STAGE=<id> picks the stage. UME_PERF_ROTATE=1 instead starts a fight for every native pair in the roster and prints RSS after each load, which exposes caches that never shrink.

Measured at 1280×720 (Windows, 16 logical cores, release, vsync):

ScenarioStep p50Draw p50Frame p50RSS after load
Kaito vs Shion0.03 ms0.09 ms5.52 ms (180 Hz vsync)380 MB
2v2 parallel (4 native fighters)0.05 ms0.13 ms5.52 ms533 MB

The simulation and the batch build stay far inside a 16.6 ms frame; the wall-clock frame time is the display refresh. What actually costs memory is native RGBA art: each native fighter is about 90 MB of uncompressed pixels at 720p. Three fixes came out of this pass:

FixWhereEffect
Share the RGBA buffer between ImageData and Texture2Dchardef::ImageData, Texture2D::from_rgba_sharedRemoves the second full copy of every native sprite: 1v1 RSS fell from 455 to 380 MB
Evict the GPU texture cache when the roster changesApp::warm_step (Gfx::trim(0))Sprites and stage art from the previous match are freed; a rematch keeps the atlases it already filled
Cap cached native definitionsRegistry::trim_cache (CAP_NATIVE = 4)Rotating through the roster used to add ~150 MB per fight and reached 1.3 GB after seven matches; with the cap the cache keeps only the current pair plus two recent ones and the current team is always protected

Rotating the whole native roster also shows the atlas cycling: four fighters leave the RGBA atlas at 83%, so an animation that needs a new frame triggers a reset and re-uploads only the sprites on screen (bursts of a few hundred KB, worst draw frame 1.4 ms). Indexed M.U.G.E.N art does not pay this cost because it lives in the 8-bit atlas.

Web (wasm)

TechniqueWhereEffect
ControlFlow::Wait on the webume_shell::runwinit's Poll spins a postTask/AbortController loop beside requestAnimationFrame; profiling showed about 75% of main-thread time (plus GC) burned there. Redraws are self-requested, so Wait is enough
Atlas zero-fillRenderer::newAtlas and palette textures are initialized once, so texSubImage2D no longer triggers lazy clears (Firefox warning)
Surface retryShell::redrawA failed get_current_texture re-requests the frame instead of stalling the loop (black screen)
Loader + cacheweb/index.html, web/sw.jsDownload progress while the wasm loads; JS glue and wasm are fetched as ?v=<build> (stamped by build-web.sh) and cached immutably, so a cache can never mix two builds, auto-reload on WebGL context loss
Sprite packs on demandsrc/web_sprites.rs, ume-tools pack-spritesEach fighter ships a full <id>.pack and a small <id>.menu.pack with exactly the files the select portrait and menu preview read (recorded by ume_engine::native::menu_sprite_files). Boot fetches only the menu packs; the full pack is fetched when the fighter is focused on the select screen or enters a match. Bytes fetched at boot went from 37.2 MB to 17.0 MB
web build profileCargo.toml [profile.web], scripts/build-web.shThe browser build uses fat LTO, one codegen unit and opt-level = "s", keeping opt-level = 3 for the hot crates (ume-engine, ume-formats, ume-render, tiny-skia, png, miniz_oxide, fdeflate, simd-adler32). The wasm went from 17.9 MB to 13.2 MB (7.6 MB to 6.7 MB gzipped)
Lazy Power Arena backdropsrc/power_arena_backdrop.rs, src/screen_art_fetch.rsOn wasm the 1.8 MB power_arena.png is no longer embedded; it is fetched when the arena setup opens (or on first draw). The wasm shrank 22.9 MB to 21.1 MB (13.3 MB to 11.6 MB gzipped). Native keeps include_bytes!
Recolor and trim loopsnative::recolor, native::pixel_fitPalette recolor uses a direct-mapped color cache and a per-row hair window instead of a HashMap and a per-pixel region test; sprite trimming scans rows instead of columns. Same pixels (covered by reference tests); main-thread work from boot to fight in the profile probe went from 5.0 s to 4.0 s

Probe: NODE_PATH=$(npm root -g) node scripts/web-profile.js Enter Enter Enter (headless Chromium, needs ./scripts/build-web.sh first).

Browser stage loading

The browser WASM embeds 240×135 stage thumbnails, rather than the seven full PNGs (21,858,090 bytes). The selection grid decodes only requested thumbnails. Confirming a stage downloads assets/stages/<id>.png during the VS loading screen, with HTTP errors and a 30-second timeout returning to the menu. Only the most recently prepared full illustration is retained by the browser cache in Rust; a live match may still hold its own reference. Browser HTTP/service-worker caching can reuse previously downloaded files.

The native build keeps full images embedded, decoding each stage separately on first use. UMF definitions and the bundled Elecbyte archive still ship inside the WASM; this change only splits stage artwork. Fighter compilation and audio preparation remain on the main browser thread.

scripts/build-web.sh copies the external PNGs and assets.js into web/dist/. Deploy the entire directory, including assets/stages/. Offline play requires the selected stage to have been downloaded previously. When replacing stage art, regenerate its thumbnail under assets/stages/thumbs/ as a 240×135 RGB PNG with python scripts/generate-stage-thumbnails.py (Pillow required).

Run node scripts/web-smoke.js web/dist after the web build (requires Playwright and Chromium). It rejects full stage downloads before confirmation and requires exactly one during the first match. This checks transfer scope, not a latency percentile or FPS improvement.

Main-thread loading budget

Rule: the render thread never waits on disk, decoding, parsing or synthesis. On native, that work runs on worker threads and the UI polls for completion; on wasm (single thread) it stays sliced into one step per frame.

WorkWhere it runs now
Select-screen MUGEN preview and portraitCharEntry::stream_preview / stream_portrait (max 2 workers, collected by Registry::reap_streams). Call cost ~0.1 ms versus 28 ms (KFM) and 84 ms (KFM HD) synchronously
.zip import (hash + decompression)registry::read_zip on a worker; only finish_import (~4 ms) runs on the main thread
Fight sample decodingAudio::preload_match on a worker, the VS loading bar waits for it
Stage music synthesis (17-31 ms per track)Audio::music_ready on a worker
Winner screenuses the cached definition (peek), never loads

Frame-time watchdog: set UME_WATCHDOG=1 to log every frame longer than UME_HITCH_MS (default 50) with the block that held the CPU (ume_shell::watchdog::label("load:stage")), and a summary with the worst frame on exit. Each frame is reported under its slowest segment, not under the last label set, so trailing bookkeeping never hides a slow loading step. Labels in use: select:reap, select:preview, select:grid, load:character, load:stage, load:session, load:audio, load:sprites, fight:prefetch, import.

Startup with large M.U.G.E.N collections

Opening a folder used to read every file into memory: a 15,000-file collection (4.5 GB of SFF, 3.4 GB of SND) took 338 s and 10.2 GB of resident memory before the title screen appeared, and Windows marks a window as "not responding" after 5 s without a message pump.

TechniqueWhereEffect
Lazy folder indexume_formats::vfs::add_dirWalks metadata only (path + length) and reads a file when it is used. Zips inside the folder are indexed from their end record and central directory, never inflated up front
Small-payload cachevfs::FileReads up to 4 MiB are kept for reuse (defs, CNS, AIR); sprite and sound banks are read once per use instead of being pinned for the whole session
Sampled content keyvfs::File::signatureCharacter/stage identity hashes length plus head/tail samples instead of the whole sprite bank, so the same fighter copied to another folder still dedupes
Parallel discovery and keyingfind_char_defs, find_stage_defs, Registry::add_vfs_innerDef headers and content keys are computed with ume_formats::par::map (up to 8 workers)
Off-thread rosterApp::newRegistry::new + scan_folders + dedupe + sort_mugen run on the registry-scan thread while the boot screen keeps drawing frames
Set-based dedupeRegistry::add_vfs_innerRoster ids and keys live in HashSets; the previous per-fighter linear scan was quadratic
Async stage thumbnailRegistry::stage_previewThe first tile that needs a MUGEN stage starts a worker; previously the whole stage (SFF + RGBA) was decoded inside the frame that scrolled to it
Off-thread stage buildRegistry::prepare_stageThe stage is loaded, previewed and its BGM located on stage-load; the VS screen polls the result
Off-thread releaseRegistry::drop_off_threadDropping a fighter definition (hundreds of MB of sprites) happens on char-free, not inside a frame
Frame-pumping loadsApp::start_fightRematch and tour loads draw a loading screen and pump frames while workers finish, so the window keeps answering Windows messages

ultimate-mugen --scan-report prints the headless startup cost (bundled | scan | total | roster | RSS) without opening a window. cargo run --release -p ume-formats --example scan_bench -- <mugen_dir> measures index, discovery and key costs separately.

Reference (Windows, 32 GB RAM, warm OS cache): a 15,053-entry collection with 723 characters and 137 stages went from 338 s and 10,192 MB to 0.89 s and 33 MB. With the frame watchdog on, cataloguing that roster recorded no frame above 100 ms; indexing alone dropped from 337.9 s to 0.83 s, discovery from 4.31 s to 0.02 s and keying 716 fighters from 11.0 s to 0.19 s. M.U.G.E.N folder content (210 .def, 4.5 GB of .sff) still loads and fights: mugen_check mugen/chars/Sukuna reports 1773 sprites in 232 ms.

Virtual filesystem lookup

cargo run --locked --release -p ume-formats --example vfs_bench measures path normalization and basename resolution with 50,000 unrelated files. It prints five samples per scenario. This synthetic benchmark excludes disk I/O, decoding and rendering.

The folder fallback uses the ordered VFS map's range for the character directory, avoiding scans over unrelated characters. Directory boundaries matter: chars/kfm-extra must not override a file under chars/kfm. Global basename lookup remains the last compatibility fallback. ASCII path normalization creates one output string; non-ASCII paths retain Unicode lowercase behavior, including contextual Greek sigma.

On the cloud development machine, median normalization time decreased from 60.8 to 48.0 ns per operation, and median folder fallback time from 278.2 to 1.0 µs. These are microbenchmark results, not FPS or whole-game loading measurements. Missing files that require the global fallback can still scan the entire map.

PNG decode

cargo run --locked --release -p ume-formats --example png_bench -- assets/chars/sprites 7 decodes every PNG under a folder (2,610 files, 136 MB in the bundled characters) seven times and prints min, median and max plus a pixel checksum. Row unfiltering is specialized per pixel size (1 to 4 bytes) so Sub, Average and Paeth run without per-byte bounds and branch overhead, and the unused Adler-32 pass is skipped because the decoder only checks the output length. On the 4-core cloud machine the median went from 3,420 to 2,220 ms (three runs each, spread under 4%) with an identical checksum. png_unfilter tests compare every filter and pixel size against the spec formulas.

Audio and UI allocation pressure

cargo run --locked --release --example audio_bench decodes a generated 30-second, 44.1 kHz stereo WAV five times, counting allocations and reallocations during each decode. The decoder reuses its interleaved sample-conversion buffer while its capacity is sufficient; it grows when a later packet needs more samples. The written sample count still comes from the current packet, including partial final packets and mono input.

In the cloud development environment, warm-run allocations decreased from 2,331 to 1,183 per decode. Elapsed times were noisy (roughly 9–11 ms in warm runs) and do not demonstrate a speedup. This reduces temporary allocation churn rather than the final decoded PCM size. The benchmark excludes playback and audio-device latency. Run cargo test --locked --release --example audio_bench for sample-preservation, mono/stereo, tail and existing PCM tests.

Ui::quad transforms its four vertices into a fixed array, removing a temporary heap allocation per drawn quadrilateral without changing triangle order or coordinates. This does not establish an FPS improvement.

SFFv2 Vectorized Slice Codec Decoding

decode_rle5 and decode_lz5 in crates/formats/src/sff.rs utilize contiguous slice fills (out[j..e].fill(val)) instead of scalar element-by-element assignment loops. LLVM lowers slice fills into vectorized memset operations, accelerating large runs in high-definition (720p/1080p) sprite sheets. For kfm720.def, load time decreased from 60.1 ms to 6.7 ms (8.97x faster).

Parallel Character Asset Pipeline

load_mugen_char in crates/engine/src/loader.rs overlaps character asset phases across CPU cores using std::thread::scope. Sprite decoding (sff:decode), animation parsing (air:parse), and sound decoding (snd:decode) execute concurrently on worker threads while CNS constants, state files, and CMD input triggers parse on the caller thread. par::workers in crates/formats/src/par.rs scales up to 32 parallel worker threads on high-core hardware. Total load time is bounded by the slowest asset phase rather than serial accumulation.

Zero-Allocation Triggers and Variable Assignments

Match evaluation in crates/engine/src/matchs.rs, crates/engine/src/triggers.rs, and crates/engine/src/hitdef.rs eliminates runtime heap allocations during state ticks:

  • Match::assigns records variable mutations using a compact VarKind enum (Var, FVar, SysVar, SysFVar) rather than allocating dynamic String keys per assignment.
  • state_mask, attr_kind_mask, and guardflag_bits parse string slices byte-by-byte with inline to_ascii_uppercase(), eliminating temporary uppercase String allocations during hitbyattr evaluations.
  • Simulation tick rate increased to over 262,000 ticks/sec with peak tick latency under 0.053 ms.

Branchless Sprite RGBA Swizzling via L1 Cache LUT

sprite_to_rgba in crates/formats/src/sff.rs pre-populates an in-cache 256-entry lookup table lut: [[u8; 4]; 256], mapping 8-bit palette indices to pre-swizzled RGBA quads. Pixel loop evaluation uses branchless 4-byte slice copies (chunk.copy_from_slice(&lut[c])), eliminating per-pixel branching on transparent pixels (c != 0) and reducing branch mispredictions during sprite decoding. SFF decoding phase completes in ~0.8 ms for standard fighter spritesheets.

Zero-Allocation AI Input Command Queue

crates/engine/src/ai.rs reuses the backing ring-buffer memory of Ai.queue: VecDeque<u32> via append_seq(&mut queue, ...) rather than constructing and discarding intermediate heap vectors Vec<u32> on each AI move decision. Peak tick latency dropped to 0.046 ms under load.

Contiguous Vertex Slice Batching & Demultiplying Rasterization

Batch::push in crates/render/src/batch.rs replaces repeated self.vertices.push() calls with single contiguous slice copying (self.vertices.extend_from_slice(&[...])), batching all four quad vertices in a single memory operation. In crates/engine/src/raster.rs, pixmap_to_image pre-sizes pixel buffers (vec![0u8; pixels.len() * 4]) and demultiplies straight-alpha channels via chunks_exact_mut(4) to enable auto-vectorization across procedurally rendered stage surfaces and effects.

Bytecode Direct Trigger Dispatch

Host in crates/engine/src/expr.rs and the virtual machine in crates/engine/src/bytecode.rs introduce trigger0 and trigger1 direct dispatch hooks. For unary trigger evaluation (Op::Trig1), stack operands evaluate directly into trigger logic without wrapping into temporary [Node::Num] AST arrays or indirection through eval(). Hot path triggers (var, fvar, sysvar, animelemno, animelemtime, animexist, selfstatenoexist) execute as inline array indices and lookups, reducing worst-case simulation tick latency to 0.042 ms.

Zero-Allocation AIR Animation Parser

parse_air in crates/formats/src/air.rs operates directly on line string slices without allocating lowercase String instances (line.to_ascii_lowercase()) for every line in the animation file. Action and header recognition (parse_begin_action, parse_clsn_header, parse_clsn_box) evaluate byte slices with ASCII case-folding (eq_ignore_ascii_case), and collision box coordinates parse into a fixed stack array [f32; 4] rather than allocating a temporary heap Vec<f32> per bounding box.

Pre-allocated PCM Audio Channel Copying

In src/sound_mix.rs:decode, audio frame decoding calculates packet frame capacity upfront and calls out.frames.reserve(count), eliminating repeated geometric vector reallocations during packet sample consumption. A dedicated mono branch (ch == 1) streams frames without slice chunking, and stereo decoding utilizes chunks_exact(ch) to eliminate bounds checks. Warm-run decode allocations dropped to 1,175 per 30-second audio stream.

  • Wave 23 - Bytecode Inline Direct Jump Table & Host Slice Dispatch:

    • Inlines frequent arithmetic and relational operations (Add, Sub, MulF, MulI, DivF, DivI, Eq, Ne, Lt, Le, Gt, Ge, BitAnd, BitOr, BitXor, Xor) directly into run_slice's outer match table, eliminating intermediate function calls and closure lookups.
    • Slices self.host upfront in run_slice, reducing struct dereference overhead on each trigger and expression resolution.
  • Wave 24 - Stage Background Zero-Copy Step & Wave Early-Return:

    • Uses disjoint pattern matching (BgState { layers, def_time, ctrl_defs, stage } = self) in step(), eliminating self.stage.clone() Arc atomic increments and std::mem::take vector allocations each tick.
    • Adds early-return zero-amplitude check s[0] == 0.0 in sin_wave(), bypassing transcendental .sin() calculations for static background layers.
    • Skips animation loop start summation when .loop_start == 0.
  • Wave 25 - Fast WAV Encoding & Identity Rate Audio Resampling:

    • Replaces per-sample slice extension loops with single-pass bulk resize and direct indexed byte stores in wav() and o_wav().
    • Implements SIMD-vectorizable identity playback fastpath ((rate - 1.0).abs() < 1e-4) in Pcm::render, hoisting constant gain products outside the mixing loop.
  • Wave 26 - HitDef Zero-Alloc Parser & Static Shake Construction:

    • Eliminates intermediate string formatting and clones in hitdef::build by using borrowed Option<&str> for parameters, direct byte matching in ttr_bits, state_mask, and guardflag_bits.
    • Replaces dynamic string formatting with static field lookups for screen/camera shake parameters.
    • Zero-alloc default branch for attack state and kinds.
  • Wave 27 - In-Place Collision Boxes & Fast Animation Elem Start:

    • Implements Fighter::fill_boxes using caller-provided scratch buffers, eliminating continuous Vec allocations during reversal, hit, and projectile detection loops.
    • Replaces heap vector collection for p2clsnrequire single box checks with a zero-copy stack array slice.
    • Adds if n <= 1 { return 0; } early-exit in elem_start to bypass iterator instantiation for the most common animation frame timing queries.
  • Wave 29 - Chunked Raster Pixmap Conversion & In-Order SFF RLE8 Decoding:

    • Replaces per-pixel extend_from_slice calls in raster::pixmap_to_image with direct 4-byte chunk slice writes (chunks_exact_mut(4)).
    • Streamlines decode_rle8 read sequence without extra index decrementing.
  • Wave 30 - Branchless Input Relative Directions & Byte Jump Table:

    • Replaces nested branching in input::rel_dirs with branchless bitwise shift ud | (4 << (is_back ^ 1)).
    • Replaces string matching in button_bit with byte-level slice matching, supporting case-insensitivity without allocation.
    • Implements branchless facing assignment in InputHistory::push.
  • Wave 31 - Multi-Threaded Parallel ZIP VFS Decompression & Cybernetic Loading HUD:

    • Implements multi-threaded scoped chunked inflation (std::thread::scope) across available CPU hardware parallelism for ZIP archive extraction in add_zip.
    • Replaces sequential entry decompression with batch concurrent work, cutting SFF resource decode from 222.6 ms to 88.7 ms (-60.1%).
    • Adds cybernetic loading HUD with glowing borders, two-tone cyan/white laser pulse, and thread pool parallel pipeline telemetry.

SIMD ACT palette decoding & camera bounds fast-path

  • Vectorized ACT decoding: decode_act and encode_act use s_chunks::<3>() and s_chunks_mut::<4>() to decode RGB triplets to RGBA in batches without bounds checks.
  • Single-pass camera bounds: Match::update_camera computes all-root bounds (minx, maxx, highest) and live-root bounds (lo, hi) in a single iteration over self.roots(), eliminating redundant iterator scans.
  • Hoisted overlap bounding-box checks: Match::overlap hoists  coordinates into scalar registers before testing collision against  and replaces division by 2.0 with * 0.5 multiplication.

Zero-allocation controller and trigger evaluation pipeline

  • Zero-alloc target indexing: controllers::target_indices returns a stack-allocated Vec<usize> buffer instead of heap Vec<usize>, eliminating allocation across all target controllers (targetstate, targetlifeadd, targetpoweradd, targetfacing, targetbind, etc.).
  • Zero-alloc AssertSpecial flag lookup: flags::names_in and flags::lookup work directly with borrowed &str and ASCII case-insensitive matching (eq_ignore_ascii_case), removing per-frame string allocations on shadow and status flags.
  • Stack-buffered velocity constant lookup: triggers::Ctx::const_val copies the key into a 64-byte stack array to query .x variants without heap format!("{k}.x").
  • Typed variable assignments: Match::assigns records AssignKind enum instead of allocating a String on each trigger variable assignment.

SFF v2 chunked RLE decompression and redundant zero-store elimination

  • Redundant zero-store skipping in decode_rle8: Since vec![0u8; size] allocates already zero-initialized memory, runs of transparent pixels (val == 0) and literal zeroes (d == 0) skip memory writes and simply advance the write index j. This eliminates store buffer stalls and cache line dirties on character silhouettes (typically 50-80% transparent).
  • Chunked RLE5 run fills: In decode_rle5, inner byte-by-byte loops are replaced with bulk slice .fill(c) (or index advances when c == 0), converting single-byte iterations into vectorized memsets.
  • Direct slice copying for SFF v2 palettes: In decode_sff_v2, palettes with valid slice bounds copy 4-byte chunks in bulk or directly via copy_from_slice, eliminating per-color bounds and saturating additions.

Collision box early exit, zero-alloc target slicing & indexed AI dispatch

  • Collision box query fast-path: In fighter::boxes(), frames with empty collision box definitions and no active collision modifiers immediately return vec![] without performing two size-override map queries or scaling math. Pre-multiplied scale vectors and single-XOR horizontal flips (flip = fr.flip_h ^ (self.facing < 0.0)) eliminate branch penalty on every box vertex.
  • Zero-alloc p2clsnrequire target slice: In Match::tick, single required defender box indices borrow a 1-element slice &d_boxes[req..req + 1] directly rather than allocating a heap vector.
  • Indexed AI command dispatch: In ai::Ai, command definitions are indexed as Vec<usize> integers into fighter.def.commands instead of cloning full CommandDef trees with strings and vectors. Close and ranged attacks are partitioned during init, turning tick command selection into O(1) array indexing.
  • Vectorized straight-alpha pixmap conversion: raster::pixmap_to_image avoids integer divisions on opaque (alpha == 255) and transparent (alpha == 0) pixels with as_chunks_mut::<4>().

Pre-allocated SND decoding & zero-alloc command movelist filtering

  • Pre-allocated SND sound hash tables: snd::decode_snd_checked bounds capacity using count.min(8192) and preallocates both out and seen hash tables with that capacity, eliminating repeated hash table reallocations and rehashes across character audio decoding.
  • Static palette key resolution in loader: loader::load_mugen_char resolves character DEF palette overrides (pal1..pal12) using static string slice table PAL_KEYS rather than formatting 12 heap strings per character.
  • Pre-allocated sprite deduplication: Pre-sizes seen and unique sprite vectors to sff.sprites.len().
  • Filter-first zero-alloc movelist and AI command extraction: loader::load_mugen_char filters commands in-place with eq_ignore_ascii_case before allocating or cloning strings, removing dozens of heap allocations per loaded character.

In-place zero-alloc AIR animation and collision parser

  • Elimination of line-level to_ascii_lowercase() heap allocations: air::parse_air processes text lines directly with case-insensitive ASCII byte matching (eq_ignore_ascii_case), removing 5,000 to 20,000 heap string allocations per character .air file.
  • Stack-allocated collision box parser: parse_clsn_box parses four coordinates directly into a fixed [f32; 4] array on the stack, eliminating Vec<f32> allocations per collision box.
  • Stack-buffered frame parameter tokenization: AnimFrame lines unpack up to 11 comma-separated parameters into a fixed [&str; 11] array without allocating Vec<&str>.
  • In-place flip and blend flag parsing: fl and bl flags are evaluated in-place without uppercase string allocation.

HitDef zero-alloc shake parameters and in-place type matching

  • Zero-alloc shake parameter resolution: hitdef::build uses direct static parameter string lookups (parse_shake) instead of formatting 10 dynamic heap String keys ({prefix}.freq, {prefix}.time, {prefix}.ampl, etc.) per HitDef instantiation.
  • In-place animtype and groundtype parsing: hitdef::animtype and hitdef::groundtype match standard MUGEN animation/ground tokens using eq_ignore_ascii_case directly on borrowed &str without lowercase string allocations.

Zero-alloc INI section queries and stack-buffered CNS constant parsing

  • Zero-alloc Section::get and Section::get_all: ini::Section::get and ini::Section::get_all compare keys directly using eq_ignore_ascii_case without allocating lowercase String instances on every query.
  • Zero-alloc find_section: ini::find_section uses eq_ignore_ascii_case directly on section names without allocating a lowercase string.
  • Stack-buffered CNS constant parsing: cns::parse_constants unpacks comma-separated numeric vectors into a stack-allocated [f64; 4] array, eliminating Vec<f64> allocations on every constant line.
  • Pre-allocated command definition vector: cns::parse_cmd pre-allocates cmds capacity to secs.len().

Single-op bytecode fast-path & stack-less expression evaluation

  • Single-op expression short-circuit: In bytecode::Code::run, expressions with exactly one opcode (Op::Const(v), Op::Trig0(i), Op::Host(i)) return immediately without stack array zeroing, program counter advancement, or loop dispatch.
  • Zero-cost constant and parameter lookups: Constant numbers and 0-argument triggers (Time, StateTime, AnimTime, StateNo, etc.) execute in 1 CPU cycle, avoiding VM frame setup.

Single-lookup animation advance & target cleanup early continue

  • Single-lookup animation frame unpack in advance_anim: Unpacks (total, loop_start, len, ft) in a single tuple query on self.anim(), eliminating repeated HashMap lookups per animated fighter and explod each tick.

  • Empty size-override short-circuit: fighter::c immediately queries character constants when self.size_overrides.is_empty(), bypassing linear slice scans.

  • Stale target cleanup early continue: Match::tick skips target vector moves and retain passes whenever self.fighters[k].targets.is_empty().

  • Wave 42 - Fast-Path Palette Effects, Stack Frame Buffers & Zero-Alloc Sctrl Queries:

    • PalParams::apply: Fast-path bypass for identity and non-hue/non-inverted color transformations, skipping trigonometry and unrolling color channels.
    • PalFx::from_controller: Zero heap allocations for controller parameter lookups using stack-buffered keys.
    • Match::tick: Eliminated per-tick Vec allocations for waken and ag_requests by using stack-allocated fixed arrays, and fused filter/decrement loops with etain_mut.
  • Wave 43 - Zero-Alloc Character Loader Path & In-Place Unquote:

    • ini::unquote_str: In-place slice borrowing without allocating new String instances for unquoted and clean strings.
    • loader::load_mugen_char: Converted fget from returning Option<String> to Option<&str>, eliminating ~20 heap allocations per character load.
    • loader::local_size: Stack-based parsing via split_once(',') replacing dynamic nums allocation.
    • cns::parse_cmd: In-place unquote_str for command name and inputs.
  • Wave 44 - Zero-Alloc AssignKind State Dispatch & Case-Insensitive Bitmasks:

    • matchs::AssignKind: Replaced dynamic String allocations in trigger variable assignments with a 1-byte enum AssignKind, cutting assignment tuple memory by 50% and eliminating per-assignment heap operations.
    • hitdef::state_mask / attr_kind_mask / guardflag_bits: In-place case-insensitive ASCII byte folding without string allocations.
    • triggers::const_val: Zero-alloc stack-buffered key lookup for velocity.*.x constants.
  • Wave 45 - Explod Cache Array & Projectile Triangular Collision Sweeps:

    • Match::update_explods: Pre-indexed fighter position and pause states into a compact 8-element stack array, avoiding linear Fighter scans per explod.
    • Match::update_projectiles: Stack-buffered frozen flags for up to 64 projectiles avoiding heap allocations, and triangular pair-wise collision iteration (a + 1)..n halving projectile collision checks.
  • Wave 46 - Collision Box Fast Path & Pre-Scaled Box Geometry:

    • Fighter::boxes: Early exit for empty collision box lists before computing constants or scale factors (drastically cuts idle/movement frame work).
    • Pre-scaled X and Y dimensions (sx * s and sy * s), cutting per-box floating-point multiplications from 8 to 4.
    • Combined flip_h != (facing < 0.0) into a single branchless boolean XOR condition.
    • Fighter::c: Guarded slice search with !self.size_overrides.is_empty().
  • Wave 47 - Stack-Buffered VFS Candidate Joining & Zero-Alloc Suffix Matching:

    • vfs::resolve: Inlined with_joined using a 512-byte stack buffer for base_dir/name and data/name path candidates, completely eliminating candidate heap allocations on the direct hit path.
    • Replaced format!("/{base}") heap strings with in-place byte boundary predicate is_match.
    • Used ini::unquote_str directly instead of allocating owned unquote strings.
    • Sub-microsecond VFS folder fallback on 50k files (0.9 us/op) and reduced character load time (kfm.def down to 6.7 ms).
  • Wave 48 - Zero-Alloc HUD Frame Pipeline & Direct Texture Quads:

    • Hud::draw: Streamlined main_of into single-pass iterator scans avoiding dynamic Vec<&Fighter> allocations per side.
    • Used fixed stack array roots = [r0, r1] instead of dynamically allocated vectors.
    • Bypassed partner vector allocations on standard 1v1 matches.
    • Replaced temporary mesh/vertex/index heap vectors in portrait drawing with direct draw_texture_ex quad draws.
  • Wave 49 - Dual-Op Bytecode Short-Circuits & Single-Context Trigger Loops:

    • bytecode::Code::run: Fast-path short-circuit execution for 2-op expressions (!trigger, -const, !const, !host), bypassing stack array zeroing and interpreter loop.
    • Match::triggered: Reused single Ctx across trigger_all and trigger groups, eliminating redundant host context creations per controller evaluation.
    • Match::num: Direct expression evaluation avoiding intermediate Option closure mapping.
  • Wave 50 - SND Pre-Allocation, Deduped State Parsing & Zero-Alloc Command Filters:

    • snd::decode_snd_checked: Pre-allocated sound dictionary and offset visited sets using the header sound count, with in-place Entry::Vacant insertions avoiding redundant sound re-allocation.
    • loader::load_mugen_char: Eliminated redundant second parse pass of stcommon during character loading.
    • Pre-allocated static palette keys PAL_KEYS to avoid 12 dynamic string formatting allocations per character load.
    • Pre-allocated capacity for HashSet, sprites, indexed, and counts based on decoded SFF sprite lengths.
    • Case-insensitive ASCII byte comparison (eq_ignore_ascii_case) for ai_commands and movelist filters, eliminating temporary heap strings for command names.
    • loader::load_mugen_portrait: In-place string slice extraction from section lookups avoiding owned string clones.
  • Wave 51 - Cached Common Sizes, Single-Pass Sprite Lookups & Direct Texture Dispatch:

    • CharDef: Cached core dimensions and scale factors (scale_x, scale_y, size_ground_back, size_ground_front, size_air_back, size_air_front, size_height, size_attack_dist) directly on the struct via refresh_sizes.
    • Fighter::c: Fast-path pattern match on size.* keys avoiding dynamic string hashing and HashMap lookups on every physics, collision, and trigger query.
    • Gfx::sprite_tex_for: Eliminated duplicate def.sprites.get lookup per rendered frame across all fighters, shadows, helpers, and explods.
    • Gfx::draw_sprite: Uses def.scale_x and def.scale_y directly, removing repeated per-frame def.c(...) table probes.
    • Reduced kfm.def load time to 4.6 ms and accelerated simulation tick rate to 216k ticks/s.
  • Wave 52 - Cached Animation Timing & 3-Op Bytecode Fast-Paths:

    • Fighter: Cached anim_total_time and anim_loop_start upon animation switches, turning anim_time_trig (animtime) into a direct scalar subtraction without map lookups.
    • Fighter::advance_anim: Reused single animation lookup across the frame advance loop and eliminated repeated self.anim() lookups.
    • Fighter::anim_elem_time: Instant return for animelemtime(1) without frame iteration.
    • bytecode::Code::run: Fast-path short-circuits for 3-op comparison expressions ([Trig0, Const, Cmp] and [Const, Trig0, Cmp]), evaluating triggers directly via Host::trigger0 and bypassing virtual machine stack allocation.
    • Dropped kfm720.def loading time to 8.7 ms and kfm.def to 4.4 ms.
  • Wave 53 - Fighter Index Hints, Stack-Allocated Hits & Early Reversal Bypasses:

    • Match::idx_hint: Direct $O(1)$ index resolution based on run-order position hints, replacing linear scans across active fighters in the per-tick execution pipeline.
    • Match::detect_reversals: Fast-path early exit when no fighters have an active reversal state, plus fixed-size stack arrays for detected reversals.
    • Match::detect_hits: Stack-allocated fixed buffer pending storing only fighter indices and coordinates, avoiding eager HitDefData heap clones on idle/no-hit frames.
    • struck list switched to stack arrays, eliminating vector allocations across physics and hit detection loops.
  • Wave 54 - Stack-Buffered Target Indices & Direct Param Expression Evaluations:

    • controllers::target_indices: Replaced heap-allocated Vec<usize> with fixed stack array [Option<usize>; 8], eliminating allocation churn in TargetState, TargetLifeAdd, TargetPowerAdd, TargetFacing, and TargetBind.
    • controllers::set_vars: Directly evaluated param.exprs.first() without duplicate sc.param(...) string search iterations.
    • controllers::run: Replaced double parameter checks in changestate/selfstate with unified opt(...) queries for ctrl and anim.
    • Pushed simulation throughput to 226,415 ticks/s with p50 at 0.003 ms, and dropped portrait decode to 0.6 ms.
  • Wave 55 - Aligned u32 RGBA Decoding, Pre-Allocated SFF Tables & Branchless PCX Palettes:

    • sff::sprite_to_rgba: Allocated direct Vec ensuring guaranteed 4-byte hardware alignment, eliminating slice-alignment fallback loops and branch checks, and converting to Vec via zero-cost Vec::from_raw_parts.
    • pcx::read_rgb_palette: Converted 768-byte RGB chunks to [u32; 256] with branchless u32::from_ne_bytes and constant alpha assignments, dropping byte-by-byte shifting.
    • sff::decode_v1: Removed unused idx from V1Job and pre-allocated jobs buffer with count.min(8192).
    • sff::decode_v2: Pre-allocated palettes buffer with pal_count.min(buf.len() / 16 + 1) and jobs buffer with spr_count.min(buf.len() / 28 + 1).
    • sff::decode_v2_image: Optimized RAW depth-32 frames with single slice copies and depth-24 frames with 3-byte chunks instead of byte-by-byte offset probing.
  • Wave 56 - Copy-Derived Binds, Lazy Fallbacks & Direct In-Place State Animations:

    • fighter::Bind: Derived Copy and PartialEq, turning bind checks and updates in rebind and update_bind into direct stack bit-copies with zero heap cloning.
    • fighter::Fighter::change_anim_own: Added internal animation change helper from own definition, removing external def.clone() overhead in changestate, changeanim, and auto-turn transitions.
    • matchs::run_state: Converted common lookup into a lazy fallback (let fallback;), bypassing self.common.clone() on all negative states (-3, -2, -1) and every character-defined state.
    • matchs::change_state: Replaced eager self.common.clone() with reference pointer equality &self.common and lazy state definition fallback.
    • matchs::tick: Replaced per-frame f.st_def.clone() in physics override loop with scalar Option<char> extraction.
  • Wave 57 - Non-Allocating INI Parsing, Pre-Allocated Controllers & State Sizing:

    • ini::parse_ini_no_lines: Replaced line-allocating INI parsing in parse_states, parse_constants, parse_cmd, and loader.rs character DEF resolution with parse_ini_no_lines, avoiding tens of thousands of unused String line allocations per character.
    • ini::parse_ini_opt: Pre-allocated section output vector with text.len() / 256 + 4 and section entries with capacity 8.
    • cns::build_controller: Pre-allocated controller params with capacity matching s.entries.len().
    • cns::parse_states: Pre-allocated StateDef with controllers capacity 16 and params capacity matching section entries, eliminating dynamic reallocation during state compilation.
  • Wave 58 - Stack-Buffered Path Normalization, Fast Command Short-Circuits & Copy Symbols:

    • vfs::with_norm_path: Stack-allocated 512-byte buffer for path normalization and unquoting, eliminating heap allocation across all resource lookups in vfs::resolve.
    • commands::CmdSymbol: Derived Copy and PartialEq for 20-byte bitwise symbol handling.
    • commands::held: Early button bitmask check before invoking relative direction and facing lookups, short-circuiting inactive buttons on the first instruction.
    • commands::fires: Evaluated now & !prev before reading older history ticks (p2, p3), skipping multi-tick history probes on non-firing frames.
  • Wave 59 - Cached Scale in Box Filling & Multi-Box AABB Collision Pruning:

    • fighter::fill_boxes: Bypassed dynamic size.* string queries when no size overrides exist, reading def.scale_x and def.scale_y directly.
    • matchs::overlap: Added composite axis-aligned bounding box early exit when checking multi-box collision groups (a.len() > 1 || b.len() > 1), eliminating $O(N imes M)$ pairwise tests on disjoint collision clusters.
  • Wave 60 - Zero-Alloc AIR Frame Tokenization & Pre-Sized Animation Buffers:

    • air::parse_air: Replaced per-frame Vec<&str> heap allocation with a fixed 12-element stack array [""; 12], eliminating dynamic vector allocations across all animation frames.
    • air::parse_air: Replaced to_ascii_uppercase() String allocations for flags and blend modes with zero-alloc byte-level inspection (fl.as_bytes(), bl.as_bytes()).
    • air::parse_as_d: Replaced string searching with case-insensitive byte scanning for AS...D... alpha parameters.
    • air::parse_air: Pre-allocated animation frames vector with Vec::with_capacity(8) and the animation HashMap with text.len() / 512 + 16.
  • Wave 61 - Dedicated Zero-Arg Trigger Dispatch & Byte-Level String Comparison:

    • triggers::trigger0: Fast-pathed the top 20 zero-argument triggers (time, animtime, stateno, prevstateno, anim, ctrl, alive, life, facing, roundstate, movecontact, movehit, vel, pos) directly without argument-closure setup or the 90-arm general match.
    • triggers::cmpstr: Switched string character decoding to single-byte inspection (v0.as_bytes().first()) for statetype, movetype, and physics, and reused parsed string slice in command checks.
  • Wave 62 - Bytecode VM Fast Paths for 1-Arg Triggers & Arithmetic Comparisons:

    • bytecode::Code::run: Added dedicated fast paths for 2-op unary 1-arg triggers ([Op::Const, Op::Trig1]), 3-op inverted 1-arg triggers ([Op::Const, Op::Trig1, Op::Not]), and 4-op 1-arg trigger comparisons ([Op::Const, Op::Trig1, Op::Const, Op]), bypassing the stack machine loop and vector indexing for var(X) = Y, fvar(X) > Y, and animelemtime(X) >= Y.
    • bytecode::Code::run: Expanded 3-op comparisons to cover arithmetic (Add, Sub) and trigger-to-trigger relational checks ([Op::Trig0, Op::Trig0, Op]), eliminating stack interpreter overhead for expressions like anim = stateno or time > animtime.
  • Wave 63 - Lazy SND Cycle Detection & Zero-Alloc FNT Glyph Tokenization:

    • snd::decode_snd_checked: Replaced eager HashSet<usize> allocation per SND file with lazy initialization (Option<HashSet<usize>>) triggered only when subfile offsets point backwards (next <= ofs), eliminating heap allocation and hashing overhead across all standard sequential SND files.
    • fnt::decode_fnt_v1: Replaced per-glyph line split_whitespace().collect::<Vec<&str>>() heap allocations with a streaming iterator reading up to 3 tokens directly, eliminating hundreds of vector allocations per font file.
    • fnt::decode_fnt_v2: Switched font descriptor parsing to parse_ini_no_lines, avoiding unused lines: Vec<String> collection.
  • Wave 64 - Zero-Alloc Command Charge Parsing & Pointer-Guarded Animation Switching:

    • commands::parse_command: Replaced String heap collection in release/charge command prefix parsing (~30) with zero-alloc byte slice indexing and ASCII byte matching for prefix symbols (/, $, >, ~).
    • fighter::change_anim: Added Arc::ptr_eq guard avoiding reference count bumps when from is already the active anim_def.
    • fighter::change_anim_own: Switched to direct immutable reference borrowing of self.def without cloning the Arc<CharDef> atomic counter.
  • Web select screen (scripts/web-frame-probe.js, scripts/web-profile.js):

    • Native roster tiles draw portrait.png through CharEntry::tile_portrait (one small PNG decode, cached per pack revision) instead of compiling an idle+win preview per tile; the full preview is only built for the focused or picked fighter.
    • Previews wait until the fighter's sprite pack has arrived (CharEntry::tile_art_ready), so no placeholder art is drawn while the pack downloads.
    • On wasm32 a fighter whose pack is missing previews only the first frame of each menu animation, and the automatic art resolution is capped at 3.0 (the effect rasterizer is single-threaded there).
    • Recolor::apply_in_region uses a multiplicative hasher and a last-colour memo instead of SipHash per pixel.
    • The sprite pack cache holds 64 packs, so rosters above 24 fighters no longer evict each other.
    • Measured with the profiler in headless Chromium (select screen, 53 cursor moves): main-thread busy time dropped from about 98 s to about 2.5 s.

Sprite-sheet effects

src/vfx/sheet.rs plays CC0 effect sheets from assets/fx/ (embedded with include_bytes!, decoded and uploaded on first draw). A hit spark plays on every non-guarded hit; an explosion plays on hits of 150 damage or more and on KO. At most 12 sheet sprites are alive, drawn with additive blending, and they are cleared on round start. Pixel-art PVFX Foundry sheets (nearest filter, alpha blend) add punch hit on light hits, crit hit on heavy hits, shockwave ring and ground slam on 150+ damage grounded hits, parry on guarded hits and dash dust on dashes. Lightning strike and static burst play on supers, a fire pillar on transformations, a smoke bomb on KO and a frost nova on heavy guarded hits. Sheets and credits are listed in assets/fx/CREDITS.md.

Parallel variant sprite raster

Compiling a UMF fighter rasterized the base frames in parallel and then recolored every form and awakening variant of every frame on one thread, which was 80 to 90% of the load. native/frame_raster.rs now renders each frame together with its variants inside the same worker pool (min(cores, 8), one thread on wasm32), and the form palettes are built once per fighter instead of once per frame.

cargo run --release -p ume-engine --example load_bench on the 4-core cloud machine, three runs each:

Whole roster (21 fighters)OboroKaitoSuzume
Before11.40 / 11.76 / 11.79 s1674 ms1250 ms900 ms
After4.70 / 4.46 / 4.54 s551 ms405 ms319 ms

The output is unchanged: a checksum of every sprite (pixels, size, axis, scale) and every animation frame of the 21 fighters in two palettes is identical before and after. Fighters without forms (npc_*) do not change, since they have no variants to render.

Graphics presets for slow machines

Settings, tab PERFORMANCE: one preset (High, Medium, Low, Minimum, or Custom once any option differs) plus individual options. Everything is visual only; Match::tick, rollback and replays never read these values.

OptionHighMediumLowMinimum
Render scale (fight scene, HUD stays sharp; also 35% and 25% by hand)100%100%75%50%
Post-processing (fx)HighMediumOffOff
Particles and effectsFullReducedReducedMinimal
After image, glass HUD, animated backdrop, CRTonon (CRT off)offoff
Shadowsonononoff
  • Render scale draws the scene into a smaller target and the post pass upsamples it to the window (ume_shell::quad::set_render_scale, PostFx::scene_view). With post-processing off and scale below 100% a neutral post pass is still used.
  • Runtime flags live in src/lite/flags.rs; render code reads crate::lite::shadows(), afterimage(), backdrop(), glass(), crt().
  • Auto adjust (default on for the web build): lite::Monitor averages frame time over 4 s of fight after a 3 s warm-up; above 24 ms it moves one preset lighter, saves the settings and shows a toast. It never raises quality again by itself.
  • Measure with UME_PRESET=0..3 UME_TOUR=perf (desktop) or the ?e2e=1&modo=watch match in Chromium (web).

Measured on the 4-core cloud machine with software rendering (lavapipe for desktop, SwiftShader for web, 1280x720, Kaito vs Shion):

PresetDesktop frame avgWeb fps
High28.7 ms10.5
Medium28.9 ms11.5
Low19.5 ms18.7
Minimum15.8 ms21.8

Low window resolutions

Settings, VIDEO tab (desktop): window resolution now starts at 640x360, then 854x480, 960x540, 1024x576, 1280x720 and up to 5K. The cfg stores res_px=WxH; old res=<index> files are migrated to the same size. Picking a resolution clears the remembered window size so the choice always applies. On web and mobile the window follows the page, so use Render scale (down to 25%) instead.

Desktop, software rendering, perf tour (Kaito vs Shion): 1280x720 31.5 ms, 854x480 15.1 ms, 640x360 10.5 ms per frame. Web render scale 50% / 35% / 25%: 21.5 / 22.0 / 23.4 fps (CPU bound below 50%).

Sprite Container (LZ4)

Every pixel block the engine stores for later use is LZ4-compressed, with one rule for both fighter kinds. Decoders are pure Rust (lz4_flex, safe mode, builds for wasm32), the format is lossless, and PNG stays the authoring format.

Formats

MagicHoldsWritten byRead by
UML1one sprite: indexed (8-bit + palette) or RGBAume-tools pack-sprites (web fighter packs)ume_formats::lz4_sprite, ume_native sprite loader
UMSFa whole .sff: palettes, sprite table, one UML1 block per distinct pixel bufferume-tools cook-sffume_formats::sff::decode_sff and decode_sff_only

Readers recognise the magic, so a PNG, a classic .sff and a cooked file are interchangeable under the same name. A cooked file can replace the original .sff in a character folder or zip.

UML1 layout (little endian)

"UML1"  kind u8 (0 RGBA, 1 indexed)  colors u16  width u16  height u16
crop x u16  crop y u16  crop w u16  crop h u16
palette: colors * 4 bytes (RGBA), indexed only
LZ4 block of the cropped pixels (absent when the crop is empty)

The crop removes only the border that is exactly zero (index 0, or RGBA 0,0,0,0), so decoding restores every byte. Colour hidden under zero alpha elsewhere is kept.

UMSF layout

"UMSF"  version u8 (1)  sff version u8  2 bytes zero
unique palettes   u32 count, each u32 length + bytes
palette table     u32 count, each group i32, index i32, palette ref u32
blocks            u32 count, each u32 length + UML1 bytes (no palette)
sprites           u32 count, each group, index, axis x, axis y i32; width, height u32;
                  palette_index i32; palette ref u32; block ref u32 (u32::MAX = none)

Sprites that shared one pixel buffer in the decoded .sff (links) share one block, and decode back to one shared Arc, so memory behaviour is unchanged. Blocks decode in parallel through ume_formats::par::map (single thread on wasm32). decode_sff_only skips blocks of sprites that are not wanted.

Limits

A sprite is at most 8192 px per side and 16 Mpx, and a UMSF file may declare at most 512 Mpx of wanted sprites. Counts and lengths are checked against the file size; truncated or corrupt files return an error and never panic.

Commands

cargo run --release -p ume-devtools --bin ume-tools -- cook-sff in.sff out.sff
cargo run --release -p ume-devtools --bin ume-tools -- pack-sprites web/dist

cook-sff decodes the original, cooks it, decodes the result and fails unless every palette and every sprite (pixels, axes, palette, links) is identical.

Measurements

62 real M.U.G.E.N. characters from mugen-assets (54,382 sprites), one thread, per-sprite blocks: LZ4 decodes at about 1.5 GB/s of indexed pixels, 28 µs per sprite against 61 µs for the original RLE8/LZ5 decode. Totals, original .sff against UMSF: 853.6 MB against 624.1 MB, decode 2.30 s against 1.42 s with the default worker count. The comparison with zstd, PNG8, QOI and deflate is in ADR 0009.

Web Match Smoke

node scripts/web-match-smoke.js web/dist plays complete matches in headless Chromium (CI job web-qa, after the web build) and fails when a match freezes.

Each scenario opens a deep link with ?e2e=1, which publishes window.__ume_state every frame (screen, clock.tick, round, wins, fighters). Settings are injected through localStorage (30 s rounds, 1.15x speed, muted).

ScenarioWhat it covers
cpu-bot-best-of-3A scripted player closes in and mashes attacks against the CPU for at least two rounds
watch-cpu-vs-cpuNo input: the match must still run to the results screen

A scenario fails on any of:

  • page error, Rust panic, RuntimeError or an unexpected console.error;
  • the simulation tick not advancing for MATCH_SMOKE_STALL_MS (default 20000 ms) outside pause and match end;
  • no animation frame, or an unresponsive main thread, for the same period;
  • the rendered image never changing during the fight;
  • the results screen not being reached within MATCH_SMOKE_LIMIT_MS (default 360000 ms), or not being leavable with Enter.

MATCH_SMOKE_SCENARIOS=<name,...> runs a subset, MATCH_SMOKE_SHARD=<i>/<n> runs every n-th scenario starting at i (CI splits the match smoke across parallel jobs this way; an empty selection fails) and WEB_SMOKE_SHOTS=<dir> stores screenshots (uploaded by CI on failure).

Web QA pipeline

Every pull request plays the real wasm build in headless Chromium, in parallel shards, and fails on any WebAssembly error. A failure leaves screenshots and logs as CI artifacts.

What runs

scripts/web-qa.json lists the scenarios; scripts/web-qa.js runs one shard of them. CI job web-qa (matrix of 8 parts, fail-fast: false, --jobs 2). Scenarios are spread over the parts by the durations in scripts/web-qa-weights.json (60 s when a scenario is not listed), so a new scenario needs no CI edit. --shard <name> still selects one group of the table below:

ShardScenarios
uititle to fight flow, Arcade click, story intro, epilogue
mobiletouch menu, touch controls in a fight, in-engine smoke on a Pixel 7 viewport
enginein-engine smoke (?smoke=1): boot, menus, select, training, 5v5, story; plus the guard self-test
loadingM.U.G.E.N import (kfm), native fighters with awakenings, power arena, audio unlock, fatal-trap screen (unreachable)
match-1, match-2full matches in two halves (Web match smoke)

The guard

Every scenario runs with scripts/web-guard.js preloaded. It watches every page and fails the run, even when the script itself forgot to, on:

  • panicked, PanicHookInfo, unreachable executed or renderbufferStorageMultisample in the console;
  • gpu error: (the wgpu error handler in ume-shell);
  • an uncaught pageerror or a Chromium crash.

On the first problems it saves problem-N.png immediately, and a final-N.png before the browser closes. It also writes console.log (every console line with the time and page) and network.log (failed requests and HTTP 400+). fatal-trap sets expectFatal because it throws a trap on purpose, so there the guard only records.

Artifacts

Each shard uploads web-qa-<shard> (always, kept 7 days): summary.md, summary.json and one folder per scenario with output.log, console.log, network.log, guard.json, shots/ and the .png files. The summary is also written to the job summary page with the failing problems and the last output lines.

Run it locally

./scripts/build-web.sh
npm install --no-save playwright@1.56.1 && npx playwright install chromium
node scripts/web-qa.js --dist web/dist --out web-qa-report --shard ui
node scripts/web-qa.js --only fatal-trap,engine-smoke --jobs 2

Software GL is slow: keep --jobs at 1 or 2 locally. For a one-off page add ?debug=1 and read the console.

Adding a scenario

  1. Write scripts/web-<name>-smoke.js that takes the dist folder as its first argument and exits non-zero on failure.
  2. Add it to scripts/web-qa.json with a shard, or list it under excluded with the reason (network, manual tool).

scripts/web-qa.test.mjs fails when a web-*-smoke.js is neither covered nor excluded, or when the part matrix in ci.yml does not cover every scenario exactly once.

Visual tour

node scripts/web-tour.js web/dist <out> walks title, menu, every utility screen, select, stages, VS, fight and pause with real keys and saves a numbered screenshot per step (TOUR_MOBILE=1 uses a phone in landscape, TOUR_LANG=pt-BR sets the browser locale). It fails on panics, navigation or browser errors, or a fight that never starts; the screenshots are for review and PR evidence.

Media capture

Screenshots and GIFs for the README come from the real web build running in headless Chromium, so what the docs show is what the game renders.

Steps

  1. rustup target add wasm32-unknown-unknown and cargo install wasm-bindgen-cli --locked --version <Cargo.lock version>.
  2. ./scripts/build-web.sh writes web/dist.
  3. node scripts/web-smoke.js web/dist must pass before any capture.
  4. CAPTURE_OUT=<dir> node scripts/web-capture.js <plan.json> plays a key plan and saves the results.

Plan file

{
  "video": "fight.webm",
  "steps": [
    { "key": "Enter", "wait": 900, "shot": "menu" },
    { "key": "ArrowDown" },
    { "hold": "ArrowRight", "ms": 600 },
    { "wait": 3000, "shot": "fight" }
  ]
}
  • key taps a key for hold frames (default 2) and waits wait ms (default 900).
  • hold with ms keeps a key down for that long.
  • shot saves <shot>.png after the step; video records the whole session as WebM.

Convert a WebM to a small GIF with ffmpeg -i fight.webm -vf "fps=20,scale=480:-1:flags=lanczos,split[a][b];[a]palettegen=max_colors=128[p];[b][p]paletteuse=dither=bayer:bayer_scale=3" fight.gif.

Automated Pipeline: record-gameplay.js & Skill

For automated recording of gameplay, milestone screenshots (1280x720) and Bayer-dithered GIFs in headless Linux environments:

node scripts/record-gameplay.js --out docs/evidence/<topic> --gif gameplay.gif --duration 6

See the complete guide in .agents/skills/ume-media-capture/SKILL.md.

Stress tests and resilience

What is covered

AreaTestCommand
Format parsers (SFF, AIR, INI/DEF/CNS/CMD, SND, ACT, PCX, PNG, zip, stage)Deterministic mutation fuzzer seeded from the bundled kfm zip. Fails on any panic or any input slower than 1.5 s.UME_FUZZ_ITERS=4000 cargo test -p ume-formats --release --test it fuzz::
Spawner spam (Explod, Projectile, Helper every tick)Tick cost stays boundedcargo test -p ume-engine --release --test it stress:: -- --nocapture
Hot pathsBuilt-in bench for SFF decode, AIR parse, CNS compile, char load, match tick with 2, 6 and 10 fighterscargo run -p ume-engine --release --example hotpath_bench
Rollback under latencycrates/netplay/tests/rollback.rs (in-memory sockets)cargo test -p ume-netplay

Findings and fixes

  • A corrupt SFF header could claim a 65535x65535 sprite: 3 to 48 s and gigabytes of RAM per file. Sprites and PNGs above 16M pixels (MAX_SPRITE_PIXELS) are now treated as empty.
  • Explods and projectiles had no cap. With Helpers spawning every tick, 240 ticks took 72 s and the cost grew quadratically (projectile pairs). Both are now capped at 256; extra spawns are dropped, as in MUGEN. 2000 ticks with 61 fighters now take 1.2 s (about 0.6 ms per tick).

Hot path numbers (kfm720, release, cloud CI-class CPU)

PathTime
SFF decode1.1 ms
AIR parse1.0 ms
CNS parse and compile3.2 ms
Char load without images7.6 to 10 ms
Match tick, 2 fighters5 us
Match tick, 6 fighters15 us
Match tick, 10 fighters39 us

The simulation is far below the 16.6 ms frame budget, so loading and rendering are the places to optimize, not the tick.

Comparison and ideas not done yet

  • GGRS provides SyncTestSession (resimulate every frame and compare checksums) and desync detection; bevy_ggrs documents a desync debugging workflow. Running a sync test in CI over a scripted fight would catch non-determinism early.
  • Ikemen GO added rollback netcode through GGPO-style save/load of full game state; the cost driver there is state size, so keeping fighters free of large per-tick allocations (already tested in tick_alloc) matters.
  • Not covered yet: packet loss and jitter in the netplay harness (only latency), GPU device-lost recovery, low-memory behavior, a CNS/expression fuzzer in the engine crate, and a roster stress that loads many different characters.

Native animation coverage

This delivery completes dedicated pose art for the native roster: every animation frame the engine can name resolves to its own PNG file. The shared numbered canvases (09_hit1, 13_fall2, ...) keep serving their legacy aliases, and purely procedural effect frames (boltHit, beams) stay engine-rendered by design; both are approved resolutions, not gaps.

Included in this wave

  • Dedicated portrait.png images for all sixteen native fighters remain in place for roster tiles and HUD portraits.
  • Every string pose referenced by an animation now has a dedicated PNG in assets/chars/sprites/<id>/, including the guard, crouch, jump, flip, turn, land, win, intro, taunt, df* defeat set, and the previously idle-reusing low-hit poses. Inline pose objects have their inline_<hash> frame rendered once.
  • Dedicated PNGs must be generated in arcade pixel art via generate_image using a validated canonical anchor of the fighter (the deprecated vector-rig generate_missing_sprites tool has been removed). Write 400×400 RGBA frames with axis (200, 392) and refHeight 320 metadata, matching the existing convention.
  • Verification: cargo run --release -p ume-engine --example native_sprite_audit -- <out.json> --require-complete must pass for every fighter, and cargo run --release -p ume-devtools --bin ume-tools -- audit-sprites --out <report.json> must stay clean on geometry and alpha edges. cargo run --release -p ume-devtools --bin ume-tools -- audit-moves is the static roster audit (inputs, cancels, throws, hit boxes).

sprite-gen QA loop

The sprite-gen skill remains the tool of record for art quality QA on the native loops, with no image-generation credentials required:

  • ume-tools motion-descriptor --character assets/chars/<id>.json --sprites assets/chars/sprites/<id> --animation walk --out walk.json
  • sprite-gen inspect-motion --source walk.json --out walk-report.json measures anchors, duplicate frames, bbox drift and edge contact; foot contact needs explicit --contacts and --foot-box inputs.
  • ume-tools preview-motion and ume-tools preview-scene render review GIFs and MP4s with the sprite-gen stages. See Sprite Atlas Import for the component-row import path when AI-generated art is wanted.

Known limits

Inventory and audit reports do not prove that the animations play naturally in a match: state triggers, transition smoothness and hitbox fit must still be validated in Training. Recolors apply at load time through the palette system, so visual spot checks should cover every palette of a fighter, not just the first one.

M.U.G.E.N character code study

Read-only study of public M.U.G.E.N packages: Goku GT (Fighter Factory pack from the project folder) and four Mortal Kombat Project 4.9.3 fighters (Scorpion UMK3, Sub-Zero UMK3, Liu Kang, Shao Kahn) fetched from archive.org. Only text files (.def, .cmd, .cns, .st) were extracted and read; nothing was executed and no art, audio or code was copied into the repository.

Package shapes

PackageCode sizeStatedefsLayout
Goku GT~31k lines~175cmd + cns + Especiales, Supers, SS1..SS4 (one file per form), IA for Statedef -2/-3
Scorpion UMK323.6k2211.cmd, 1.cns, Basic_Moves.st, Sp.st, Combos.st, finishers
Sub-Zero UMK328.4k324same plus 2.st, 3.st (alternate moves), Stage_Finishers.st
Liu Kang19.4k161Special_Punches.st for the kick/punch specials
Shao Kahn27.0k262Bmoves.st, Sp.st, helpers (100 Helper controllers)

Patterns

  1. Short motion commands. MK characters use 2 to 3 step inputs (B,B,a, D,F,x, F,F,b) instead of quarter circles, with time windows around 10 ticks. UMF accepts the same notation in moves[].input.
  2. Fast, long moves = helpers. Scorpion's spear is a Helper (state 1010) spawned on animelem = 4, with DestroySelf at time = 150, and the owner waits in state 1000 until p2stateno is the pull state (1020/1021), then switches to 1001 to pull. In UMF this is a projectile plus a throw follow-up.
  3. Teleports. Scorpion's 1100 (behind) and 1200 (forward) are plain PosSet/PosAdd states; UMF has teleport frame or abilities.teleport.
  4. Specials per button. One motion, a different button picks the variant (Liu Kang F,F plus x, a, b or y: fireball, flying kick, bicycle kick, etc.). UMF equivalent: one move per button plus EX versions.
  5. Heavy explod use. 440 to 530 Explod controllers per character for sparks, ice, fire and blood; UMF handles these through spark, hitAnim and fx.
  6. Combos stored in states. Combos.st holds scripted chains. UMF models this with cancels routes.
  7. AI as input scripts. 100+ commands named AI001.. (long button sequences) drive the computer opponent. UMF uses the built-in AI instead of per-character command scripts.
  8. Finishers (fatality, brutality, pit) are separate states keyed off round end; not migrated.

Fast versus strong in these kits

  • Fast: Sub-Zero slide (B,F,a kick) and rolls (F,F,F, B,B,B), Scorpion teleports and spear; low damage per hit, cancels into specials.
  • Strong: Shao Kahn hammer and crab specials (F,F,b, D,F,b), armor through long recovery, command attacks (B,F,y run punch).

These map to the lunge, falcondive, shoulder and meteordrop moves added to the native roster, see Fighter study.

Census: how much of a package is repetition

ume-tools mugen-census <zip-or-dir>... (crates/devtools/src/mugen_census.rs) reads only the text files of a package (.cns, .st, .cmd, .air) and counts states, controllers, commands and animation actions. Three packages measured, nothing extracted or copied:

PackageCode filesCode linesStatedefsCommon states redeclaredControllersCommandsAI commandsAIR actions
Goku GT (DBFZ style)1135092329563114782529
Goku UI (DBFZ style)727742258682241782294
Kung Fu Man (bundled)61064611810711740234
ControllerUsesShareUMF equivalent
changestate99716%generated from cancels, when and move kind
playsnd81313%voice and per-level hit sounds
explod5529%fx, spark, hitAnim
velset3526%vel on frames
helper3115%projectile, throw, abilities
hitdef2724%hits[]
changeanim2494%anim per move
destroyself2244%projectile removeTime

What the numbers say:

  1. A fighter is 10k to 35k lines of code, and the eight controllers above are 61% of all controller blocks. Every one of them is something UMF generates from a field instead of a hand-written state.
  2. Common states are copied and edited by hand. Each package redeclares 10 to 68 of the engine's common states (stand, walk, jump, guard, get-hit) to tweak them. UMF fighters never touch them: the differences are fields in stats and anims.
  3. Variants are full copies. EX and form versions of a move are whole new statedefs. In UMF a variant is one entry with "use": "<move>" and the fields that change.
  4. Nothing is shared between packages. Two Goku packages by the same author family share no file. UMF has extends and kits, so a new fighter can inherit a whole fighter or a move pack and stay in sync with it.

The same measurement on the native roster (21 fighters, 652 moves): 355 moves have a body identical to a move of another fighter, and 1136 of 1535 animations equal the most common version of that animation. That duplication is what extends, use and kits remove, see Reuse. The example fighter docs/examples/umf/mika.json is 671 bytes and plays with 40+ moves.

Limits

UMF cannot yet express scripted finishers, stage interactions (pit) or AI command scripts. Life conditions are now available through requires (see UMF character).

Dissection of four M.U.G.E.N fighters

Read-only study of four public packs, taken apart file by file with tools/mugen2umf: Aizen TYBW (Fighter Factory Ultimate, SFF v2), Gogeta SSJ4 (Pocket_Danyell and Sarevok), Goku SSJ GT (Yamcha Z) and Goku SSJ4 (_Vision). The packs are third-party files: nothing from them is committed, only what we learned. Companion studies: M.U.G.E.N code study and Fighter study.

Size of each pack

Aizen TYBWGogeta SSJ4Goku SSJ GTGoku SSJ4
Sprite formatSFF v2.01, 1380 sprites, 696 palettes, 29 MBSFF v1, 523 imagesSFF v1, 116 imagesSFF v1, 198 images
Sounds272 (19 groups, up to 4 MB each)33519
AIR actions26223284171
Clsn1 / Clsn2 boxes83 / 1538301 / 1202115 / 477309 / 1469
CMD commands67656265
Statedefs (own, no common)85 + 68 + 19 + 2101 + 229109 + 5 + 2
Controllers (own)650 + 676 + 173 + 57789 + 117223761 + 30 + 25
Life / attack / defence2250 / 115 / 1252600 / 110 / 1402100 / 120 / 1102400 / 130 / 130

Take-aways: Clsn2 outnumbers Clsn1 about 5 to 1 everywhere, because the body is split into 4 to 6 small boxes per frame (head, torso, arms, legs) and the attack is one to three boxes. This is the same rule as the native hit box audit.

File layout

FileRoleSeen in
.def[Info] name and author, [Files] list, pal1..pal12, pal.defaultsall
.cmd[Remap], [Defaults] (command.time, command.buffer.time), [Command] list, [Statedef -1] input to state routingall
.cns[Data], [Size], [Velocity], [Movement] constants then statesall
st1..st3 extra state filesIA.cns (-2/-3 AI), Especials.cns, Supers.cns, -final, -story-introsAizen, Goku SSJ4
common1.cnsCopy of the shared states, overridden by redeclaring a state numberall
.airActions: frames group,image,x,y,ticks[,flip,trans], Clsn1 (attack) Clsn2 (hurt), Clsn2Default, Loopstartall
.sff / .sndSprites and sound banks, referenced by group,image and group,indexall
.act256-colour palettes, one per colour optionGogeta, Goku SSJ4

Constants worth copying

  • Walk 2.3 to 2.4 forward, run 4.6, jump -8.1 to -10.1, yaccel .43 to .44, airjuggle 15, ground width 15 (10 for the thin Aizen), height 60, attack.dist 160. The native roster already uses the same scale.
  • fall.defence_up 50, liedown.time 60, sparkno -1 when the pack draws its own sparks.
  • Aizen sets airjump.num = 6 and a walk of 7: a fast "floaty" movement type, built from constants only.

Command layer

  • Quarter circles ~D, DF, F, a, half circles ~B, DB, D, DF, F, a, charge ~60$D,U,a and ~60$B,F,a (Goku SSJ), double taps FF, BB, ~D,U for super jump, 3-button combos a+b.
  • Button routing: /$B,x, /$D,y style commands hold a direction while pressing, giving command normals.
  • Buffers: command.time = 10 and buffer.time 1 in most packs, 15 to 30 for the packs that favour easy inputs.
  • Specials keyed off one motion, one button each: Aizen D,DF,F with a, b or c is Silent Slash, Dark Waves or Kurohitsugi. UMF does the same with one move per button.
  • Gogeta and Goku SSJ4 keep ai..ai13 commands (button strings) that only set an AI flag in -2; the engine has its own AI, so they are not migrated.
  • Cancels are written as extra triggers on the target move: trigger2 = numhelper(700) > 0 (Aizen cancels into specials while his clone lives), movehit and movecontact (165 uses in Aizen, 22 in Gogeta, 14 in Goku SSJ4). UMF names the same idea cancels and rekka.

Normal attack numbers

Standing light (200), standing heavy (210), crouching light (400), crouching heavy (410), jumping light (600), jumping heavy (610). Values are damage of the hit, pausetime of attacker and defender, ground.hittime, juggle points and poweradd:

StateGogetaGoku SSJGoku SSJ4Aizen
200 stand light20, pause 4,5, hit 11, juggle 4, power 2223, pause 7,8, hit 11, juggle 1, power 2023, pause 5,8, hit 7, juggle 1, power 2020, pause 9,9, hit 15, juggle 2, power 40
210 stand heavy55, pause 4,5, hit 1155, pause 11,11, hit 15, juggle 4, power 6063, pause 12,12, hit 15, juggle 5, power 6530, pause 9,9, hit 15
400 crouch light23, pause 10,11, guardflag = L23, pause 10,12, L23, pause 5,820, pause 0,15
410 crouch heavy37, pause 12,12, M62, trip, fall = 1, juggle 737, pause 12,12, M30, pause 0,60
600 jump light20, pause 7,8, HA12, pause 7,8, HA12, pause 7,830, pause 10,10
610 jump heavy72, pause 12,12, hit 1770, pause 9,10same values as 600no direct HitDef

Rules the packs follow: light normals pause 4 to 8 ticks and give 15 to 25 power, heavy normals pause 11 to 12 and give 55 to 70, ground hittime 11 to 15, crouching lows use guardflag = L and ground.type = Low, jump normals use HA, and the heavy crouch is the sweep (Trip plus fall = 1, Goku SSJ).

Move types and how they are built

TypeExampleHow it is built
FireballGoku SSJ 1000Statedef movetype = A, Projectile at Time = 14 with ProjAnim, ProjHitAnim, velocity = 5.5,0, projpriority, own HitDef params, AnimTime = 0 back to 0
Air fireballGoku SSJ 1005Same, type = A, physics = N until the throw, ProjHeightBound to remove it on the floor
Beam superGoku SSJ 1800poweradd = -2000, SuperPause on AnimElem = 1, AfterImage for the whole move, three Projectile controllers on the same frame: a visual with projremovetime, a long one with projhits = 30, projmisstime = 5, damage = 19,4
Multi-hit rushGoku SSJ 1050One long action, VelAdd pairs on alternating AnimElem (+4 then -4), EnvShake on the last element
ThrowGoku SSJ4 1601TargetBind every element, TargetLifeAdd at AnimTime = 0, TargetState to a wake-up state
CloneAizen 700A Helper with anim = 9999, DestroySelf at time = 15 or when the root is gone, and numhelper(700) used as a cancel trigger by every attack
Hit sparkAizen 995Helper on movehit = 1 && numhelper(995) = 0, postype = p2, scaled by Helper(999999) variables
CounterAizen Kyouka SuigetsuReversalDef or HitOverride window, then a state that teleports with PosSet
TeleportAizen ShunpoPosAdd by p2dist x + 40 then Turn (the exact code UMF emits for teleport)
FormGogeta Kaio Kenvar(11) flag, -2 adds power each tick, AttackMulSet 1.2, DefenceMulSet 1.2, Explod aura every 10 ticks
Power upGoku SSJ 730, 735, 740, 741Override of the common power-up states, PalFX plus EnvColor and sound

Aizen is the only pack that builds almost everything from helpers: 98 Helper controllers, 140 Explod, 128 AssertSpecial (NoShadow, Invisible), 48 AngleDraw. Goku SSJ is the opposite: no helper, no explod, 12 Projectile. Gogeta sits between them with 32 Projectile and 109 Explod.

Controller frequency

PackTop controllers
AizenPlaySnd 142 + 122, ChangeState 68 + 46, Explod 57 + 57, Helper 37 + 41, DestroySelf 37 + 27, HitDef 30 + 28
GogetaChangeState 145, Explod 109, PlaySnd 95, HitDef 38, VelAdd 37, Projectile 32, EnvColor 21, SuperPause 18
Goku SSJVelAdd 38, HitDef 37, ChangeState 34, Projectile 12
Goku SSJ4PlaySnd 137, ChangeState 135, HitDef 71, VelSet 63, AfterImage 29, AfterImageTime 24, Explod 24

Sound and sprite organisation

  • Sprites: group 0 idle, 20 walk, 40 jump, 100 and 105 turn and crouch start, 200 to 240 stand attacks, 400 crouch, 600 jump, 5000 to 5120 get-hit, 9000 portrait, 9000,1 small portrait. Specials use free groups from 1000 up. Goku SSJ4 keeps 121 groups for 198 images, Gogeta has 523 images in 109 groups (63 linked, sharing pixels).
  • Sounds: group 0 attack whooshes and voices, 5 hits, 6 guard, 11 KO, 20 and above for specials. Aizen has 104 sounds in group 0 alone.
  • Palettes: pal1..pal12 in the .def; Goku SSJ4 ships 5 .act, Gogeta 5, Aizen embeds its palettes in the SFF v2.
  • Timing: a normal is 8 to 17 ticks in total (Goku SSJ4 stand light 4 + 11 + 2, Aizen 2 + 2 + 4 + 4, Gogeta stand heavy 2 + 4 + 2); the hit frame is the middle one.

What the dissection changed in UME

  1. Native fighters must read like these packs: chain normals, rekka follow ups, command normals, air versions, one projectile per button, teleport, counter and a form.
  2. Hit and hurt boxes follow the limb: 3 hurt boxes minimum, attack boxes only where the frame has pixels (see the native hit box audit).
  3. Frame data targets the table above: light 4 to 8 tick pause, heavy 11 to 12, ground hit time 11 to 15.
  4. The Captain Marlow rebuild (see Characters) is the first fighter made with this method, see Remaking a M.U.G.E.N fighter as UMF.

Fighter study: 50+ fighters and what they teach

Reference survey of 52 well known fighters from commercial games and M.U.G.E.N. releases. It records the kit that defines each one and how that kit maps to a UMF fighter. Public move wikis (SRK, Dustloop, StrategyWiki, MKKomplete, Fighters Generation) were consulted; exact frame data differs per game version, so treat the numbers as design direction, not as copied data. No art, sprite or code from these games is used.

Fast fighters (rushdown, mobility)

FighterGameDefining toolsUMF take-away
KenStreet FighterFast run-in kicks, quick shoryuken, kara-cancel normalsShort dash attack that cancels into specials (lunge)
Chun-LiStreet FighterLightning legs multi-hit, fast jab chain, strong air normalsMany-hit light specials, air kicks with forward drift
CammyStreet FighterSpiral arrow dive, cannon strike, fast footsiesDiving air kick with angled velocity (falcondive)
AkumaStreet FighterAir fireball, demon flip, teleport, low healthAir versions of every special, teleport ability
Sol BadguyGuilty GearGunflame, Volcanic Viper, Roman CancelCancelable specials, invuln uppercut
Ky KiskeGuilty GearStun Edge projectile, Vapor Thrust, toolboxProjectile + anti-air pair
Chipp ZanuffGuilty GearTeleport, wall cling, dash stringsFast mobility with teleport and super speed
MayGuilty GearDolphin ride, Beach Ball, command jumpMixed mobility specials
Jack-OGuilty GearServants, installHelper style projectiles
RamlethalGuilty GearSwords, long reachLong-reach normals
TestamentGuilty GearTrap setupstrap projectiles
GokuDragon Ball FighterZAuto combo, super dash, Kamehameha, Instant TransmissionLight auto string, super speed, teleport
VegetaDragon Ball FighterZGalick Gun, Final Flash, fast low pokesBeam supers, rage
GogetaDragon Ball FighterZMixed beams and rushesMulti-hit supers with invuln
CellDragon Ball FighterZBeam, regenerate, Solar FlareLife regeneration passive
FriezaDragon Ball FighterZDeath Beam, Death BallPiercing multi-hit projectile
Kyo KusanagiKing of FightersRekka series, jump-in, fast pokesSpecial that cancels into follow-ups
Iori YagamiKing of FightersCommand dash, Scumgale, rageRage passive, forward lunge
Mai ShiranuiKing of FightersFan projectile, flying squirrel diveAir dive and fan projectile
K'King of FightersFast mid-range kicks, flameFast pokes + projectiles
AthenaKing of FightersPsycho Ball, teleportTeleport
Terry BogardFatal FuryPower Wave, Burn Knuckle, Rising TackleGround wave, command rush, invuln uppercut
HydeUnder Night In-BirthFast gap close, strong lowsRun-in strikes
YuzurihaUnder Night In-BirthEvasive dashes, lone actionEvasive dash
WolverineMarvel vs Capcom 3Berserker Slash, Tornado Claw, Drill ClawDive and rush specials, regeneration
ZeroMarvel vs Capcom 3Rekkoha, Hyper Zero RushMany-hit rush super
DanteMarvel vs Capcom 3Style cancels, jugglingCancel routes between moves
Fox / SheikSmash BrosFast aerials, short hopsAir-first neutral
ScorpionMortal KombatSpear, teleport punchPull projectile, teleport
Sub-ZeroMortal KombatFreeze ball, slide, cloneSlide low (slide) + freeze projectile
PeacockSkullgirlsTrap projectiles, screen fillingMany small projectiles
Akira YukiVirtua FighterSingle-hit heavy hits, strong throwsStrong launch hits, grabs
Jacky BryantVirtua FighterFast kicks, jugglesFast kick chains

Strong fighters (power, armor, grabs)

FighterGameDefining toolsUMF take-away
ZangiefStreet FighterSpinning Piledriver, command grabs, lariatCommand grab, lariat, armor
SagatStreet FighterTiger Shot, Tiger UppercutHigh/low projectile pair, invuln uppercut
M. BisonStreet FighterPsycho Crusher, Scissor KickArmored charge (shoulder)
GuileStreet FighterSonic Boom, Flash Kick, chargeCharge motion, invuln anti-air
BrolyDragon Ball FighterZArmor, Gigantic Meteorarmor, rage passive
HeihachiTekkenElectric wind god fist, launchers, power crushLauncher normals, armored move
KazuyaTekkenElectric wind god fist, hellsweepFast mid launcher
Jin KazamaTekkenMid launchers, Devil formForms
LawTekkenDragon kicks, fast midsKick strings
PaulTekkenDeathfist, big launcherHeavy single hit
Nina / XiaoyuTekkenFast pokes, stancesStance-like follow-ups
Liu KangMortal KombatBicycle kick, flying kickDive kick special
RaidenMortal KombatTorpedo, lightningRush and projectile
HaohmaruSamurai ShodownHeavy slashes, rageFew strong hits, rage
NakoruruSamurai ShodownHawk companion, fast attacksHelper projectile
RagnaBlazBlueGauntlet, Inferno Divider, life drainLife drain passive
MagnetoMarvel vs Capcom 3Beams, flightflight
FiliaSkullgirlsHair projectilesHair rush
Hulk / ColossusMarvelArmored rushes, armorarmor hits
RyuStreet FighterFireball, uppercut, spinning kickCanonical special set

Patterns turned into engine features

  1. Dash attacks and armored charges (lunge, shoulder) as command normals that still cancel into specials.
  2. Air dives with angled velocity and ground bounce (falcondive, meteordrop).
  3. Specials that cancel into other specials through explicit cancels routes.
  4. Invulnerable anti-airs (invuln) and one-hit armor on slow, heavy moves.
  5. Fast fighters trade damage for mobility (low hitstun normals, superSpeed, teleport); strong fighters gain armor, wallBounce and heavy level hits.

Applied to the native roster

GroupFightersNew moves
FastJin, Akio, Lian, Suzume, Kaname, Haruki, Kaito, Voltalunge (F+y, dash strike, 115 % of the heavy punch, cancels into specials) and falcondive (air F+b, angled dive)
StrongBruno, Garan, Daichi, Valdricshoulder (F+y, one-hit armor, wall bounce, 120 % damage) and meteordrop (air F+b, ground bounce, 130 % damage)

Only data and moves changed: no sprite, pose or stage was touched; every move reuses an existing animation.

How these fighters are made from scratch

  1. Design the kit: normals (light, medium, heavy, crouching, air), 3-4 specials, 1-2 supers, throw, dash.
  2. Art: pixel art in Aseprite or GraphicsGale with one shared palette (index 0 transparent), 3D prerender with an orthographic camera, or emulator rips. Crop tight and set the axis on the feet.
  3. Package: Fighter Factory loads PCX/PNG into an SFF; a .air file sets frames and Clsn boxes; .cmd holds inputs; .cns holds states.
  4. Frame data: light normals startup 3-5 ticks, heavies 8-14; hitstop 9-13 ticks.
  5. Balance and test: training mode with hitboxes, combo routes, AI.

See .agents/skills/mugen-character-creator and .agents/skills/mugen-to-ume-migrator.

Sources

Fighting game research: opportunities

English · Português (BR)

🇧🇷 Pesquisa de recursos públicos de outros jogos de luta e lista priorizada de melhorias. Nada aqui está implementado ainda.

This page compares publicly known features of modern 2D and 2.5D fighters with the current state of Ultimate MUGEN and ranks concrete opportunities. It is a planning document: no feature listed here is implemented yet. Only publicly documented features are cited, and no third-party assets are copied.

Effort scale: S under 2 days, M about 1 week, L 2 to 4 weeks, XL over a month.

Games surveyed

GameWhat it is known for
Dragon Ball FighterZAnime-fidelity visuals, 3v3 assists, simple auto-combo for beginners, ranked lobbies with arcade-style lobby avatars
Sparking! ZeroLarge roster, destruction and arena feedback, a long tutorial and a battle-rules customizer
Melty Blood: Type LuminaMoon styles, beginner-friendly auto-combos, rollback, lobbies
Guilty Gear -Strive-Rollback with a lobby of "park" avatars, a deep tutorial and mission mode, training mode with full frame data
BlazBlue Cross Tag BattleSimple 2-button layout, assist system, rollback after patching
Street Fighter 6Modern controls, Drive gauge HUD, in-game frame meter, replay sharing, Battle Hub, tutorial and character guides
Mortal Kombat 1Kameo assists, Krypt-style extras, training with tutorial for each character
Tekken 8Practice mode with heat and rage, ghost battle, replay and tips, character-specific guides
Them's Fighterz, SkullgirlsRollback, training mode with strong tools (Skullgirls in particular), colorblind and visual options, in-game tutorial
Persona 4 Arena UltimaxHit-stop and cinematic supers, story presentation
The King of Fighters XVTeam select with order, 3v3 sequence matches, rollback, practice mode
Under Night In-Birth IICompact 6-button layout, GRD system HUD, rollback, deep training
Ikemen GO and the M.U.G.E.N communityOpen screenpacks, lifebar and select customization, fight.def and system.def skinning, netplay with rollback, Lua scripting, common training options

Current state of Ultimate MUGEN

Checked in the repository on 2026-11-04.

AreaToday
ModesArcade, Versus CPU, 2 players, Training, CPU vs CPU, Team sequence, Team simul (Mode in src/app.rs)
TrainingDummy pilot (Pilot::Dummy), infinite meter, hitbox toggle in the pause menu
Pause menuContinue, Hitboxes, Restart, Change fighters, Settings, Main menu
HUDGlass panels, big portraits, combo counter, low-life pulse, MAX meter, urgent timer (PR #156)
Impact feedbackParticles, shake, hit-stop, KO slow motion, super cut-in, chromatic aberration, effect intensity setting
SettingsTabs for Video, Audio, Controls, Gameplay, Language, About
NetplayRollback with GGRS over UDP through CLI flags only (--netplay, --peer); .umr replay files; no in-game lobby, no browser or mobile transport yet
ReplaysRe-simulation of the last finished fight from recorded inputs; replay file format exists
ContentMarketplace from GitHub repos, .def/.zip import, native UMF fighters
Tutorial and trialsNone. Combo trials, survival and boss rush are on the roadmap (section 5)

Prioritized opportunities

Priority: P0 do first, P1 next, P2 later, P3 nice to have.

P0: biggest gaps against what players expect today

#OpportunityRationaleEffortTouches
1Training mode toolkit v2: dummy behaviors (stand, crouch, jump, block all, block after first hit), dummy recording and playback loop, reset-position hotkey with saved start positions, life and meter refill modesPractice modes in SF6, Tekken 8, Guilty Gear -Strive- and Skullgirls all offer record and replay of the dummy plus state resets. Without them training is just a hitbox viewMPilot::Dummy in src/session.rs, pause menu in src/app.rs, new HUD overlay in src/hud.rs
2Input display and frame data overlay: scrolling input history with frame counts, plus last-move startup, active, recovery, advantage and damageSF6 and Strive show input history and frame advantage in training; this is the main way players learn matchups. The engine already runs a deterministic 60 Hz simulation so the numbers are cheap to deriveMsrc/hud.rs, crates/engine (read-only hooks on Match), src/session.rs
3In-game online screen: host or join by code, direct IP, input delay and ping shown before the match, rematch buttonRollback exists but only through CLI flags. Every console fighter exposes lobbies and a rematch loop. Start with code-based rooms using the matchbox signalling the architecture decisions already choseLsrc/netlink.rs, crates/netplay, new Screen::Online in src/app.rs
4Netcode quality UI: connection graph (ping, jitter, rolled-back frames), per-match stats and a "poor connection" warning before accepting a matchGuilty Gear -Strive- and SF6 expose connection quality bars; the ROADMAP section 1 already lists thisSsrc/hud.rs, crates/netplay (expose stats)
5Guided tutorial: basics (move, block, special, super), then per-character move list with live input displaySF6, Tekken 8, Strive and Skullgirls ship tutorials; MUGEN-style engines normally have none, so newcomers have no onboardingLNew Screen::Tutorial, src/app/cutscene.rs reuse for text panels

P1: strong value, moderate cost

#OpportunityRationaleEffortTouches
6Combo trials from a per-character JSON list, with on-screen next-input prompts and success feedbackGuilty Gear, SF6, DBFZ and Melty Blood have trials; the ROADMAP already lists it. Fits UMF, where creators can ship trials with the fighterMNew trial runner on top of Session, UMF schema in docs/CHARACTER_FORMAT.md
7Simple (modern) control scheme: optional one-button specials and auto-combo, toggled per player, with a matching HUD markerSF6 Modern, DBFZ, Melty Blood and BlazBlue Cross Tag all have simplified inputs, which matters for touch screens in particularMsrc/controls.rs, src/keybinds.rs, command layer in crates/engine
8Accessibility pass: colorblind-safe HUD palettes, flash and shake reduction as separate toggles, larger HUD text, subtitle sizes, high-contrast hitbox colors, hold-to-toggle for held inputsSeveral current fighters offer colorblind modes and reduced flash. The effect intensity setting exists but is a single knobMsrc/settings.rs, src/app/settings_screen.rs, src/vfx.rs, src/hud.rs
9Replay viewer upgrade: replay list screen, playback speed, pause, frame step, camera control, "take over" a character mid-replay, save and share .umrSF6, Tekken 8 and Strive allow replay browsing and sharing; the file format and re-simulation are already deterministicMsrc/app.rs (Replay), crates/netplay (.umr), new Screen::Replays
10Ranked and matchmaking queue (server needed): rating, anonymous queue, rematch, win streakStandard in every console fighter. Requires a small service, so it comes after lobbies prove stableXLNew service plus Screen::Online
11Select screen upgrades: character info card (moves, difficulty), stage preview, palette and color preview, random-select roll animation, shuffle favorites, filter by tag and sourceKOF XV and DBFZ preview palettes and show team order; Ikemen GO screenpacks support slots, random and stage select. Already partly in crates/formats/src/screenpack.rsMsrc/app.rs select code, src/menu_art.rs
12Pause and result screens: move list, command list, key-mapping summary, rematch and "change character" shortcuts, post-fight stats (hits, damage, max combo, meter use)Move list in the pause menu is a long-standing fighter norm (Tekken, SF6, MK). Results screen already existsSsrc/app.rs pause menu and Screen::Results

P2: depth and polish

#OpportunityRationaleEffortTouches
13Training options page: infinite or regenerating life, meter modes, damage readout, hit-stun display, combo damage and scaling readoutAvailable in practically every training modeSPause menu, src/hud.rs
14Survival, boss rush and tower modes with rewardsPresent in Mortal Kombat 1 (towers), Sparking! Zero and Tekken; ROADMAP section 5MNew Mode variants, Team reuse
15Arcade ladder presentation: rival matches, character-specific intros and endings from storyboard filesArcade ladders with rival encounters are standard in Tekken, MK and KOF; Cutscene screen already supports story scenesMsrc/app/cutscene.rs, storyboard loader
16Spectator mode for rollback matches (watch a live room)Tournament and community play on Strive and SF6 use this heavilyLcrates/netplay, Screen::Online
17Per-match battle rules: round count, timer, damage scale, gravity, handicapSparking! Zero's custom rules, MK modifiers, and MUGEN community configsSRules struct (Rules already exists in Replay)
18Frame-meter and hit-box color legend drawn in real time (strike, hurt, throw, projectile) with a legendMatches the frame meter in SF6 and the hitbox modes in Skullgirls trainingMsrc/render.rs debug draw
19Controller UX: input latency test, gamepad button test, per-device profiles, dead-zone and SOCD choiceNeeded for stick and pad players; a latency test page is common in fightersSsrc/controls.rs, src/gamepad.rs
20Menu feel: sound and animation for every cursor change, hold-to-repeat navigation, mouse and touch parity, back-button behaviour on mobilePolish seen across all surveyed gamesSsrc/ui.rs, src/app.rs

P3: ecosystem and long term

#OpportunityRationaleEffortTouches
21Screenpack skin support for lifebars and select screens (fight.def, system.def) rendered on wgpuThe biggest reuse of the M.U.G.E.N community's work; loaders exist in crates/formats and rendering was waiting on the wgpu migration, which is now doneXLcrates/formats/src/screenpack.rs, src/hud.rs, src/menu_art.rs
22Mod and marketplace discovery: ratings, tags, screenshots, update notificationsMod-friendly games (Ikemen GO, Skullgirls community tools) rely on discoverability; marketplace already shipsMcrates/market, src/app/market.rs
23Character-specific tips and move guides authored by creators in UMFSame idea as the guides in SF6 and Tekken 8SUMF schema, tutorial screen
24Tournament tools: bracket from .umr replays, offline match recorder, overlay for streamersFits the roadmap section 2LNew tooling crate
25Localization expansion (Spanish, Japanese) and screen-reader labelsROADMAP section 5Msrc/i18n.rs

Suggested sequence

  1. Training toolkit (1, 2, 13), because every other feature is easier to verify with it.
  2. Netcode UI and online screen (4, 3), then replays (9).
  3. Tutorial and trials (5, 6), then accessibility and modern controls (8, 7).
  4. Select and results polish (11, 12), then modes (14, 15).
  5. Ranked service and spectator (10, 16) once lobbies are stable.
  6. Screenpack rendering (21) as a separate track.

Notes and caveats

  • Ikemen GO is credited as inspiration only, like in the Home page.
  • Feature lists reflect public information about each game as of the research date and may change with patches. Treat them as reference points, not requirements.
  • Input history and frame data tools (2) must read the match state only; they must not change the simulation, to keep rollback determinism.
  • Anything that adds fields to Match should also be included in ume_netplay::checksum.

Story mode research notes

What was found (fan wikis and reviews, not an official guide) and how it maps to the engine.

  • Final Fight (arcade, 1989). Six rounds plus two bonus rounds, a boss at the end of each round: Damnd (Slums), Sodom (Subway/Park), Edi. E (West Side; one source lists Andore and Edi. E together), Rolento (Industrial Area), Abigail (Bay Area) and Belger (Uptown). Thugs come in waves, weapons and food are picked up along the way.
  • Capcom Arcade Stadium. Rewind, save states, slow-down/turbo and adjustable difficulty; credits are effectively unlimited.
  • Sengoku 2. Sword is the default weapon with high/low attacks and a parry; bosses are larger and mark story points. Stage-by-stage boss lists were not found.

Not verified: the exact enemy roster of each Final Fight stage beyond the first three, Sengoku mid-bosses, and Arcade Stadium specifics beyond the shared features above.

Depth (beat 'em up convention, from community dev guides, not Final Fight's own code): characters walk a floor band, attacks test a depth tolerance first and then the usual box overlap, and a thin tolerance makes hits miss unless fighters are nearly aligned, so the tolerance is kept generous (14 units) and the CPU aligns itself to the target.

Mapping: five stages (not six) of three thug waves plus a boss, carried life with recovery between waves and stages (food), three credits (continues). Breakable objects, food pickups and two bonus rounds are implemented with original content (see Stage objects); weapons and rewind are not.

Rust engine UI references

Study of the eleven Rust engines listed in "Best Rust Game Engine for Game Development" (WeeTech Solution, 2026) and what is worth borrowing for menus, loading screens, HUD, settings and buttons. Nothing is copied into this repository. Only ideas and layout patterns are recorded here.

Stack constraints that bind every recommendation: wgpu + winit renderer, tiny-skia, custom immediate-mode UI in src/ui.rs and src/app/menu_view.rs, layout tokens in src/ui_tokens.rs. No macroquad, no egui, no Lua.

Method and limits

  • Source was read only for five repositories, shallow-cloned at the session's read access: not-fl3/macroquad (MIT OR Apache-2.0), ggez/ggez (MIT), FyroxEngine/Fyrox (MIT), bevyengine/bevy (MIT OR Apache-2.0), AmbientRun/ambient (MIT OR Apache-2.0). Licence text was confirmed from the repository files.
  • The other six (Amethyst, Piston, Nannou, Blue Engine, Tetra, rend3) were not opened. Their notes below come from the article only and are marked as unverified.
  • The article itself is marketing text. Its descriptions are generic and some claims (for example, which engines are actively maintained) were not checked.

Engine by engine

EngineLicenceUI relevanceWhat we can use
MacroquadMIT OR Apache-2.0High. Immediate-mode UI in src/ui/ (widgets, style.rs, key_repeat.rs, combobox, clipboard.rs, input_handler.rs)Closest model to our UI. Key-repeat for held arrows in menus, a style/skin struct for button and panel colours, combobox behaviour for settings. Stack rule: we do not adopt the crate.
FyroxMITHigh. fyrox-ui is a full retained-mode widget set: buttons, dropdown list, dropdown menu, tab control, scroll viewer, progress bar, message box, popup, file browser, navigation, styleReference for the set of widgets a settings screen needs, focus navigation.rs for keyboard and gamepad, progress_bar for loading, messagebox for confirm dialogs, and a style module for themes. Retained-mode message passing does not fit our immediate-mode code, so ideas only.
BevyMIT OR Apache-2.0Medium. bevy_ui (flexbox), bevy_ui_render, bevy_ui_widgets (headless widgets, behaviour separated from styling)The split between widget behaviour and visual style is worth copying conceptually. Flexbox is not needed; our 1280x720 virtual layout with tokens is enough. Bevy's state-based screen flow suggests how to structure loading and transitions.
AmbientMIT OR Apache-2.0Low to medium. A UI element tree (element, element_component) built on its own runtimeOnly the idea of composing small reusable elements (button, panel, label) with props. Its runtime is too large to borrow from.
GGEZMITLow. No UI layer; has a graphics text/glyph path and timersReference for a minimal loop and text rendering with glyph caching. Nothing to copy for UI chrome.
Tetranot checkedLow (article only)Nothing needed beyond what we have.
Amethystnot checkedLow (article only). Project status should be checked before any referenceSkip.
Pistonnot checkedLow (article only)Skip.
Nannounot checkedLow (article only; creative coding, not a game UI)Skip.
Blue Enginenot checkedLow (article only)Skip.
rend3not checkedLow (renderer only, no UI)Skip. Its post-processing ideas are covered by our own postfx.

Prioritised recommendations

Ordered by player-visible impact and by how little they cost to build on the current UI code.

  1. Loading screen with a progress bar and tips. Fyrox's progress_bar and Macroquad's simple panel style show the pattern. We already have src/loading_tips.rs; add a determinate bar driven by the real load stages (parallel load already exists, see Performance). Expected result: loading no longer looks frozen.
  2. Keyboard and gamepad focus navigation with key-repeat. Macroquad's key_repeat.rs and Fyrox's navigation.rs. Holding up/down in menus should step smoothly, and focus should be visible on every screen.
  3. Settings widgets: dropdown, tabs, scroll viewer. Fyrox's dropdown_list, tab_control, scroll_viewer and Macroquad's combobox define the expected behaviour (open, close on outside click, keyboard selection). Put them in new files under src/ui/ or src/app/, using ui_tokens.
  4. Confirm dialogs and tooltips. Fyrox's messagebox and popup for "quit match?", "delete replay?" and similar prompts. Keeps destructive actions explicit.
  5. Theme struct for colours and sizes. Macroquad's style.rs and Fyrox's style module. We already have 11 themes in menu_art.rs; moving their values into one Theme struct with tokens makes adding a theme a data change.
  6. Screen transitions as a small state machine. Bevy's state pattern. Fade or slide between title, select, fight and results, with easing matching the existing menu entry animation (ease-out cubic, 0.28 s).
  7. Headless widget behaviour. Bevy's bevy_ui_widgets idea: separate hit-testing and focus logic from drawing so the same button logic serves the menu, pause and settings screens.

Status against the current code

The recommendations above were checked against the code on 2026-11-10. Most of the list already exists, so the work is to keep it and fill the real gaps.

ItemStatus
Loading screen with progress bar and tipsAlready there: Ui::loading_screen, progress_bar, src/loading_tips.rs, real step labels in src/app/loading.rs. Keep.
Smooth menu focusAlready there: src/app/menu_focus.rs (frame-rate independent easing). Keep.
Confirm dialogsPresent for replay deletion in replay_browser.rs; pause has its own skin. Other destructive actions could reuse the pattern.
Screen transitionsAlready there: diagonal wipe in src/app.rs. Keep.
Key repeat when a direction is heldWas missing: the shell drops OS key repeats on purpose, so menus and sliders moved one step per tap. Added in src/controls/nav_repeat.rs (0.38 s delay, then every 75 ms, directions only).
Dropdown, tabs, tooltips, theme structNot implemented. Candidates for later small PRs.

What we will not do

  • Adopt macroquad, egui or any engine's runtime. That breaks the stack decision in Engine.
  • Copy code from MIT or Apache-2.0 sources into the repo. Use them as design references only, so no licence notice is needed.
  • Touch character sprites or stages. Those are handled elsewhere.

Authoring tool survey: Fighter Factory Studio

Static study of a public Windows build of Fighter Factory Studio (FFS 3, portable Qt4/Qt5 package, about 2000 files, 57 MB). It is the reference editor of the MUGEN community, so it shows what authors expect when they create characters. Nothing from the package is copied into this repository; only formats, checks and workflow conclusions are recorded here.

Method and limits

  • The archive was extracted into an empty folder and only inspected: file listing, XML/HTML/Lua data files and strings on the engine-module DLL. No binary was executed.
  • REA (rea-agents 6.8.0) installs and runs, but native decompilation needs Hopper, Ghidra, IDA or Rizin, none of which exist in this environment. Native analysis was therefore limited to string tables. A later pass with a provider could decompile ff.mugen.dll to confirm the exact rule behind each message.

Disassembly pass (radare2)

Hopper and IDA are commercial and Ghidra's host is blocked by the network policy; Rizin is not in the package repositories. radare2 5.5 (Ubuntu) was used instead, read-only on the 32-bit ff.mugen.dll, nothing executed. Confirmed so far: the guard handler branches on the defender state type, value 1 enters state 150, 2 enters 152, 3 enters 154 (the reaction to a guarded hit; state names should be checked against the target engine's common1), anything else prints "Guard state error: wrong move type". So the warning is about the defender's statetype, not the attacker's movetype. The remaining messages are still unconfirmed against code.

What the package contains

AreaFinding
Editor modulesSprites (SFF 1/2, onion skin, layers), Animations (visual and code), Palettes, Sounds, Commands, States, Definitions, Emulator and Debug workspaces
ScriptingLua 5.3 scripts for editor automation (scripts/tool, scripts/project)
Engine moduleOne module per engine (engines/mugen): schema, completion list, one template file per state controller (89), snippets, project templates, per-version docs (1.0, 1.1, common, DOS, Win)
EmulatorAn in-editor MUGEN-compatible runtime (MUGENext) with training mode, breakpoints by file and line, variable inspection

Declarative schema (syntax.xml)

The whole .def/.cns/.cmd/.air grammar is data, not code. It covers nine file kinds (char, state, command, stage, fight, select, motif, font, storyboard) and almost 3000 parameters. Each parameter has a name and a type (int, float, int2, int4, intvec, expi, expf, expb, keyword, ustring, file, hitattr, hitflags, guardflags, keyseq), plus optional attributes: required, optional, minver, deprecated, list, max. Examples of required fields: StateDef needs type, movetype, physics, anim; [Data] needs life, attack, defence, fall.defence_up, liedown.time, airjuggle.

Lint messages driven by that schema: duplicate parameter in a group, invalid block for the project type, parameter invalid for the project version, parameter deprecated since version X, wrong argument count, duplicate or invalid hit attribute and hit flag, invalid keyword, trigger redirection invalid in this context, syntax error with line.

Asset checks

  • Required sprite missing (group, index) when loading a character.
  • Palette or sprite entry without id, file, axis or palette; invalid NPOT mode.
  • Duplicate palettes (noDuplicatePal, "remove all duplicates") and unused palettes ("clear unused").
  • 32-colour palettes stored as 5-bit data; palette remap table.

Runtime warnings of the emulator

Each warning carries tick, player, state and file: line: change to an invalid state, action or anim element; guard state with the wrong move type; invalid RemapPal in Helper or Explod; Explod bind id not found; invalid PalFX time, colour or multiplier; trigger redirection problems; invalid AI file ignored.

Workflow features worth matching

  1. Sprite import by file name with group and index (group_index, group-index, group,index), axis presets, three palette modes (own palette, force palette, exchange palette), crop before or after the axis.
  2. Aligned export with one common axis ("perfect axis") plus onion skin while aligning.
  3. Sprite explorer: create an animation straight from selected thumbnails.
  4. Per-frame loop point, scale, angle and interpolation flags.
  5. Variable usage list and log per state file (var, fvar, sysvar collisions between states and helpers).
  6. Snippets and state controller templates for common moves.

Gap against our skills and tools

The mugen-character-creator skill had no pre-flight checklist for required or version-gated parameters, palette hygiene, variable collisions, or import naming, and no mapping of runtime warnings to causes. The new reference references/checklist_lint_editor.md adds it, and the skill now points to it.

Follow-ups (code, not done here)

  • Drive mugen_check from a schema of required, version-gated and deprecated parameters written from the public MUGEN documentation.
  • Add a variable usage report (var, fvar, sysvar) across states and helpers.
  • Add palette duplicate and unused reports next to sprite_audit.
  • Accept group_index style names in import_sprite_atlas.
  • Print the runtime warnings above, with state and line, in the debug overlay.

Reverse engineering a browser M.U.G.E.N port

English · Português (BR)

What https://w8.snokido.com/games/html5/dbz-vs-marvel-vs-capcom/ does with a 78-fighter M.U.G.E.N roster, how its animation system works, why it holds 60 fps, and what of all that we should copy — or not — in Ultimate MUGEN.

Everything below was measured or read from the shipped artifacts. The scripts that produced it live in docs/research/ikemen-web/, so every number can be re-run.

1. What the page is

The public page is a 11 KB shell: menus, character select, versus splash and the options screens are plain DOM (that part is the snokido/runtime-ui.js UI layer). The fight itself is a separate document, frame.html, inside an iframe, and the engine there is not JavaScript: it is a Go program compiled to WebAssembly.

ArtifactSizeRole
index.html11 KBshell: boot, menu, select, options
local-runtime.js342 KBobfuscated bootstrap: holds the Go wasm_exec glue and the frame module as strings, plus the content catalog
runtime-ui.js420 KBthe DOM UI (obfuscated, digest-gated)
frame.html2.2 KBengine host: one <canvas id="ikemen-canvas">
runtime-engine.bin5,887,387 Bgzip of a 25,343,508 B WebAssembly module
content/catalog.shvd.json265 KB78 characters, 74 stages, pack URLs, sha256, sizes
content/packs/*.zip1–24 MB eachunmodified M.U.G.E.N files, one zip per character/stage

The bootstrap posts {frameJs, wasmExec, descriptor, gzipBytes} to frame.html, which installs wasm_exec.js from a string, imports the engine module from a Blob URL and gates it on a SHA-256 of the values it was handed. That is copy protection, not engine design.

$ node docs/research/ikemen-web/wasm-artifacts.js runtime-engine.bin
module bytes: 25343508
[imports "gojs"] 25
  runtime.scheduleTimeoutEvent:function
  runtime.wasmExit:function
  syscall/js.valueGet:function
  syscall/js.copyBytesToJS:function
  mem:memory
[exports] run:function resume:function getsp:function mem:memory
[build info] ikemen-GO v0.0.0-20260927200105-cae6cd63ba4a+dirty
[go source files named by the symbol table] ... render_webgl.go render_webgl_cmdbuf.go system_js.go audio_js.go input_js.go loadyield_js.go ...

gojs imports plus run/resume/getsp exports are the Go runtime's WebAssembly ABI, and the Go symbol table keeps every source path. The engine is Ikemen-GO (the open Go reimplementation of M.U.G.E.N) with a WebGL2 backend added for the browser: render_webgl.go, render_webgl_cmdbuf.go, system_js.go, audio_js.go, input_js.go, pause_js.go, platform_js.go, loadyield_js.go, font_webgl.go, netplay_js.go.

The catalog names its own provenance, which is how the backend source was located and cross-checked against the binary:

"source": { "components": [
  { "name": "ikemen-go-web",      "url": "https://github.com/energyjp/ikemen-go-web",             "revision": "54305ec917c3e995f433004e2e8f7c8902bff96a" },
  { "name": "Ikemen-GO-Screenpack","url": "https://github.com/ikemen-engine/Ikemen-GO-Screenpack", "revision": "87f348a5f6e01e878a62ae865c6ee7d3281f8c98" } ] }

Upstream ikemen-engine/Ikemen-GO has no WebGL backend; energyjp/ikemen-go-web does. The checked-out source matches the binary exactly (opcode table, GLSL, symbol names, canvas id), so the "how" below is verified against both.

2. Content: no re-encoding, just zips

The packs contain the original M.U.G.E.N files — .def, .sff, .snd, .air, .cns, .zss, .act — untouched. Verified on the Goku pack (24,319,368 B, sha256 matches the catalog): files/goku.sff 9.6 MB, files/goku-jap-en-bl.snd 20.7 MB, files/goku.air 287 KB, 21 palette .png/.act files, plus the character's own movelist HTML.

So the browser downloads raw M.U.G.E.N content and the WASM engine parses SFF/SND by itself. Nothing is pre-baked into spritesheets, and only the front-end media (portraits, icons, stage thumbnails) is pre-encoded to WebP with content-addressed names (collections/shvd/media/<sha256>.webp).

core (7.0 MB zip → 9.7 MB) is the screenpack and system data, and every other pack declares "dependencies": ["core"]. A match loads: core + one pack per fighter + one pack per stage.

3. Animation: M.U.G.E.N semantics, unchanged

Animations are .air files parsed into the same structures M.U.G.E.N uses (src/anim.go):

StructureFields that matter
Animationframes, loopstart, curtime, curelem, totaltime, looptime, interpolate_offset/scale/angle/blend, mask, transType, srcAlpha/dstAlpha
AnimFrameGroup, Number, Xoffset, Yoffset, Time (ticks), Xscale/Yscale, Angle, TransType, Clsn1/Clsn2
Anim (instance)anim, x/y, xscl/yscl, window, xshear, rot, palfx, layerno, localcoord

The per-tick path is deliberately cheap:

  1. Animation.Action() advances curtime; at totaltime it jumps to loopstart and sets newframe.
  2. Animation.UpdateSprite() runs every tick but only does work when newframe is set — that is where the sprite is resolved, with one map lookup: a.spr = a.sff.GetSprite(uint16(group), uint16(number)) (anim.go:702), after applying the character's Remap presets.
  3. Rendering reads frames[drawidx] for the transform and the cached spr for the texture. Nothing is re-looked-up per tick, and nothing is interpolated.

So there is no tweening and no sub-tick interpolation: frames change on the 60 Hz tick, exactly like M.U.G.E.N. The perceived smoothness comes from the tick rate, from interpolate offset/scale/angle/blend (which animate transforms between AIR frames), and from the shader doing all colour work in one pass.

Colour is a shader feature, not a bake

Two things that would normally cost uploads are pushed into the fragment shader (src/shaders/sprite.frag.glsl, which is also embedded in the WASM as a string):

c = COMPAT_TEXTURE(tex, uv);
if (isRgba) { ... } else {
    c = COMPAT_TEXTURE(pal, vec2(c.r*0.9966, 0.5));   // palette lookup from the red channel
}
if (hue  != 0.0) c.rgb = hue_shift(c.rgb, hue);
if (neg)         c.rgb = neg_base - c.rgb;
c.rgb = mix(vec3((c.r+g.c+b)/3.0), c.rgb, 1.0 - gray);
c.rgb += final_add;
c *= final_mul;
if (!isFlat) c.rgb = mix(c.rgb, tint.rgb * c.a, tint.a);
  • Palettes: an indexed sprite keeps its 8-bit pixels as the texture and is coloured through a 256×1 palette texture (newPaletteTexture() → newTexture(256, 1, 32, false)). Changing pal1…pal12 or RemapPal re-uploads 1 KB, not the sprite. Sprite::CachePalTex (image.go:1336) compares the 256 colour words and only re-uploads on change, so a palette swap costs one texSubImage2D per sprite that actually changes.
  • palFX (add, mul, color, hue, invertall) is per-sprite uniforms on the same draw — no second pass, no RenderMode shader switching.
  • Trapezoid distortion (floor shadows / xscale skew) is computed in the same shader from gl_FragCoord, not by re-projecting vertices.

One shader covers flat quads, RGBA sprites, indexed sprites, trapezoids and the whole palFX chain. M.U.G.E.N's "one more shader per effect" problem simply does not exist there.

4. How it stays fast

The interesting part. Measured on the shipped build (headless Chromium, ANGLE/SwiftShader so the GPU numbers are software-rendered, 1280×720 CSS, two runs on a loaded machine):

MetricValue
Canvas backing store640×480 (CSS 1280×720, object-fit: contain)
drawArrays per rAFp50 82–105, p95 113–163, max 172–224
bufferData per rAF82–125 (one small upload per sprite; runs of text share one)
Uniform calls per rAF322–397
useProgram per second30–76 (a handful per frame)
bindTexture per second1.4k–6.2k
Engine frames per rAF0.78–0.89 (fixed 60 Hz, gated)
JS heap in a match9–74 MB
Boot → menu1.9 s
Menu → select4.0 s
Select → first fight37 s (core + 2 fighter packs + stage over the network, then SFF decode)
Long tasks during a match50–90 ms, recurring (asset decode / GC on the main thread)

4.1 The scene renders at 640×480 into an FBO, then gets blitted

Init() creates an RGBA texture + a DEPTH_COMPONENT24 renderbuffer at sys.scrrect (640×480) and draws the whole scene there; EndFrame() runs the external post shaders through two ping-pong FBOs and only then does one drawArrays(TRIANGLE_STRIP, 0, 4) to the default framebuffer with a letterboxed viewport and NEAREST (or LINEAR if the user picked smoothed scaling). Every sprite is rasterized at 640×480 regardless of window size.

4.2 One JS crossing per frame instead of one per GL call

This is the headline trick (render_webgl_cmdbuf.go). GL calls are not issued from Go; they are encoded into a byte stream:

// GL command buffer: batches the browser build's per-frame WebGL commands into a shared ArrayBuffer
// that a JS-side interpreter drains in ONE syscall/js crossing per flush, instead of one crossing
// per GL command.
//
// Why: profiling the shipped (v0.9) build showed hundreds of `gl.Call` crossings per frame; each
// crossing boxes its arguments through syscall/js.makeValue (~450MB/30s of JS garbage) and pays the
// wasm->JS context switch.
  • 256 KB staging buffer (wglCmdBufBytes = 1 << 18), 23 opcodes (useProgram, uniform*, activeTexture+bindTexture, bufferData, drawArrays, enable/disable, blendFunc, scissor, depthMask, bindVertexArray, texParameteri, …).
  • GL objects (textures, programs, uniform locations, VAOs, buffers) are registered once into a JS array and referenced by integer handle.
  • flushCmds() does one js.CopyBytesToJS + one Invoke of a JS interpreter built with the Function constructor.
  • Every direct GL call goes through glc(), which flushes first, so command order is preserved by construction.

4.3 Uniform and state deduplication on the Go side

SetUniformISub/SetUniformFSub keep per-program caches keyed by (programID << 16) | uniformIndex and emit nothing when the value is unchanged. EnableBlending, SetDepthTest, SetDepthMask, EnableScissor and ChangeProgram do the same for GL state. That is why ~14 uniforms per sprite collapse to ~4 on average, and why useProgram is only 30–50 calls per second.

4.4 Zero allocation in the draw path

The same file documents the measured cost of the naive version: passing a local [16]float32 to an interface method made it escape, allocating vertices + uniform + modelview per quad, and drawQuads alone allocated >1 GB per 30 s of heap. The fix is package-level scratch arrays reused per call (the render path is single-threaded and each buffer is consumed synchronously).

4.5 rAF gating to the game's framerate

system_js.go does not run a frame per requestAnimationFrame; it runs at most one per 1000/Video.Framerate:

// Browsers fire rAF at the DISPLAY's refresh rate - 120/144/240Hz on high-refresh screens. ...
// Releasing a frame on every rAF therefore runs the whole loop 2-4x more often than the game is
// authored for, multiplying allocation and forcing far more frequent GC pauses (the 200-500ms
// mark stalls high-refresh users saw) for zero visual benefit.

SwapBuffers() then parks the main goroutine on a channel until the next released frame — which also yields the JS event loop so input, network and audio callbacks run.

4.6 Sprites are not atlased; fonts are

Every sprite keeps its own texture. There is no sprite atlas and no eviction policy, so a match can never hit an atlas-full cliff. The 16 texture units are used as an LRU cache (texCacheTexSerial/texCacheLastUsed) so consecutive sprites from the same sheet do not re-bind.

Only text uses a TextureAtlas: 256×256, skyline packing with edge extrusion, and glyph quads batched per atlas so a run of text is one draw.

4.7 One draw call per sprite, by design

SetVertexData(...16 floats...) + RenderQuad() → bufferData(STATIC_DRAW) followed by drawArrays(TRIANGLE_STRIP, 0, 4). Per sprite: 1 bufferData, 1 drawArrays, ~4 uniforms, ≤1 texture bind — all inside the command buffer, so the Go side pays only a few emitI/emitF per sprite. At 82–172 sprites per frame that is 5–10 k GL calls/s, which is exactly what a software rasterizer in headless Chromium can absorb.

5. What we already do better

Ultimate MUGEN does not need the command buffer: our shell talks to wgpu, which already packs a frame into a few submissions. And our sprite path is architecturally ahead of theirs:

ConcernIkemen web buildUltimate MUGEN
Draw calls1 per sprite (82–172/frame)batched: quads merged per blend state + scissor into one vertex/index buffer
Bind stateper-sprite texture binds, 16-unit LRUone bind group; atlases + palette texture bound once
Palette256×1 texture per sprite, per-sprite upload on change1024 palette rows in one texture, row index per vertex, RemapPal swaps the row
Atlasnone for sprites (per-sprite textures)RGBA atlas + 8-bit index atlas, reset independently
Simulationwhole fighter state machine in WASMhotpath_bench (below)
Frame pacingrAF gate at Video.Framerateume_shell::Pacer + fixed 60 Hz step (≤5 ticks/frame)

Our simulation cost, so the frame budget is not the issue:

$ cargo run --release -p ume-engine --example hotpath_bench
sff decode                   mean      829.6 us
air parse                    mean      493.5 us
cns parse+compile            mean     3680.8 us
char load (no images)        mean     7388.2 us
match tick (2 fighters)      mean        4.2 us   p99  9.0
match tick (6 fighters)      mean       11.3 us   p99 17.6
match tick (10 fighters)     mean       20.1 us   p99 33.5

4–20 µs per tick against a 16.7 ms frame: 0.03–0.12 %. The fight is spent in the renderer and the loader, which is exactly where the browser port spent its effort too.

6. What we changed

The port's own bug reports (>1 GB/30 s of GC from per-quad allocations, 450 MB/30 s from per-call boxing, 200–500 ms stalls from oversimulating at 144 Hz) all have the same shape: a whole match's work paid inside one frame. We had the same shape in one place: the sprite warm-up.

App::finish_fight uploaded fighter sprites in the single frame that switched to the fight:

#![allow(unused)]
fn main() {
self.g.trim(4000);
for f in &sess.m.fighters { if !self.g.prefetch(&f.def, 0.5) { break; } }
}

How much art a fighter carries (new sprite_mem example):

$ cargo run --release -p ume-engine --example sprite_mem -- mugen/chars/BuuZ2 mugen/chars/cell mugen/chars/frieza
mugen:c/buuz2.def   sprites=2510  indexed=2510 | index atlas  33.71 MB | total  33.86 MB | largest spr 5202 KB
mugen:c/cell.def    sprites=631   indexed=631  | index atlas   9.91 MB | total   9.99 MB | largest spr  818 KB
mugen:c/frieza.def  sprites=673   indexed=673  | index atlas   8.67 MB | total   8.74 MB | largest spr  682 KB

A DBZ pair is 43.6 MB of index sheets across 3,141 sprites, and the largest single sprite is 1.3 MB.

6.1 Pay the warm-up per frame, not per match

App::warm_step + Gfx::prefetch_step: a load step of its own that copies at most WARM_BUDGET = 512 KiB per call. Behind the VS screen it is one chunk per frame (the splash lasts at least 1.8 s), and the blocking start_fight path (rematch from the pause menu or the results screen, netplay start, the scripted tours) now yields a frame between chunks instead of freezing.

Measured on the same machine, same tour, same fighters, with UME_WATCHDOG=1:

Damaging frame
before212.8 ms in 'fight:prefetch' (one frame)
after2.3 / 2.4 / 2.5 / 2.1 / 8.8 ms in 'load:sprites' (one chunk per frame)

A rematch with the same roster no longer flushes the texture cache at all (see 6.3), so its warm-up copies nothing.

6.2 Palette rows are shared by content

ume_render::PaletteRows keeps one row per distinct 256-colour palette instead of one row per palette object: a mirror match, a RemapPal that lands on an existing palette, and a re-warm after an atlas reset all reuse the row and skip the upload. Unit-tested in crates/render/src/palette.rs (50 lookups of the same colours → one row; a full atlas reports failure instead of overwriting a row in use).

6.3 A rematch keeps the atlases it already filled

The warm-up keys on the roster (def.id of both fighters). If the key matches the last warm-up, Gfx::trim is skipped, so the atlas generation does not change and prefetch_step finds every sprite already resident: the second fight of a marathon starts with zero uploads.

6.4 A draw-call budget that fails the build

ume_render::DRAW_CALL_BUDGET = 24 with batch::tests::a_fight_screen_stays_within_the_draw_call_budget: a synthetic fight frame (stage layers, a subtractive reflection pass, two fighters, additive hit sparks, a two-region HUD overlay) must stay under the ceiling, and a_flat_run_of_quads_is_one_call pins the 300-quads-one-call property. Break the batching and CI says so.

6.5 Hitch labels that point at the right phase

ume_shell::watchdog::label now sticks to the first phase named in a frame. Before, the trailing label("import") at the end of App::frame overwrote everything, so a slow loading step was reported as an import; that is why the load:sprites numbers above are visible at all. Unit-tested.

6.6 What the numbers also told us

prefetch_step logs where it stops: for a native (RGBA, high-resolution) fighter the 50 % atlas cap fits 8 of 116 sprites, after which the warm-up gives up and the rest stream lazily during the fight — one upload at draw time, which is what the browser port does for every sprite. For indexed DBZ art the same cap fits a few hundred. So the bulk warm-up is bounded by the atlas, not by the roster, and the next step (backlog 5) is to give the lazy path a per-frame upload budget instead of trying to pre-load more.

7. Backlog, in priority order

#Idea from the portState hereHow to verify
1Never pay a whole match inside one framedone: App::warm_step + Gfx::prefetch_step, 512 KiB per frame, VS step and start_fight both spreadUME_WATCHDOG=1 label load:sprites; F3 up/KB
2Keep the transition frame free in the paths with no VS screendone: start_fight yields a frame per chunkUME_WATCHDOG=1 worst frame at the transition
3Draw-call budget is a first-class numberdone: DRAW_CALL_BUDGET + batch testcargo test -p ume-render
4Palette rows as a scarce resourcedone for duplicates: PaletteRows shares rows by contentcargo test -p ume-render
5Sprites are never atlased on the web buildnot copied (our atlas is why we draw in a handful of calls). Follow-up: per-frame upload budget in the lazy path, because a 50 % cap only holds 8 native spritesatlas {} fill in the F3 overlay
6One shader for every sprite effectalready true (sprite.wgsl: flat/RGBA/indexed/palFX/tint in one pass)cargo test -p ume-render --test shader
7Yield while decodingload:character already runs one character per step; keep new decoders inside that budgetUME_WATCHDOG=1 worst frame during load

7b. Are we better than them?

On the things this investigation measured, yes — and on the things it did not measure, no. Being precise matters more than the headline.

Better:

Browser portUltimate MUGEN
Draw calls for the same kind of sceneone per sprite, 82–105 per framemerged by blend + scissor, budget 24, test-enforced
Palette changes1 KB upload per sprite that changes palettepalette rows deduplicated by content, shared across fighters
Simulation costwhole state machine inside one WASM thread4–20 µs per tick (0.03–0.12 % of a frame)
Warm-up / transitionuploads spread by luck (per-sprite textures)explicitly budgeted per frame, rematch copies nothing
Hitch observabilitynoneUME_WATCHDOG=1 with per-phase labels, F3 with uploads/KB and atlas fill
Content licensing/portabilitybundles third-party M.U.G.E.N charactersloads the player's own mugen/ folder, UMF, or the marketplace

Not better (yet):

Browser portUltimate MUGEN
Shipped in a browseryes, 78 fighters, 74 stages, netplay via GGPO rollbackwasm build exists but the roster ships as packs; no equivalent catalogue
Content volume78 fighters, 74 stages, per-match lazy packswhatever the player installs
Cross-device reachphones, tablets, desktopdesktop, Android build, browser build

So: a better engine on the measured axes, and a smaller product than theirs. The PR that follows implements every item of section 7 that was still open.

8. Reproducing

# artifacts, request order, sizes, frame list
NODE_PATH="$(npm root -g)" node docs/research/ikemen-web/capture.js capture

# what the engine module needs, exports, and which Go files it was built from
NODE_PATH="$(npm root -g)" node docs/research/ikemen-web/wasm-artifacts.js capture/runtime-engine.bin

# per-frame WebGL counters from inside frame.html
NODE_PATH="$(npm root -g)" node docs/research/ikemen-web/frame-stats.js

capture/ then holds the gzipped engine, the UI bundles, the catalog and the content packs used above. Playwright and Chromium are required; nothing is pulled from a third-party package registry beyond them.

Two measurement caveats: the numbers come from headless Chromium with SwiftShader (a software rasterizer), so treat the frame times as a floor, not a GPU result; and the 37 s select→fight time is dominated by the download of ~50 MB of content in that sandbox, not by the engine's own parsing.

Character tuning

Settings → Gameplay → Character tuning changes per-character parameters without touching the original files. Values are percentages (100% = unchanged), kept in char_tuning.toml next to the executable (web: browser storage).

ParameterApplies toMechanism
LifeMUGEN and UMEdata.life
Damage dealtMUGEN and UMEdata.attack (fighter attack multiplier)
Damage takenMUGEN and UMEtuning.defence read by the fighter defence multiplier
Walk, run, jumpMUGEN and UMEvelocity.* constants
GravityMUGEN and UMEmovement.yaccel
Power barMUGEN and UMEdata.power
Energy costMUGEN and UMEnegative PowerAdd values scaled by tuning.power_cost

Ranges are 25–300% (power bar and energy cost 0–300%). A character with all values at 100% is not written to the file. Reset a character with "Reset to default".

File format:

["native:kaito"]
life = 150
defence = 75

Code: src/char_tuning/ (model, store, tests), src/registry/tuning.rs (applied when a character is stored), src/app/char_tuning_screen.rs (screen).

Combo Trials

Training mode shows a ladder of seven combo goals above the arena. They work for every fighter, native or M.U.G.E.N, because they only read the combo counters the engine already keeps.

#Goal
13 hits
25 hits
38 hits
425% of the rival's life in one combo
56 or more hits finishing with a super (at least 1000 power spent)
610 or more hits without spending any meter
745% of the rival's life in one combo

A combo is judged when it ends. Goals are cleared in order, a flash says TRIAL CLEAR and progress is saved per fighter in trials.json (next to the config, or in browser storage on the web build). Finishing the ladder shows ALL TRIALS CLEARED.

How it works

  • src/trials.rs: pure Tracker, fed once per frame with the player's combo_count, combo_damage, power and the rival's life_max. It tracks power at the start and the lowest power during the combo to know whether meter was spent.
  • src/app/trials_hud.rs: reads the match after each tick (never changes it) and draws the panel; hidden while paused, in replays and outside training.
  • Tracker::demo replaces the live sample and exists only for the screenshot tour: UME_SHOTS_ONLY=trials.
  • Cost: one struct update per frame in training only; no allocation.

Format coverage matrix

🇧🇷 Versão em português: Matriz de cobertura de formatos.

Status by file format, checked against the decoders in crates/formats (reading of the code, not yet fuzzed against a large pack collection).

  • Implemented: decoded and used by the engine.
  • Partial: decoded, with a known limit listed in the notes.
  • Missing: not decoded; the file is skipped or reported as a warning.

SFF (sprites)

FeatureStatusNotes
SFF v1.01, PCX RLE spritesImplementedsff.rs, pcx.rs
SFF v1, PCX uncompressed rowsImplementedbytes_per_line honored
SFF v1, 8-bit PCX (256-colour trailer palette)Implemented
SFF v1, 1/4-bit or 24-bit PCXMissingHeader bit depth is ignored; such files decode as garbage. Rare in real packs
SFF v1, shared palette (same pal flag)ImplementedInherits the previous sprite's palette
SFF v1, linked sprites (length = 0)Implemented
SFF v2.00 / 2.01, raw 8-bitImplemented
SFF v2, raw 24-bit and 32-bitImplementedConverted to RGBA
SFF v2, RLE8 / RLE5 / LZ5Implementedsff/codecs.rs
SFF v2, PNG 8 / 24 / 32ImplementedBroken PNG gives an empty, transparent sprite
SFF v2, palettes (RGB and RGBA, linked palettes)Implemented
SFF v2, palette-per-sprite selectionImplemented

SND (sounds)

FeatureStatusNotes
ElecbyteSnd container, group/index keysImplementedFirst duplicate key wins, as in M.U.G.E.N
Subfile chain with corrupt-link guardImplemented
WAV PCM 8 / 16-bit (the normal case)ImplementedDecoded by symphonia in the audio layer
WAV ADPCM, 24-bit and other WAV codecsPartialDepends on what symphonia accepts; not verified per codec

AIR (animations)

FeatureStatusNotes
[Begin Action N], frames, timeImplementedDuplicate actions: first wins
Frame flips H / VImplemented
Blending A, A1, AS<n>D<n>, SImplemented
Clsn1 / Clsn2 and Clsn1Default / Clsn2DefaultImplemented
xscale, yscale, angle per frameImplemented
LoopstartImplemented
Interpolate (blend, offset, angle, scale)MissingLine accepted and ignored (air.rs); no interpolation between frames

ACT (palettes)

FeatureStatusNotes
768-byte RGB paletteImplementedIndex 0 transparent, order reversed as in MUGEN
Short files (fewer than 256 colours)ImplementedMissing entries stay black

DEF and CNS (characters and stages)

FeatureStatusNotes
Character .def ([Info], [Files], localcoord)Implemented
localcoord 320x240 and 640x480 and 1280x720ImplementedPositions and distances are converted per player
Stage .def ([Info], [StageInfo], [Camera], [Player], [Bound])Implemented
Stage [BG] layers: normal, anim, parallax, trans, mask, maskwindowImplemented
[BGCtrlDef] / [BGCtrl]: null, visible, enable, velset, veladd, posset, posadd, anim, sinx, sinyImplemented
Stage zoffset, autoturnImplementedUsed by the engine (stagevar.rs, matchs.rs)
Stage resetbgMissingNot read anywhere in the workspace

Screenpacks

FeatureStatusNotes
system.def [Info] localcoord (4:3 and 16:9 packs)ImplementedConverted to the HUD space
system.def [Files], [Music], [Title Info], [Select Info]Implemented
system.def [<name>BGdef] / [<name> N] backgroundsImplemented
select.def [Characters], [ExtraStages], [Options]Implemented
fight.def [Files], pN.* bars, element prefixesImplemented
Storyboards ([SceneDef], [Scene N], fades, layers, bgm)Implemented
.fnt v1 (embedded PCX, [Def], [Map])Implemented
.fnt v2 (bitmap and truetype)PartialParsed in fnt.rs; truetype rendering not verified
[Versus Screen], [Victory Screen], [Round Info]PartialRead through the generic element prefixes; not every key has a dedicated renderer; not verified on packs
WinMUGEN and MUGEN 1.0 / 1.1 quirksPartialUnknown keys are ignored, not rejected; no per-version switch

Known gaps (next PRs)

Small PRs, in order:

  1. AIR Interpolate (keyword currently ignored).
  2. Stage resetbg.
  3. SFF v1 low bit depth (1 and 4-bit PCX). Needs a header palette path in sff/; sff.rs is on the file-size baseline, so move the v1 code into its own module first.
  4. Verify WAV codecs beyond PCM 8/16-bit with real packs.
  5. Screenpack keys without a dedicated renderer (victory and versus screens).

This list is what the audit found; it is not yet proven complete against a large pack collection.

Kit Inputs

Português (BR)

Native fighters no longer share one input set. Each archetype swaps some quarter-circle motions for inputs that fit its style. The move list in the pause menu shows the real input of every move.

FighterMoveInputStyle
ValdricSovereignhold back 40 ticks, forward + yCharge (zone control)
VoltaTeslahold back 40 ticks, forward + yCharge (zoner)
BrunoLariat360° motion + yGrappler, command throw
DaichiAura Rush360° motion + xGrappler rush

Charge motions use the ~40$B, F, x syntax and work in the training mode, versus and online. Air variants of a move need a motion that can be done in the air, so charge inputs are kept for ground-only moves.

Air mobility

stats.airDashes sets how many air dashes a fighter has before landing (default 1). Rushdown and aerial fighters get more, grapplers fewer.

FighterAir dashes
Suzume, Jin, Akio, Lian, Kaito2
Bruno0
Everyone else1

Rekka follow-ups

A move can only start from another move by declaring rekka in the character JSON:

{"id":"gust_cross","name":"Gust Crossup","input":"b","kind":"special","anim":"mirage","rekka":{"after":["gustdash"],"window":[6,20]}}

after lists the source move ids, window is the range of state time (ticks inside the source move, hit pause does not count) where the follow-up input is accepted, and contact: true also requires the source to hit or be guarded. Without it the follow-up works on whiff too. The follow-up never starts from neutral, so it may reuse a plain button already used by a normal. Code: crates/native/src/rekka.rs.

In use: Lian (Flowing Silk Kicks, then y), Kaito (Storm Rush, then x) and Jin (Gust Dash, then b).

Distance and state requirements

requires also accepts distance (pixels between the bodies, min and/or max) and enemyState (air, ground, crouch, down, hit or attack). Two moves can share one input and the engine picks by situation, as long as the conditions do not overlap. A variant must come before the move it overrides in the moves list, because the first move that fits wins.

In use: Daichi (Landslide Point Blank within 55 pixels, otherwise Landslide Heel) and Bruno (Bull Catch against an airborne enemy, otherwise Bulldozer Rush).

MUGEN controller and trigger coverage

The coverage guard lives in crates/engine/tests/mugen_coverage_matrix.rs. It checks that every listed MUGEN 1.1 controller and trigger has an engine implementation, using the same dispatch probe that reports unsupported names when a character loads.

Status

AreaOfficial names checkedImplementedNotes
State controllers9090Guarded by a test.
Triggers (value form)9292Guarded by a test.
Triggers (comparison form, e.g. StateType = S, MoveType = A, AnimElem = 3, Command = "x", Name = "...")1010Parsed in the expression layer, covered by mugen11_triggers.rs. Not in the probe list.
Redirections (enemy, enemynear, partner, helper, parent, root)66Covered by enemy_selection.rs and helper_parity.rs.
Ikemen GO extensionsmanymostListed in CNS-Scripts.md.

Known partial items

  • DestroySelf: recursive also destroys the helpers it spawned, and removeexplods removes the explods it owns (semantics follow the Ikemen GO documentation).
  • Helper: inheritjuggle and size.xscale/sprpriority parameters are not read by the spawn path.
  • Explod: layerno = 1 behaves like ontop (per the Ikemen GO wiki). layerno = -1 and shadow are not read.
  • PlaySnd, Pause, Varset and Trans: parameter-level checks in the probe are inconclusive; these need a manual pass against the MUGEN docs before claiming full parameter coverage.
  • MakeDust: spacing is honoured (dust appears every spacing ticks, default 1).

How to check a new name

  1. Add it to the matching list in mugen_coverage_matrix.rs.
  2. Run cargo test -p ume-engine --test it mugen_coverage_matrix::.
  3. If it fails, implement the controller or trigger and document it in CNS-Scripts.md.

3D fighters

Status: shipped behind the Cargo feature model3d, on by default. Rollback: remove model3d from default in the root Cargo.toml; the game then draws the 2D donor sprites and hides the 3D category.

Principle

The simulation stays 2D. Hitboxes, physics, state machine and rollback never read the model. A 3D fighter is a UMF fighter (assets/chars3d/<id>.json, usually extends a native kit) whose drawing is replaced by a GLB model, so a 3D fighter fights a 2D one with the same rules. Light mode (lite::scale() < 1) falls back to the 2D sprites.

Pipeline

  1. Model::from_glb parses a .glb (own parser over serde_json, PNG textures through png): nodes, skins, meshes, materials, animations.
  2. StateMap (JSON) maps native anim names (anims) or MUGEN state ranges (states) to a clip, loop flag and speed.
  3. The pose is a pure function of anim_no/anim_elapsed (or stateno/statetime), skinned on the CPU, so it is rollback safe.
  4. Model::project uses an orthographic camera on the fight plane, flat Lambert shading and back-to-front triangles, drawn through ume_shell::quad::draw_mesh batched by texture. No GPU pipeline change.

In the game

  • src/model3d.rs is the facade (draw, draw_fit, is_3d, portrait); src/model3d/specs.rs lists the models.
  • Fight: one line in render.rs. Select, versus and results panels: draw_fit inside draw_char_fit. Tiles and loading use portrait.
  • The select screen has a 3D category.
  • The awakened form swaps to the second model (Ichigo: Hollow Total).
  • src/model3d/aura.rs draws the 3D-only effects: the AfterImage trail as additive tinted copies of the current frame (crimson Shunpo, gold Sonido in Hollow form) and a reiatsu barrier in front of the fighter in guard states (120-155) that flashes on guard hit (150-155).

Asset tools

tools/retarget (Python, stdlib only):

  • retarget.py <clips dir> <source.glb> <out.glb> <rig> bakes the clips listed in clips.json onto a rig from rigs.json.
  • autorig.py <mesh.glb> <clips dir> <out.glb> fits a skeleton and skin weights to an unrigged mesh.
  • keyposes.py <in.glb> <out.glb> <rig> bakes the hand-keyed clips of keyposes.json (Bankai stance, three-hit sword string, Getsuga wind-up, charge and release, Juujishou cross, Shunpo, Cero, guard, pointing win pose). A pose sets hips offset, torso/chest/head yaw-pitch-roll and limb directions as [azimuth, elevation] in character space (0 = toward the rival, +90 = his left); bladeR is solved by blade_solve.py into the wrist rotation that aims Zangetsu, and keys_<rig> overrides a clip for one rig (the Hollow fires Cero from the horns). Feet stay on the floor automatically. Re-run on both GLBs after editing; the script is idempotent.
  • Contact sheet of clips: cargo run --release -p ume-model3d --example clip_sheet -- <model.glb> <out.png> Clip1,Clip2 <frames>.
  • Portrait: cargo run -p ume-model3d --example portrait -- <model.glb> <states.json> <out.png>.
  • Voices: tools/voices/generate.py <id> adds the fighter to voices.bank and keeps the other banks.

3D stage: Airport

airport3d ("3D Airport — Sunset") is a live 3D backdrop behind the same model3d feature, so dropping the feature removes the stage with no other change.

  • assets/model3d/airport.glb (128 KB) is generated by python3 tools/airport/build.py <out.glb> (stdlib only): airliners, terminal with jet bridges, control tower, runway, hills, clouds and sun. No third party art; vertex colors per material, emissiveFactor marks unlit lights and the sun.
  • Clip ambient (40 s loop): one jet lands on the far runway, one taxis across the apron, a baggage tug crosses the stand.
  • Model::project_scene (crates/model3d/src/perspective.rs) is the perspective projector: near-plane clip, flat Lambert, per-vertex distance fog, gradient sky. It feeds the same z-buffer Raster used by the fighters.
  • src/model3d/airport.rs renders 480x270 (320x180 in lite mode) at 30 Hz into one texture that fills the stage rect; the 2D parallax scroll of illustrated stages still applies. Lite "backdrop off" shows a still of the same scene.
  • Measure: cargo run --release -p ume-model3d --example airport -- assets/model3d/airport.glb out.png 480 270 1.

Ichigo moves

Jumps: D, U or U, U super jump (also in the air), two air jumps, three air dashes. Specials: Getsuga Tenshou (~D, DF, F, x), charged Getsuga (~D, DB, B, y, hold y; 45 ticks for the max wave), Shunpo (~D, DB, B, b, Sonido trail in Hollow form), Shunpo Rush, Hollow Cero (~D, DB, B, a, hold a; 40 ticks for the big beam), Getsuga Juujishou, Kuro Getsuga, Hollow Rampage; Hollow Total adds Cero Oscuras. Charges use the holdRelease move field (see UMF character).

Credits

See assets/model3d/ATTRIBUTION.md.

Match Mutators

Mutators change the rules of one match without touching fighter data. The first mutator is gravity.

FieldDefaultRangeEffect
gravity1.00.25 to 4.0Scales the fall of airborne fighters and the drop of grounded fighters that are left in the air

Values outside the range, or not finite, are rejected by Mutators::with_gravity and return None, so a bad value never reaches the simulation.

Scope in this version: the scale applies to the fighter's own movement.yaccel. Hit gravity from HitDef (yaccel on the hit) is not scaled yet.

Both peers of a rollback match must use the same mutators. They are set on the Match before the first tick (m.mutators = ...). The default 1.0 is a no-op, so existing matches are unchanged.

Code: crates/engine/src/mutators.rs, applied in physics_step (crates/engine/src/matchs.rs). Tests: crates/engine/tests/mutators.rs.

Photo Mode

Photo mode freezes a fight and gives you a free camera, color filters and a clean frame to save as a PNG. It works in normal fights, training, survival and replays, so you can pause a replay on the perfect hit and shoot it.

Open and close

  1. Pause the fight (P, Esc, Enter or the pause button). In a replay, pause with Space.
  2. Press C. The pause menu disappears and the camera is yours.
  3. Esc, P or C leaves photo mode and returns to the pause menu.

Photo mode is not available in online matches, where the simulation can never stop.

Controls

KeyAction
W A S D / arrowsPan the camera (slower the closer you are)
+ / -, PageUp / PageDown, mouse wheelZoom between 0.6x and 2.5x
FCycle the filter: Natural, Cinema, Noir, Vivid, Retro
HShow or hide the HUD (hidden by default)
.Advance one frame to find the exact moment
RRecenter the camera
Enter / SpaceTake the photo (desktop only)

The overlay (state line, key help and rule-of-thirds guides) is not part of the saved image.

Where photos go

Desktop builds write photos/ultimate-mugen-<milliseconds>.png next to the executable at the window resolution. The web and mobile builds have the camera and filters but no save, because the browser or the OS screenshot already covers it.

How it works

  • Camera: crates/engine/src/photo_camera.rs is display-only, like the Replay Camera. It temporarily changes the camera position, the view size and the ground offset, draws, and restores every field, so the simulation, replay result and checksums never change. Panning is clamped to the stage bounds, vertical pan to 120 units and zoom to 0.6x to 2.5x.
  • Filters: each filter is a set of values for the post-processing Look (saturation, vignette, grain, grade, chroma, bloom). The look is swapped for the draw and restored right after, and the post-processing level is raised to at least 2 so filters also show with effects set to minimum.
  • HUD: Hud::hidden skips the HUD, cut-in bars and banners.
  • Cost: no extra draw pass. The only addition is the same post-processing the game already runs.

Verification

UME_SHOTS_ONLY=photo xvfb-run -a target/release/ultimate-mugen --shots <dir> --res 1280x720 --mute writes the pause screen, a clean frame, the HUD frame, the four filters and a wide shot. Tests: cargo test -p ume-engine --test it photo_camera:: and the photo unit tests in the root crate.

Replay Camera

The replay camera is a display-only director. It frames the fight during replay playback but never changes the simulation: the camera is saved before drawing and restored right after, so the replay result and checksums stay the same.

Inputs per frame: one Subject per fighter (x and whether a hit is active). Output: the focus x and the zoom for the draw.

  • Focus is the midpoint of the fighters, leaning 35% toward the attacker so hits are framed.
  • Pan eases 12% of the way toward the focus each frame, on top of the simulation camera.
  • Zoom tightens when fighters are close, up to 1.6x the match zoom, and stays at the match zoom when they are far apart.
  • With no valid fighters the previous framing is kept.

Pure and deterministic: no clock, no randomness.

Code: crates/engine/src/replay_camera.rs (framing applied in src/app/fight_screen.rs around the draw). Tests: crates/engine/tests/replay_camera.rs.

Rivalries

Português (BR)

A native fighter can declare rivals in its JSON, keyed by the opponent's fighter id. Each entry can change what the fighter says at the round start and give a small attack bonus in that matchup.

"rivals": {
  "akio": { "intro": "Akio. Your star shines, but the storm asks no permission.", "taunt": "..." },
  "garan": { "attack": 1.06 }
}
KeyMeaning
introFirst-speaker line at the round start, used instead of the generic intro.
tauntAnswer line, used instead of the generic taunt.
attackAttack multiplier against that opponent only, clamped to 0.9 to 1.15.

The bonus multiplies the fighter's attack after passives, so it never exceeds the global cap in Passives. Fighters without rivals behave as before.

Current pairs follow Lore: Kaito and Akio (friendly rivals), Suzume against Oboro, Sylene against Valdric and Kaname, Bruno and Marlow against Valdric, Shion against Garan.

Roster audit

ume-tools roster-audit loads every character and stage of an installed M.U.G.E.N collection, plays real CPU fights between them and writes a machine-readable report of everything that is broken: loading, visuals (missing or invisible sprites), sound (calls with no sample), mechanics (stuck states, fighters below the floor, endless attacks, watchdog rescues), the browser-specific import checks and the memory each fighter needs.

It is the reproducible replacement for "open the game and try a few characters by hand".

Running it

cargo build --release -p ume-devtools
target/release/ume-tools roster-audit                     # mugen/chars + mugen/stages -> docs/evidence/homologation
target/release/ume-tools roster-audit --only "goku"        # one family of characters (stages still all run)
target/release/ume-tools roster-audit --limit 20 --no-fights   # a quick static pass
target/release/ume-tools roster-audit --opponent "vegeta"  # force every fight against one opponent
target/release/ume-tools roster-audit --fail-over critical # exit 2 on any critical finding (CI gate)
FlagMeaning
--chars <dir> / --stages <dir>roots to scan (default mugen/chars, mugen/stages)
--out <dir>where report.json, report.md and issues.csv are written
--limit N / --stage-limit Naudit only the first N characters / stages
--fights Nfights per character (each against a different opponent and stage, default 2)
--stage-fights Nopponent rotation step when a stage is the subject
--only, --only-stage, --opponentsubstring filters for characters, stages and the forced opponent
--no-fights, --quietstatic pass only, and no per-item progress on stderr
--fail-over <severity>exit code 2 when a finding at that severity or worse exists

Runs are parallel (one load per character per worker, never the whole collection in memory) and every fight is wrapped in catch_unwind, so one broken pack cannot abort the audit.

What a fight checks

Each fight runs 30 seconds of CPU versus CPU on a real stage with the stage background running:

CodeSeverityMeaning
fight-paniccriticalthe match panicked while ticking (the message is kept in the report)
fight-non-finitecriticalposition, velocity, life or power became NaN/inf
fight-life-range, fight-power-rangemajorlife or power left its own bounds
fight-below-floor-p1/p2majorthe fighter stayed more than 12 px under the floor for more than 20 ticks
fight-stuck-p1/p2major420 ticks without control outside the lying states
fight-endless-attack-p1/p2major240 ticks stuck inside one attack state
fight-no-contactmajorthe pair never landed a hit in 30 seconds
fight-off-camera-p1/p2majorthe fighter sat outside the view for more than 3 ticks
fight-watchdog-rescuemajorthe character's own hit/getup script never returned control
fight-camera-nancriticalthe camera position or zoom became non-finite
fight-engine-warningminora warning the engine raised during the fight (missing anim, missing state)

What the static pass checks

CodeSeverityMeaning
char-load-fail, char-load-paniccriticalthe pack cannot be loaded at all
char-no-anims, char-no-states, char-no-commandscriticalthe .air/.cns/.cmd produced nothing
char-web-quarantinecriticalthe browser import refuses the pack (ume_formats::health), so it never shows up on the web
char-unsupported-controller, char-unknown-triggermajora controller or trigger the engine does not run
char-sprite-missingmajoran animation frame references a sprite the .sff does not have
char-sprite-transparentminorthe frame exists but every pixel is transparent
char-sound-missingmajorPlaySnd asks for a sample the .snd does not have
char-unknown-parameterminora controller parameter the engine never reads
char-wasm-atlas-overflow, char-wasm-atlas-pressuremajor/minorthe sprite pixels cannot fit the 2048 browser atlas (4.2 M pixels), so it has to evict and re-upload
char-load-slowminorloading took more than 2.5 s

Stage codes: stage-load-fail, stage-load-panic, stage-no-layers, stage-no-sprites, stage-layer-sprite-missing, stage-layer-anim-missing, stage-bounds-tight, stage-spawn-overlap, stage-music-outside-vfs, stage-no-shadow.

Reading the report

  • report.md ranks the characters and stages with the worst findings, and lists the slowest loading packs and the slowest simulation ticks.
  • report.json carries the summary, every finding and every fight (hits, damage, distinct states, tick cost).
  • summary.json is the compact form (counts by code plus the first examples), small enough to keep in the repository.
  • issues.csv is the same list flattened for a spreadsheet or a diff between two runs.

A finding is evidence to reproduce, not a verdict: --only <name> --opponent <name> replays the exact pair, and --no-fights isolates the static problems of one pack.

Web validation

The browser is the strictest target: it refuses packs that the desktop loader tolerates, and it has a much smaller texture budget. The atlas findings come from summing the pixels of every sprite in the pack (indexed and RGBA alike) and comparing with the 2048 atlas the wasm build uses (4.2 M pixels). Reproduce an actual import with:

node scripts/web-mugen-smoke.js web/dist mugen/incoming/my-char.zip

It imports the pack through the real file input, deep-links into a fight with the imported fighter and fails on a panic, a frozen clock, a stalled renderer or a heap above the limit. When the pack is already in the roster (the bundled elecbyte.zip), set MUGEN_SMOKE_CHAR to the fighter and the test validates content-key deduplication instead of expecting a new entry.

Signature Meter

Português (BR)

Each native fighter can declare a signature block under passives in its JSON. It is a per-fighter meter that changes how the fighter plays, on top of rage, stacks and enrage time.

"passives": {
  "signature": {
    "name": "Storm",
    "max": 100,
    "gainHit": 6,
    "gainSpecial": 12,
    "gainHurt": 3,
    "decayDelaySeconds": 2.5,
    "decayPerSecond": 14,
    "drainOnSuper": true,
    "riskPerSecond": 0,
    "tiers": [
      { "at": 34, "attack": 1.08, "speed": 1.04 },
      { "at": 100, "attack": 1.32, "speed": 1.12, "defence": 0.9 }
    ]
  }
}
KeyMeaning
maxMeter size, 1 to 200.
gainHit, gainSpecial, gainHurtGain when a move connects, a special or super starts, and when hit.
decayDelaySeconds, decayPerSecondIdle time before the meter drains, and the drain rate.
drainOnSuperSpends the meter when a super ends, so the super benefits from it.
riskPerSecondLife lost per second while the meter is full. Never kills.
tiersUp to four steps. The highest reached applies attack (0.5 to 2), defence (0.5 to 1.5) and speed (0.8 to 1.25).

Attack still goes through the global cap in Passives. The meter resets each round and shows as a strip under the life bar.

Current fighters: Kaito (Storm, builds and speeds him up) and Volta (Overload, strong at full meter but costs life).

More fighters: Suzume (Lotus, builds from specials and speeds her up), Marlow (Tide, gains from being hit as well and adds defence), Jin (Wind Chain, builds fast and decays fast for speed) and Sylene (Ice Layers, mostly gained by taking hits, adds defence).

Smoke test (debug mode)

One in-engine runner checks every main feature on every platform and leaves evidence: a screenshot per step and a report that says which feature broke and why.

Run it

TargetCommandOutput
Desktop (Linux, macOS, Windows)ultimate-mugen --smoke <dir> (Linux headless: xvfb-run -a ultimate-mugen --smoke <dir> --res 1280x720)<dir>/report.json, <dir>/report.md, <dir>/shots/*.png
Webnode scripts/smoke-web.js web/dist <dir>same files
Web mobileSMOKE_MOBILE=1 node scripts/smoke-web.js web/dist <dir> (Pixel 7 viewport, touch)same files

The process exits with 1 when any check fails. UME_SMOKE_ONLY=boot,fight_1v1 (desktop env var, also honoured by the web driver) runs only those features; the web page accepts ?smoke=1&smoke_only=boot. UME_SMOKE_FRAME_BUDGET_MS overrides the average frame budget (500 ms).

What it covers

Feature idChecks
bootfighters and stages registered, nothing quarantined, no import errors, title renders
screensmenu, settings, controls, MUGEN import, market, replays, player card and tuning render
selectfighter select (1P and 2P) and stage select render
fight_1v1fight loads, round intro ends, combat deals damage, KO ends the match, results screen follows
trainingtraining mode loads and the simulation advances
team_5v5ten fighters load and render
storystory intro and the first wave load and render

Every feature also checks the average frame time and every screenshot is checked for a blank or flat frame.

Reading a report

report.md lists one row per feature. A failed feature expands to the failing checks, each linking its screenshot. A panic is written to the report with the feature that was running, so the failing area is known even when the game dies.

Adding a check

Add a function in src/smoke/features/ (new file when the module nears 250 lines), list it in src/smoke/features.rs and use ctx.check(name, ok, detail) or ctx.shot(app, name, warm_frames). Drive the game through App state like the screenshot tours do; keep a feature under a few seconds.

Not covered yet

Netplay, auto update, zip import and the on-screen touch controls are not exercised by the runner.

Nightly sweeps

Full-roster simulations that take 10 to 30 s each (native_roster_lab, native_air_abilities, native_match_invariants, native_input_moves, native_normal_reach, native_no_stuck_states, native_attack_keyframes, pixel_states_test and the air-normals sweep) are marked #[ignore = "nightly: full-roster sweep"]. The PR gate skips them; .github/workflows/nightly.yml runs them every day (cargo test --workspace --release -- --ignored), and locally you can run them the same way.

Fight census

ume-tools fight-census --roster a,b,c --level 8 plays every ordered pair AI against AI and prints KO time, guard rate, stalls and win percentage per fighter. Use it to spot balance outliers before and after a stat change.

Standing Hits (knockdown rule)

Fighters used to fall after about one grounded hit in seven. The rule below lets light and medium hits push the defender back while they stay on their feet; strong hits, supers and long combos still knock down.

Rule

For a hit on a grounded, living defender whose HitDef asks for fall, the engine keeps the defender standing when all of these hold:

  • the hit takes less than the threshold of the defender's maximum life (default 16%);
  • the combo total including this hit is under 3x the threshold (so a long string still ends in a knockdown);
  • the attacker is covered by the scope (default: native fighters only);
  • the attack is not a hyper (H* attr), has no down.bounce, wall.bounce or trip ground.type, no p2stateno, and no forcenofall;
  • the hit is not the killing blow.

When it applies, the defender takes the stand-hit states (5000/5010, then slide 5001/5011), the authored vertical velocity is dropped and the horizontal push grows up to 75% (the closer the hit is to the threshold, the bigger the push). Hits on airborne defenders (juggles) are never touched, so air combos behave exactly as before.

Code: crates/engine/src/matchs/knockdown.rs (Match::standing_push), wired in Match::apply_hit.

Scope and compatibility

ScopeCoversWhy
Native (default)hits from UMF native fighterstheir fall is derived from level: heavy / launch, not authored per move
Everyonealso M.U.G.E.N fightersM.U.G.E.N HitDefs set fall on purpose (sweeps, launchers); opt-in only
Classicnobodyexact M.U.G.E.N behaviour

Scope follows the attacker because the HitDef is the attacker's data; the defender's own states (5000...) work for both kinds.

Setting

Settings > Gameplay > Knockdowns on hit (knockdown in ultimate-mugen.cfg): Classic, Native 8%, Native 16% (default), Native 24%, Everyone 16%. A higher threshold means fewer knockdowns. The value is stored in replays (knockdown_scope, knockdown_threshold; replays saved before it existed replay as Classic) and netplay uses the default preset.

Measuring

ume-tools knockdown-rate --roster akio,bruno,... --frames 5400 --rule native --threshold 16 runs AI vs AI over the roster and prints, per damage bucket, how many hits on a grounded defender ended in a knockdown. Results are in the PR that introduced the rule.

Story Mode Scripting (TOML)

Ultimate MUGEN's Story Mode is driven by a declarative TOML campaign script. You can customize every stage, wave, boss, dialogue beat, recovery rate, and credit count — or disable Story Mode completely.

Loading Order

  1. UME_STORY_SCRIPT=<path> environment variable (if set and readable).
  2. story/campaign.toml in the working directory or next to the game executable.
  3. Built-in default campaign (assets/story/default.toml).

If an external script fails to parse or is invalid, the engine falls back safely to the built-in default campaign.

Disabling Story Mode

You can disable Story Mode in either of two ways:

  • In-game: Settings -> Gameplay -> Story mode (TOML) -> OFF.
  • Via TOML: Create story/campaign.toml with:
[campaign]
id = "disabled"
enabled = false

Schema Reference

[campaign]
id = "my_campaign"
enabled = true
credits = 3
wave_recovery = 0.2
stage_recovery = 0.6
boss_life_factor = 1.5
boss_attack_factor = 1.1

[campaign.title]
en = "CYBER REBELLION"
pt = "REBELIÃO CIBER"
es = "REBELIÓN CIBER"

[[stages]]
arena = "neon"
accent = [0.4, 0.9, 1.0]
lane_far = -22.0
lane_near = 8.0
boss = "volta"
alt_boss = "akio"
waves = [
  ["npc_razor", "npc_spitfire"],
  ["npc_colossus"],
]

[stages.title]
en = "SECTOR ZERO"
pt = "SETOR ZERO"
es = "SECTOR CERO"

[stages.beats]
en = ["The grid is locked.", "Break the firewall."]
pt = ["A rede está trancada.", "Quebre o firewall."]
es = ["La red está bloqueada.", "Rompe el cortafuegos."]
  • title and beats accept either a plain string / string list (used in all languages) or a { en, pt, es } table.
  • alt_boss is used automatically when the player picks the stage's primary boss.

Story Studio (in-game editor)

Settings → Gameplay → Story Studio edits the active campaign without leaving the game: credits, life regained per wave and per stage, boss life and attack, and the four dialogue lines of each stage in the current language. Every change is validated, saved as TOML (story-campaign.toml in the app storage, localStorage on the web) and applied immediately. Restore original script deletes the saved copy.

Lookup order for the campaign: UME_STORY_SCRIPT → Story Studio save → story/campaign.toml.

Epilogue editor

Story Studio → Epilogues… edits the ending of any fighter (or the * fallback): title, the boss line and hero reply on the rooftop, and each narration page, in the current language. Saves go to story-epilogues.toml (one ["fighter"] table per edited epilogue, merged over the bundled epilogues.json); Restore original epilogue removes the override. A ● in the header marks an edited epilogue.

The epilogue editor's Scene row cycles the background (any stage with art) with Left/Right and saves immediately as scene = "..." in the TOML override.

Story Studio also edits each stage's name (per language) and boss (Left/Right cycles through the installed fighters); the epilogue's final boss follows the last stage's boss. The Foes per wave row (Left/Right) sets 1 to 4 enemies in every wave of the stage.

At the final boss introduction, choose Spare or Finish with Left/Right or by tapping the option. The choice selects the corresponding epilogue.

After that choice, tap the sides of the helper picker to browse allies and tap the selected name to call them into the final fight.

Unleashed Potential

Characters without their own transformation (imported M.U.G.E.N. and UME characters) get a generic one that needs no edits to their files. Press the transform button (T, the same as native awakenings) when the fighter is grounded, has control and the round is live.

StepName (pt-BR / en)CostDurationEffect
1stPotencial Liberado / Unleashed Potentialhalf a power bar12 sattack x1.2, damage taken x0.9
2ndModo Fúria / Fury Modefull power bar9 sattack x1.4, damage taken x0.75

Each step is available once per round. A character has at most three transformations in total, its own forms included, so a character with three own forms gets none of these. Fury can only follow Unleashed Potential. Characters with their own forms (forms or the legacy anim 196) keep their own transformation and never get this one.

Visuals: the fighter's aura and tint change (blue for Potential, red for Fury), a short ring and tag play on activation, and the HUD shows a timer strip under the power meter. Native forms also show a form strip on the HUD.

Code: crates/engine/src/potential.rs (state and multipliers), crates/engine/src/matchs/unleash.rs (activation), src/vfx/awaken.rs (effects), src/hud/passive_meter.rs (strips). Test: crates/engine/tests/potential.rs.

Virtual pad (web, phones and tablets)

The web build shows an on-screen gamepad on every touch device: a stick on the left, eight attack buttons (X Y Z SP / A B C SUPER) and a row with BACK, OK, AWAKE and II (pause) on the right. It is drawn with plain HTML and CSS shapes (no sprites) in web/vpad.js, above the canvas, and stays visible on every screen: title, menus, select, VS, fight, pause and story.

How it works

  • Each finger is tracked by its pointerId, so the stick and several buttons can be held at the same time. A finger can slide from one attack button to the next.
  • The browser hit-tests the buttons itself, so canvas size, device pixel ratio and render scale do not affect where a touch lands.
  • The engine reads the pad once per frame through ume_vpad_poll() (fighter bits) and ume_vpad_nav() (menu OK/BACK/START). The stick and A/B also drive menus, like a physical gamepad.
  • A tap shorter than one frame is still delivered for two frames.
  • Fingers are released on pointerup, pointercancel, lostpointercapture, page blur, tab hide and pagehide. A long press (contextmenu) does not release them.
  • The pad turns on when the device reports touch (maxTouchPoints, ontouchstart, pointer: coarse) or on the first touch. Nothing hides it afterwards. ?touch=1 forces it on a desktop.

Debugging on a real phone

Open the game with ?debug=1. A box in the top-left corner shows whether the pad is on, the device pixel ratio, the viewport, the fingers held, the bits sent to the engine and counts of pointerdown, pointerup and pointercancel.

Tests

node scripts/web-vpad-smoke.js web/dist drives the real web build in Chromium with real multi-touch (Input.dispatchTouchEvent). It checks that the pad is visible and unobstructed on every screen, navigates the menu, select and stage screens only by touch, walks, jumps, attacks while holding the stick, holds three fingers at once, releases one finger without losing the stick, pauses and resumes. VPAD_DEVICE picks the Playwright device (default Pixel 7 landscape; CI also runs Pixel 7 portrait and iPhone 13 landscape). VPAD_SHOTS=<dir> saves screenshots.

Architecture decision records

An ADR records one decision that changes a crate boundary, a dependency or a data format, so later contributors know why it was made and when it can be revisited.

How to add one

  1. Copy 0000-template.md to NNNN-short-title.md with the next free number.
  2. Fill the sections; keep it under one page.
  3. Open it in the same pull request as the change, with status Proposed; set Accepted when it merges.
  4. Never edit an accepted ADR to change its decision: add a new ADR that supersedes it and update the old status line.

Index

ADRDecisionStatus
0001Own wgpu renderer and winit shell, no game frameworkAccepted
0002One bytecode for CNS, ZSS and UMF; no LuaAccepted
0003Deterministic single-thread simulation for rollbackAccepted
0004Wiki rendered with mdBook under /wiki/ on GitHub PagesAccepted
0005Crate dependency boundaries enforced in CIAccepted
0006Content is data first, with a documented extension tableAccepted
0007UMF 2: JSON kept, compact frames, canonical layout, quality floorAccepted
0008UMF JSON Schema checked in CI; JSON + PNG kept after measuring alternativesAccepted / Proposed
0009LZ4 sprite container for native and M.U.G.E.N. spritesAccepted
0010Exact M.U.G.E.N. migration: original data in UMF, same load path, parity toolAccepted

ADR NNNN: Title

  • Status: Proposed
  • Date: YYYY-MM-DD

Context

What problem or constraint forces a decision.

Decision

What we do, in one or two sentences.

Consequences

What gets easier, what gets harder, and what would make us revisit it.

ADR 0001: Own wgpu renderer and winit shell, no game framework

  • Status: Accepted
  • Date: 2026-11-03

Context

M.U.G.E.N sprites are palette-indexed and need palette swaps, PalFx and large atlases at low cost. The engine must run on Windows, Linux, macOS, the browser (WebGL2), Android and iOS from one codebase.

Decision

Rendering is ume-render on wgpu with the palette in the fragment shader. The window, input and surface live in ume-shell on winit. Game code draws only through ume_shell::quad, never through wgpu directly. macroquad and Bevy are not used.

Consequences

One pipeline serves every target and indexed sprites upload one byte per pixel. We own the batching and atlas budget, so those need benchmarks when changed. The quad name is a leftover from an earlier API shape and may be renamed in a separate refactor.

ADR 0002: One bytecode for CNS, ZSS and UMF; no Lua

  • Status: Accepted
  • Date: 2026-11-03

Context

Characters arrive as M.U.G.E.N CNS, Ikemen ZSS or the native UMF JSON. Running three interpreters would triple the semantics to keep deterministic.

Decision

All three formats compile to one bytecode executed by the engine VM. Lua scripts are not executed; the wiki lists what Lua packs do and the data-driven alternatives.

Consequences

Fighters in any format fight each other with the same rules, and the tick stays allocation-free. Packs that depend on Lua logic need their behavior expressed in data. New controllers and triggers are added once in crates/engine.

ADR 0003: Deterministic single-thread simulation for rollback

  • Status: Accepted
  • Date: 2026-11-03

Context

Rollback netplay (ggrs) and replays need the same inputs to give the same fight on every machine.

Decision

Match::tick runs single-threaded at a fixed 60 Hz with no clock, no thread and no randomness outside Match::random, and allocates nothing per tick. Match stays Clone with a stable checksum, and new state fields join the checksum.

Consequences

Netplay, replays and tests share one simulation. Performance work targets loading, rendering and data layout instead of parallelizing the tick. cargo test -p ume-engine --release --test it tick_alloc:: guards the allocation rule.

ADR 0004: Wiki rendered with mdBook under /wiki/ on GitHub Pages

  • Status: Accepted
  • Date: 2026-11-15

Context

The wiki is Markdown in docs/wiki (English) and docs/wiki/pt-BR, readable only through the repository. Outside contributors need a browsable, searchable site, and the web game already owns the root of the Pages site.

Decision

scripts/wiki-book.mjs stages docs/wiki and the contributing guides into one mdBook source with a generated SUMMARY.md. scripts/build-wiki.sh builds it, and pages.yml publishes it to /wiki/ next to the game. The Markdown files stay the single source; no page is duplicated.

Consequences

Sections are declared in scripts/wiki-book.mjs; a page not listed there still appears under Reference, so nothing is lost. Links that point outside docs/ (for example to scripts/) are plain repository paths and do not resolve on the site. mdBook is a single Rust binary with no Node toolchain.

ADR 0005: Crate dependency boundaries enforced in CI

  • Status: Accepted
  • Date: 2026-11-15

Context

The crate table in AGENTS.md described which crate may depend on which, but nothing stopped a drift such as the simulation importing the GPU.

Decision

scripts/crate-boundaries.mjs lists forbidden runtime and build dependencies per crate and runs in the release-scripts CI job. Dev-dependencies are exempt, because tests and examples may combine crates.

Consequences

A boundary change needs an edit to the script and a new ADR, which makes it a visible decision. The check reads Cargo.toml only, so it does not catch an indirect path through another allowed crate.

ADR 0006: Content is data first, with a documented extension table

  • Status: Accepted
  • Date: 2026-11-15

Context

Fighters, stages, routes, story objects, looks and props already ship as data files, but the list of them lived only in the heads of contributors. Outside contributors need to know which changes need no Rust and where each file is documented.

Decision

New content kinds are data files under assets/, embedded by build.rs when they ship with the game, and each one gets a row in Extension points with its English and pt-BR documentation and a test that loads the shipped files. Code changes in crates/engine or crates/formats are reserved for behavior or formats the data cannot express.

A single content-pack manifest that lets the marketplace declare several kinds of content in one repository is a possible next step; it needs its own ADR before any loader change, because it touches the registry and the marketplace.

Consequences

Contributors can add a fighter, stage or route without reading the engine. Every new data kind carries a documentation and test cost up front. The manifest idea stays out of the code until a concrete marketplace need justifies it.

ADR 0007: UMF 2 is the definitive native fighter format

  • Status: Accepted
  • Date: 2026-11-21

Context

Native fighters were one minified JSON line of about 50 KB each (21 fighters, 1.04 MB). Reviews could not read the diffs, frame lists repeated {"pose": ..., "ticks": ...} hundreds of times, and nothing stated what a fighter must contain. Formats compared: TOML, RON, YAML, KDL, JSON5, M.U.G.E.N CNS, ZSS and binary. None beats JSON here: serde and wasm already read it, every editor and CI tool understands it, and the compiler already turns it into the shared bytecode (ADR 0002).

Decision

Keep JSON and define UMF 2:

  1. "format": "umf/2". umf/1 files still load, so marketplace and imported fighters keep working.
  2. A frame with only a pose name and a tick count is written "pose*ticks". Frames with hit, effect, sprite, hurt or offset stay objects. Both forms can mix in one list.
  3. One canonical layout, produced by node scripts/umf2-migrate.mjs: stable key order, values on one line up to 200 columns, objects and arrays expanded above that. CI fails when a shipped fighter is not canonical.
  4. A quality floor tested in native_quality_bar: every fighter keeps at least 17 normals, 9 specials, 3 supers and 3 projectile moves, no zero-tick frame and no hit without damage.
  5. The migration is lossless: the deserialized fighter of all 21 shipped files is identical before and after, apart from the format field.

Consequences

Fighters stay one file at assets/chars/<id>.json: the roster tests, examples and tools address that path and splitting it would touch about 100 files for little gain. Per-fighter folders, shared move kits beyond kits/core.json and a packed release blob remain open and need their own ADR if they are wanted. The migrator is idempotent, so future edits only need to run it before committing.

ADR 0008: UMF schema in CI, and JSON + PNG storage reviewed

  • Status: Accepted for the schema and for keeping JSON; Proposed for the cooked texture pack (superseded by ADR 0009: LZ4 instead of QOI)
  • Date: 2026-11-22

Context

The UMF 2 format of ADR 0007 was documented only in prose. The loader ignores unknown keys (serde), so a typo such as hitz or lyfe passed every test and did nothing. The question was also open whether JSON + PNG is the best storage for performance and maintenance.

Decision

  1. docs/schema/umf-2.schema.json (JSON Schema 2020-12) describes fighters and umf-kit/1 kits and rejects unknown keys. scripts/umf-schema.mjs validates with a small in-repo validator (no dependency) and scripts/umf-schema.test.mjs runs it on every shipped fighter, kit and example in the release-scripts CI job. Packs outside the repo run node scripts/umf-schema.mjs <file>.
  2. Keep JSON for fighter definitions. Keep PNG as the authoring and interchange texture format.
  3. Proposed, not implemented: a build-time cooked pack that trims transparent borders and stores the frames as QOI, decoded by a small in-repo decoder. See the numbers below.

Measurements

Rust release builds, 21 shipped fighters and the 137 sprites (400x400 RGBA) of kaito. Native = this container; wasm = the same code built for wasm32-wasip1 and run in Node (V8), which is not a browser. Medians of 5 to 15 runs; the container is noisy (about 20% between runs), and every conclusion held in all three full runs. The atlas could not be run under Node WASI (it crashed on the 56 MB image).

Definitions, all 21 fighters:

FormatBytesgzipParse native / wasm (ms)
JSON as shipped1,158,382191,01112.9 / 12.5
JSON minified907,786167,8119.9 / 10.7
MessagePack656,470175,7558.3 / 11.1
CBOR664,551173,17114.9 / 18.9

Typed NativeChar parse, all fighters: JSON 10.7 ms, MessagePack 12.4 ms, CBOR 23.2 ms. bincode and postcard write a fighter but cannot read it back (Value, untagged enums and deserialize_with need a self-describing format).

Textures, 137 sprites:

FormatMBgzip MBDecode native / wasm (ms)
PNG, own decoder7.895.58102 / 134
PNG, png crate7.895.5870 / 122
WebP lossless5.444.9491 / 191
QOI4.843.0028 / 32
LZ4 raw RGBA7.275.1635 / 38
PNG, trimmed4.534.5244 / 89
QOI, trimmed4.632.9821 / 27
One atlas, PNG / QOI5.35 / 5.415.25 / 3.3996 / 56 (native)

Trimming transparent borders keeps 48% of the pixels: decoded RAM per fighter goes from 87.7 MB to 42.1 MB.

Consequences

  • Definitions parse in about 0.6 ms per fighter, so format is not a cost. MessagePack saves 8% after gzip and is not faster typed; it would cost diffs, hand editing and the schema. JSON stays.
  • The real cost is texture decode and memory. Cooked trimmed QOI would cut decode about 80% on both targets, the gzip download by 47% and RAM by 52%. PNG stays the source of truth, so artists keep their tools and the sprite art itself is never rewritten. A single atlas is worse than separate files: one big image decodes slower and blocks lazy loading.
  • The cooked pack needs a change to the sprite pipeline (pack_build.rs, decode_cache.rs) and the wasm build, so it waits for approval and its own pull request with a browser smoke test.
  • Swapping the own PNG decoder for the png crate would gain about 30% native and 9% wasm but adds a dependency; not taken.
  • Limits: one fighter's sprites, Node instead of a browser, no GPU upload time.

ADR 0009: LZ4 sprite container for fighters and M.U.G.E.N. characters

  • Status: Accepted
  • Date: 2026-11-22
  • Supersedes: the "cooked texture pack" proposal of ADR 0008 (QOI for every sprite)

Context

Decode time and resident size of sprites dominate loading, most of all on wasm32, which has one thread. M.U.G.E.N. characters are 8-bit indexed (palette applied on the GPU); native fighters are RGBA and the web packs already quantise them to a palette.

Measurements

Release build, 62 real characters (54,381 indexed sprites, 2.33 GB decoded), each sprite compressed and decoded on its own, one thread:

CodecPack MBµs per sprite
Original .sff (RLE8/LZ5)85461
LZ461828
zstd level 3 (C)41248
zstd level 19 (C)34155
deflate 637873
PNG8, png crate / own decoder50292 / 130
QOI RGBA96884
ruzstd (pure Rust)412140

With 1, 2, 4 and 8 threads on 4 cores the order does not change; LZ4 scales 3.6x from 1 to 4 threads. In wasm32 (Node), LZ4 decodes 672 sprites in 66 ms, the fastest codec that builds without a C toolchain. QOI RGBA stores four bytes per pixel and loses the GPU palette. On 2,610 native RGBA sprites, QOI is 42% smaller than LZ4 after gzip and decodes about 10% slower.

Decision

  1. LZ4 (lz4_flex 0.14, safe mode) is the one compression for stored sprite pixels, for M.U.G.E.N. and native fighters alike.
  2. Two containers share it: UML1 per sprite and UMSF per .sff (see the wiki page Sprite Container). Readers detect the magic, so PNG and classic .sff still load.
  3. Web fighter packs now carry UML1 indexed sprites instead of PNG8.
  4. PNG stays the authoring and interchange format; native art is never rewritten.

Consequences

  • Chars cook to about 27% less data and decode in about 62% of the time; loading stays bit-exact (cook-sff verifies every sprite).
  • zstd would save a third more bytes at 1.7x the decode time and needs a C toolchain for wasm32; it is not adopted.
  • QOI would shrink native RGBA sprites further; a later per-sprite codec byte can add it without breaking UML1 readers.
  • New dependency: lz4_flex (MIT, pure Rust, no unsafe in the enabled features).
  • Not in this change: lazy decode on first draw, and cooking desktop loose PNGs or imported zips at install time.

ADR 0010: Exact M.U.G.E.N. migration to UMF

  • Status: Accepted
  • Date: 2026-11-22

Context

The Python converter (tools/mugen2umf, PR #964) rewrote M.U.G.E.N. states as native UMF moves. Each port lost behavior the heuristics did not model: Black Widow hyper cinematics, her throw and Widow's Strike jump, Goku SSJ4 palettes 2 to 5, throws and the charge ramp. Every fix was another heuristic.

Decision

  • A migrated fighter carries the original data inside UMF: a mugen block with the CNS, ST, common states and CMD text verbatim, AIR as JSON keyed by action, [Info], and an exact sprite pack (art.type: "mugen": one indexed PNG per SFF sprite, SFF palettes, pal1..12.act, sounds as WAV, meta.json in SFF order).
  • The engine loader is split into read_mugen_sources and assemble_mugen_char(MugenSources); ume_native::exact rebuilds MugenSources from the bundle, so a migrated fighter runs through the same code path as the original.
  • UMF-only data (profile, quotes, rivals, move names, extra routes and scripts) is layered on top; native moves on top of exact fighters follow in a separate change.
  • The converter, parity check and MCP server are one Rust crate (tools/mugen2umf). Parity is a structural CharDef diff plus every Statedef -1 route played from its real input for 150 ticks on both sides, compared tick by tick.

Consequences

  • Black Widow, Goku SSJ4 (two versions), Gogeta SSJ4, Super Majin Vegeta, Goku SSJ GT, Aizen (SFF v2) and Goku UI are identical on every data section and every route.
  • Engine gaps now affect the original and the migrated fighter the same way and are fixed in the engine, not in the converter.
  • Bundles are larger than hand-tuned UMF moves (one PNG per sprite); the LZ4 container of ADR 0009 can pack them later.

Wiki do Ultimate MUGEN

English · Português (BR)

Guia para jogadores e criadores que querem customizar a engine: instalar, configurar, criar lutadores, cenários e scripts.

PáginaPara quemO que ensina
Instalação e execuçãoJogadoresBaixar, compilar, rodar no PC, navegador e celular
Atualização automáticaJogadoresAuto-atualização pelas releases do GitHub, como desligar e flags
Configuração e controlesJogadoresArquivo .cfg, flags de linha de comando, variáveis de ambiente, controles
Adicionar conteúdo M.U.G.E.NJogadoresInstalar personagens e cenários .def/.zip e validar
Mercado GitHubJogadoresInstalar personagens, cenários e músicas de qualquer repositório do GitHub
Lutadores 3D (protótipo)ContribuidoresLutador glTF com esqueleto desenhado no plano 2D da luta
Seleção de personagemJogadoresTela de seleção, retratos, equipes e atalhos
Modos de jogoJogadoresArcade, equipes (Sequência, Paralelo, Tag) e suas regras
Easter Eggs durante as lutasJogadoresMarcos secretos de combate, cameos de cenário e interações de lore
Objetos de cenárioJogadores, criadoresCaixotes, barris e carros quebráveis, comida, fases bônus e seus dados em TOML
Universo e LoreJogadores e CriadoresCosmologia, facções, sistemas de energia e a Grande Convergência
Dossiê dos PersonagensJogadores e CriadoresFichas biográficas, retratos, golpes, rivalidades e cenários associados
ReplaysJogadoresLutas gravadas, navegador de replays, velocidade de reprodução
Decisões de compatibilidadeCriadoresRecursos rejeitados por decisão e o motivo
Scripts LuaCriadoresPara que serve Lua em pacotes M.U.G.E.N e as alternativas sem Lua
Arquivos de rotaCriadoresRotas de arcade e regras de desbloqueio em TOML
Criar um personagem (guia rápido)CriadoresUm lutador funcionando em dez linhas, herdado de outro
Criar personagem UMFCriadoresReferência completa: todos os campos de um lutador em um único JSON
PassivosCriadoresFúria, acúmulos de habilidade e regeneração por dados
Potencial LiberadoJogadoresTransformação genérica para personagens importados: Potencial, depois Fúria
Câmera de ReplayJogadoresEnquadramento cinematográfico do replay: aproxima em lutas próximas e acompanha o ataque
Modo FotoJogadoresCâmera livre, filtros e captura PNG limpa em luta pausada ou replay
Desafios de ComboJogadoresSete metas de combo no treino, salvas por lutador
MutadoresCriadoresMudanças de regra por partida; gravidade é o primeiro mutador
Golpes em péJogadores, CriadoresGolpes leves empurram sem derrubar; limiar por % de vida
Rush CancelJogadores e CriadoresGaste energia para cancelar um golpe conectado, Overdrive e a apresentação
Níveis de ComboJogadores e CriadoresSelos de combo, marca de energia, air dashes e rebotes
Kits inspirados em BleachJogadoresIdeias de Byakuya, Yoruichi e Zaraki em tres nativos
Quadros de efeitoCriadoresEfeitos de projétil e faíscas
Scripts CNSCriadoresEstados, controllers, triggers e comandos suportados
Flags do AssertSpecialCriadoresAs 77 flags do Ikemen e o efeito de cada uma
Vida vermelha, tontura e defesaCriadoresRedLife, DizzyPoints, GuardPoints, estados 5300/5400 e padrões do HitDef
ScreenpacksCriadoresSuporte a screenpacks de menu e HUD
Matriz de formatosCriadoresStatus de SFF, SND, AIR, ACT, DEF e screenpacks
Estudo de screenpacksCriadoresDiferenciais de screenpacks e o que o motor adotou
Dissecação de quatro lutadoresDesenvolvedoresAizen, Gogeta, Goku SSJ e SSJ4: arquivos, comandos, normais e padrões de golpe
Recriar um lutador M.U.G.E.NCriadoresReceita e mapeamento para UMF, com a reconstrução do Captain Marlow Reyes
Checklist de conversão MUGENCriadoresO que o conversor MUGEN para UMF migra, o que é parcial e o que falta
Biblioteca de habilidadesCriadoresBlocos reutilizáveis (blink, vfx, quake, projectile.repeat, kit abilities) e o mapa de lacunas do MUGEN
Importar sprite atlasCriadoresTransformar uma folha de sprites em lutador
Ferramentas de desenvolvimentoContribuidoresFerramentas Rust de build e auditoria (ume-tools)
Auditoria de elencoDesenvolvedoresLutar com cada personagem e cenário e ler um relatório por severidade
Ferramentas de spritesCriadoresFatiar folhas, variantes de paleta, caixas de colisão automáticas
Gerador de golpesCriadoresTOML para AIR, CNS, CMD e Statedef -1
Criar um cenário (guia rápido)CriadoresCenário a partir de um .def, dados do modo história e o que ainda precisa de código
Criar cenáriosCriadoresReferência completa: cenário M.U.G.E.N .def e cenário nativo
ArquiteturaDesenvolvedoresMapa de crates, direção das dependências, onde o código novo entra
ContribuindoContribuidoresCompilar, verificações, regras e fluxo de pull request
Pontos de extensãoCriadores, ContribuidoresQual arquivo define cada tipo de conteúdo e se precisa de Rust
Decisões de arquiteturaContribuidoresADRs: por que o engine é feito assim
Customizar a engineDesenvolvedoresArquitetura, novo controller, novo trigger, testes
Smoke da partida webDesenvolvedoresTeste de CI que joga partidas completas no navegador e pega travamentos
Layout de arquivosDesenvolvedoresA regra de 250 linhas, uma responsabilidade por arquivo, dividir arquivos, PRs paralelos
DesempenhoDesenvolvedoresCarga paralela, ritmo de quadros, benchmarks
Engenharia reversa do port para navegadorDesenvolvedoresComo uma build de M.U.G.E.N com 78 lutadores roda no navegador, e o que copiamos dela
Pesquisa de jogos de lutaDesenvolvedoresPesquisa de outros lutadores e lista priorizada de melhorias
Auditoria de animações nativasDesenvolvedoresCobertura de poses do elenco nativo
Smoke test (modo debug)DesenvolvedoresUm comando valida as features principais no desktop e na web, com prints e relatório
Pipeline de QA webDesenvolvedoresShards paralelos no CI jogam o build wasm no Chromium, com prints e logs em toda falha
Estresse e resiliênciaDesenvolvedoresFuzzing, limites de spawners e números do caminho quente
Solução de problemasTodosErros comuns e ferramentas de diagnóstico

Formatos aceitos

FormatoUsoArquivos
UMFLutador nativo, declarativoassets/chars/<id>.json
M.U.G.E.NLutadores e cenários clássicos.def, .sff v1/v2, .air, .cmd, .cns, .snd, .act

Lutadores UMF e M.U.G.E.N rodam na mesma máquina de estados e podem se enfrentar.

Roadmap

O plano de compatibilidade e as decisões de arquitetura estão em docs/ROADMAP.pt-BR.md. Itens marcados como planejado nesta wiki ainda não existem na versão atual.

Status de compatibilidade

O progresso rumo à paridade com o Ikemen GO v1.0.0 é acompanhado na issue #135, com uma issue para cada controlador, trigger ou recurso faltante. As listas de controladores, triggers e redirecionamentos suportados em Scripts CNS são conferidas com a engine por cargo test -p ume-engine --test it wiki_sync::: um nome listado que a engine não trata, um nome implementado que não está listado ou uma diferença entre as páginas em inglês e português quebra o teste. Cada carregamento de personagem também aponta os controladores, triggers e parâmetros usados que a engine ignora (veja "Diagnóstico no carregamento" na mesma página).

Agradecimentos

Obrigado à equipe do Ikemen GO e à Elecbyte, criadora do M.U.G.E.N, pela inspiração.

Ajustes de personagem

Configurações → Jogabilidade → Ajustes de personagens muda parâmetros de cada personagem sem alterar os arquivos originais. Os valores são porcentagens (100% = sem mudança), salvos em char_tuning.toml ao lado do executável (web: armazenamento do navegador).

ParâmetroVale paraMecanismo
VidaMUGEN e UMEdata.life
Dano causadoMUGEN e UMEdata.attack (multiplicador de ataque)
Dano recebidoMUGEN e UMEtuning.defence lido pelo multiplicador de defesa
Andar, correr, pularMUGEN e UMEconstantes velocity.*
GravidadeMUGEN e UMEmovement.yaccel
Barra de poderMUGEN e UMEdata.power
Custo de energiaMUGEN e UMEvalores negativos de PowerAdd multiplicados por tuning.power_cost

Faixas: 25% a 300% (barra de poder e custo de energia: 0% a 300%). Personagem com todos os valores em 100% não é gravado no arquivo. Use "Restaurar padrão" para voltar ao original.

Formato:

["native:kaito"]
life = 150
defence = 75

Código: src/char_tuning/ (modelo, armazenamento, testes), src/registry/tuning.rs (aplicado ao armazenar o personagem), src/app/char_tuning_screen.rs (tela).

Arquitetura

English · Português (BR)

Como o código é dividido, em que direção as dependências podem apontar e onde estender. As decisões por trás das regras ficam nos ADRs.

Mapa de crates

CrateResponsabilidadePode depender de
ume-formatsINI, SFF, AIR, SND, ACT, PCX, PNG, FNT, cenários, VFS (pastas e zips)nada do workspace; compila para wasm32
ume-engineVM do lutador, expressões, triggers, controllers, HitDef, regras de partida, compilador UMFume-formats
ume-netplayRollback com ggrs, checksum de estado, formato de replayume-engine
ume-renderPipelines de sprites e pós-processamento em wgpusomente wgpu
ume-shellAdaptador, superfície, janela, entrada, API quad, saída de áudio, ritmo de quadrosume-render
ume-marketMercado no GitHub: listagem, pacotes, limites de segurançaume-formats
ume-charforge, ume-devtoolsFerramentas de criação e auditoriaformats, engine
ultimate-mugen (src/)Telas, HUD, cenários, VFX, mixagem de áudio, opções, registrotudo acima, GPU só por ume_shell::quad

O scripts/crate-boundaries.mjs falha o CI quando uma dependência de runtime quebra a tabela (por exemplo ume-render dependendo de winit, ou ume-engine dependendo de wgpu).

Fluxo em execução

  1. ume-formats lê arquivos de personagem e cenário, ou o JSON nativo UMF, para dados simples.
  2. ume-engine compila CNS, ZSS e UMF para um único bytecode e executa Match::tick a 60 Hz fixos. Nunca lê relógio, threads ou GPU.
  3. ume-netplay clona e calcula checksum de Match para rollback e replays.
  4. src/ lê o estado de Match a cada quadro e desenha por ume_shell::quad, que agrupa em lotes no ume-render.

O determinismo é o motivo de a simulação ser single-thread e sem alocação por tick. Carga e decodificação podem usar threads via ume_formats::par::map.

Onde o código vai

Você quer adicionarColoque em
Um controller ou triggercrates/engine (arquivo novo, uma linha de ligação em controllers.rs ou triggers.rs) e documente em Scripts-CNS.md
Um formato de arquivo ou parsercrates/formats
Um lutador, cenário ou rotaSó dados: JSON UMF, .def, TOML; sem Rust
Uma tela ou elemento de HUDsrc/app/<tela>.rs ou a pasta da funcionalidade em src/
Um efeito de GPUcrates/render, exposto por ume_shell::quad
Uma regra do mercadocrates/market

Pontos de extensão sem código no engine

Manter sustentável

  • Uma responsabilidade por arquivo, limite de 250 linhas, arquivos antigos não crescem (Layout de arquivos).
  • Refatoração que move código é um pull request próprio e não muda comportamento.
  • Crie um ADR quando uma decisão mudar uma fronteira, uma dependência ou um formato de dados.

Arquivos de rota e desbloqueio (TOML)

Substitui em dados os caminhos de arcade em Lua e as condições unlock do Ikemen GO. Veja Scripts Lua para o raciocínio. Não há runtime de script: a rota é um arquivo TOML e as condições usam uma pequena linguagem de expressões verificada ao carregar.

Onde ficam os arquivos

ArquivoUsoOrigem
route_<id do lutador>.tomlRota de arcade daquele lutadorPasta de dados (ao lado do executável, armazenamento do app no Android, armazenamento do navegador na web)
unlocks.tomlRegras de desbloqueio e ocultação de lutadores e cenáriosMesmo lugar; sem ele vale o assets/routes/unlocks.toml embutido

Um arquivo com erro é reportado no console com o número do passo ou da regra e depois ignorado, então o jogo mantém o comportamento embutido.

Rota de arcade

[route]
id = "kfm-arcade"

[[step]]
storyboard = "chars/kfm/intro.def"

[[step]]
repeat = 6
fight = { order = 1, stage = "dojo" }

[[step]]
when = "consecutive_wins == 6"
fight = { p2 = ["SuaveDude"] }
else = { fight = { order = 3, winscreen = true } }

[[step]]
action = "clear"

Cada [[step]] tem exatamente um entre fight, storyboard ou action.

ChaveSignificado
fightorder (1 pega o próximo oponente comum, 2 ou mais pega o chefe), p2 (ids ou nomes, vale o primeiro que existir), stage, winscreen
stageID ou nome do cenário; random escolhe um cenário aleatório. A primeira luta pula a seleção de cenário quando a rota define um cenário. Um cenário desconhecido mantém a escolha automática normal.
storyboardExibe um storyboard .def de um pacote MUGEN importado, incluindo camadas de imagem .sff e animações .air; os arquivos referenciados são resolvidos em relação ao storyboard
actionclear encerra a rota
repeatDe 1 a 99 vezes; when é verificado a cada repetição
whenCondição; o passo só roda se for verdadeira
elseMesmas chaves do corpo de um passo (fight, storyboard, action); roda quando when é falso

Storyboards entre lutas são exibidos antes do próximo combate. Um storyboard antes da primeira luta substitui a abertura padrão do arcade; um storyboard final aparece antes do epílogo ou dos resultados finais. Pressione confirmar ou toque em qualquer lugar para avançar a cena, ou Voltar/Iniciar ou Pular para pular o storyboard atual. Se o storyboard ou o arquivo de sprites necessário não puder ser carregado, a engine informa o caminho e continua a rota.

A rota é planejada quando o arcade começa, supondo que o jogador vence todas as lutas, que é o único caminho possível de uma partida. Perder uma luta encerra a partida como sempre.

Condições

Números, texto entre aspas, true, false, variáveis, == != < <= > >=, &&, ||, ! e parênteses.

VariávelValor
stats.arcade.clearArcades concluídos salvos
consecutive_wins, match_noLutas já planejadas nesta partida
modearcade, story, survival, cpu, versus, training, watch ou team
netplay1 em partida online, senão 0
team_size1 ou 2 (só em rotas)
playerId do lutador escolhido pelo jogador

Variável desconhecida é erro de carregamento e lista as conhecidas.

Desbloqueios

[[unlock]]
target = "char:oboro"
when = "stats.arcade.clear >= 1"

[[hide]]
target = "char:oboro"
when = "mode == \"bossrush\""

O alvo é char:<id> ou stage:<id>. Um alvo com regras unlock fica disponível só enquanto todas forem verdadeiras; um alvo com regras hide fica oculto enquanto qualquer uma for. Alvos sem regra continuam abertos. As regras de lutador valem na seleção; as de cenário são lidas mas ainda não aplicadas.

Fora desta versão

Lógica arbitrária, resultados por round (perfect_rounds), rótulos e goto, e arcos do modo história.

Atualização automática

A versão desktop se atualiza a partir da última Release do GitHub. A tag da release é a fonte da verdade: a CI grava UME_RELEASE_VERSION no binário, publica os artefatos e a build instalada se substitui pelo executável correspondente à sua plataforma.

Artefatos da release

Cada release traz, por plataforma (windows-x86_64, linux-x86_64, macos-aarch64):

ArtefatoFunção
ultimate-mugen-v<versão>-<plataforma>.zip / .tar.gzPacote para instalação manual (binário + README)
ultimate-mugen-v<versão>-<plataforma>[.exe]Executável puro baixado pelo atualizador
latest.jsonManifesto de atualização lido pela build em execução
SHA256SUMS.txtHashes legíveis de todos os artefatos

O latest.json mantém o pacote em platforms.<plataforma> e adiciona o binário puro:

{
  "version": "0.4.0",
  "notes": "Notas curtas da release",
  "pub_date": "2026-11-05T12:00:00Z",
  "platforms": {
    "windows-x86_64": {
      "url": "https://github.com/juninmd/ultimate-mugen/releases/download/v0.4.0/ultimate-mugen-v0.4.0-windows-x86_64.zip",
      "sha256": "<sha256 do pacote>",
      "size": 1234567,
      "binary": {
        "url": "https://github.com/juninmd/ultimate-mugen/releases/download/v0.4.0/ultimate-mugen-v0.4.0-windows-x86_64.exe",
        "sha256": "<sha256 do binário>",
        "size": 9876543
      }
    }
  }
}

Só as três plataformas publicadas se atualizam sozinhas. Web, Android, iOS, Linux que não seja x86_64 e macOS Intel seguem apenas com o aviso na tela.

Fluxo

  1. Na inicialização o jogo busca releases/latest/download/latest.json por HTTPS (timeout de 8 s, ignorado em silêncio quando offline).
  2. Uma version mais nova com entrada binary para a plataforma atual mostra um painel no título/menu com a versão instalada e a disponível. Nada é baixado até a pessoa aceitar "Atualizar agora".
  3. Ao aceitar, o download roda em segundo plano (timeout de 180 s) para .update-v<versão>[.exe] ao lado do executável em execução.
  4. O download só é aceito se o sha256 e o tamanho em bytes baterem com o manifesto e se o executável baixado responder --version com ultimate-mugen <versão>.
  5. Verificado o pacote, ele substitui o executável instalado (no Windows o executável em uso é renomeado para .old antes) e o jogo reinicia com --no-update-check, para que um manifesto ruim não cause laço de reinícios.
  6. O .old anterior é apagado na inicialização seguinte.

Falha de download, máquina offline ou pasta de instalação somente leitura mudam apenas a linha de status; a build em execução continua funcionando. "Agora não" esquece a versão até o próximo boot, e o aviso do rodapé continua visível.

Linha de comando e como desligar

FlagEfeito
--check-updateMostra se existe release mais nova e sai
--updateBaixa, verifica e instala a release mais nova, depois sai
--no-auto-update / UME_NO_AUTO_UPDATE=1Mantém o aviso no rodapé e nunca mostra a pergunta (então nunca baixa nem instala)
--no-update-check / UME_NO_UPDATE_CHECK=1Nenhuma requisição de rede

Builds locais -dev nunca se atualizam.

Conferir uma release

node scripts/release-manifest.mjs --verify latest.json --dir <artefatos> --version <versão> --repo juninmd/ultimate-mugen confere que o pacote e o binário puro existem, que as URLs apontam para a release da tag e que os sha256 batem. O workflow Release roda exatamente essa checagem no rascunho antes de publicar e valida o manifesto público depois.

Cobertura de animações nativas

Esta entrega completa a arte dedicada de poses do elenco nativo: todo quadro de animação que o motor consegue nomear resolve para o próprio arquivo PNG. Os canvases numerados compartilhados (09_hit1, 13_fall2, ...) continuam atendendo os aliases legados, e quadros de efeito puramente procedurais (boltHit, feixes) ficam renderizados pelo motor por design; ambos são resoluções aprovadas, não lacunas.

Incluído nesta etapa

  • As imagens dedicadas portrait.png dos dezesseis lutadores seguem nos cartões do seletor e no HUD.
  • Toda pose textual referenciada por uma animação tem PNG dedicado em assets/chars/sprites/<id>/, incluindo defesa, agachamento, salto, flip, turn, land, vitória, intro, taunt, o conjunto de derrotas df* e as poses de dano baixo que antes reutilizavam idle. Poses inline têm o quadro inline_<hash> renderizado uma única vez.
  • Os PNGs dedicados devem ser gerados em pixel art arcade via generate_image usando uma âncora canônica validada do próprio personagem (a ferramenta depreciada generate_missing_sprites baseada no rig vetorial foi removida). Escreva quadros 400×400 RGBA com eixo (200, 392) e metadado refHeight 320, seguindo a convenção existente.
  • Verificação: cargo run --release -p ume-engine --example native_sprite_audit -- <out.json> --require-complete deve passar para todos os lutadores, e cargo run --release -p ume-devtools --bin ume-tools -- audit-sprites --out <report.json> deve ficar limpo em geometria e bordas alfa. O cargo run --release -p ume-devtools --bin ume-tools -- audit-moves é a auditoria estática do elenco (inputs, cancels, throws, hit boxes).

Ciclo de QA com sprite-gen

A skill sprite-gen segue como ferramenta oficial de QA de qualidade artística nos loops nativos, sem exigir credenciais de geração de imagem:

  • ume-tools motion-descriptor --character assets/chars/<id>.json --sprites assets/chars/sprites/<id> --animation walk --out walk.json
  • sprite-gen inspect-motion --source walk.json --out walk-report.json mede âncoras, quadros duplicados, deriva da caixa e contato com as bordas; contato de pé exige --contacts e --foot-box explícitos.
  • ume-tools preview-motion e ume-tools preview-scene renderizam GIFs e MP4s de revisão com os estágios do sprite-gen. Veja Importação de Sprite Atlas pelo caminho de importação component-row quando se quiser arte gerada por IA.

Limites conhecidos

Inventários e relatórios de auditoria não comprovam que as animações ocorrem naturalmente em partida: gatilhos de estado, fluidez de transição e ajuste das hitboxes precisam ser validados no Treino. Recores são aplicados no carregamento pelo sistema de paletas, então a conferência visual deve cobrir cada paleta de um lutador, não apenas a primeira.

Homologação

O ume-tools roster-audit carrega todos os personagens e cenários de uma coleção M.U.G.E.N instalada, joga lutas reais de CPU contra CPU entre eles e grava um relatório legível por máquina de tudo que está quebrado: carregamento, visual (sprites ausentes ou invisíveis), som (chamadas sem amostra), mecânica (estados travados, lutador abaixo do chão, ataques sem fim, resgates do watchdog), as checagens específicas da importação no navegador e a memória que cada lutador precisa.

É o substituto reproduzível do "abrir o jogo e testar alguns personagens na mão".

Como rodar

cargo build --release -p ume-devtools
target/release/ume-tools roster-audit                     # mugen/chars + mugen/stages -> docs/evidence/homologation
target/release/ume-tools roster-audit --only "goku"        # uma família de personagens (os cenários continuam todos)
target/release/ume-tools roster-audit --limit 20 --no-fights   # passada estática rápida
target/release/ume-tools roster-audit --opponent "vegeta"  # força todas as lutas contra um oponente
target/release/ume-tools roster-audit --fail-over critical # sai com 2 em qualquer achado crítico (gate de CI)
FlagSignificado
--chars <dir> / --stages <dir>raízes varridas (padrão mugen/chars, mugen/stages)
--out <dir>onde report.json, report.md e issues.csv são escritos
--limit N / --stage-limit Naudita só os N primeiros personagens / cenários
--fights Nlutas por personagem (cada uma contra outro oponente e cenário, padrão 2)
--stage-fights Npasso de rotação de oponentes quando o cenário é o alvo
--only, --only-stage, --opponentfiltros por substring para personagens, cenários e oponente forçado
--no-fights, --quietsó a passada estática, e sem progresso por item no stderr
--fail-over <severidade>código de saída 2 quando existe achado naquela severidade ou pior

A execução é paralela (um carregamento por personagem por worker, nunca a coleção inteira na memória) e cada luta roda dentro de catch_unwind, então um pacote quebrado não aborta a auditoria.

O que cada luta verifica

Cada luta roda 30 segundos de CPU contra CPU em um cenário real, com o fundo do cenário ativo, e só julga controle e animação durante o round (roundstate = 2), para não confundir intro ou vitória com travamento:

CódigoSeveridadeSignificado
fight-paniccríticaa partida entrou em pânico durante o tick (a mensagem fica no relatório)
fight-non-finitecríticaposição, velocidade, vida ou poder virou NaN/inf
fight-life-range, fight-power-rangemaiorvida ou poder saiu dos próprios limites
fight-below-floor-p1/p2maioro lutador ficou mais de 12 px abaixo do chão por mais de 20 ticks
fight-stuck-p1/p2maior420 ticks sem controle fora dos estados deitados
fight-endless-attack-p1/p2maior240 ticks preso dentro de um mesmo estado de ataque
fight-no-contactmaioro par não acertou nenhum golpe em 30 segundos
fight-off-camera-p1/p2maioro lutador ficou fora da câmera por mais de 3 ticks
fight-watchdog-rescuemenora rede de segurança do motor interveio (o script não devolve o controle)
fight-camera-nancríticaposição ou zoom da câmera virou não-finito
fight-engine-warningmenoraviso que o motor levantou durante a luta (anim ou estado ausente)

O que a passada estática verifica

CódigoSeveridadeSignificado
char-load-fail, char-load-paniccríticao pacote não carrega de jeito nenhum
char-no-anims, char-no-states, char-no-commandscrítica.air/.cns/.cmd não produziu nada
char-web-quarantinecríticaa importação do navegador recusa o pacote (ume_formats::health), então ele nunca aparece na web
char-unsupported-controller, char-unknown-triggermaiorcontroller ou trigger que o motor não executa
char-sprite-missingmaiorum quadro de animação aponta para um sprite inexistente no .sff
char-sprite-transparentmenoro quadro existe mas todos os pixels são transparentes
char-sound-missingmaiorPlaySnd pede uma amostra que o .snd não tem
char-unknown-parametermenorparâmetro de controller que o motor nunca lê
char-wasm-atlas-overflow, char-wasm-atlas-pressuremaior/menoros pixels de sprite não cabem no atlas 2048 do navegador (4,2 M pixels), então ele precisa expulsar e reenviar
char-load-slowmenorcarregamento acima de 2,5 s

Códigos de cenário: stage-load-fail, stage-load-panic, stage-no-layers, stage-no-sprites, stage-layer-sprite-missing, stage-layer-anim-missing, stage-bounds-inverted, stage-bounds-tight, stage-spawn-overlap, stage-music-outside-vfs, stage-no-shadow.

Lendo o relatório

  • report.md ranqueia os personagens e cenários com os piores achados, e lista os pacotes mais lentos para carregar e os ticks de simulação mais caros.
  • report.json traz o resumo, todos os achados e todas as lutas (golpes, dano, estados distintos, custo por tick).
  • summary.json é a forma compacta (contagem por código e os primeiros exemplos), pequena o bastante para versionar.
  • issues.csv é a mesma lista achatada para planilha ou diff entre duas execuções.

Um achado é evidência para reproduzir, não veredito: --only <nome> --opponent <nome> replica o par exato e --no-fights isola os problemas estáticos de um pacote.

Validação na web

O navegador é o alvo mais crítico: ele recusa pacotes que o carregador do desktop tolera e tem um orçamento de textura muito menor. Os achados de atlas saem da soma dos pixels de todos os sprites do pacote (indexados e RGBA) comparada com o atlas 2048 usado pelo build wasm (4,2 M pixels). Para reproduzir uma importação de verdade:

node scripts/web-mugen-smoke.js web/dist mugen/incoming/meu-char.zip

Ele importa o pacote pelo input de arquivo real, entra direto numa luta com o personagem importado e falha com pânico, relógio congelado, renderizador travado ou heap acima do limite. Com um pacote que já está no elenco (o elecbyte.zip embutido), defina MUGEN_SMOKE_CHAR para o personagem e o teste valida a deduplicação por chave de conteúdo em vez de exigir uma entrada nova.

Biblioteca de habilidades

Blocos reutilizáveis para lutadores UMF. Um lutador convertido ou escrito à mão deve citar uma habilidade e ajustá-la, não reescrever os controladores. Os blocos são campos de dados do motor mais um kit embutido (abilities) com golpes prontos.

Mapa de lacunas: o que o pacote MUGEN faz e onde o UMF cobre

Padrão no pacoteBloco UMFSituação
Helper de bola de fogo, Projectileprojectileexistente
Rajada de ki (vários Projectile, um por quadro)projectile.repeatnovo
Teleporte atrás ou até o rival (PosAdd p2dist, Turn)blink (behind, front, above, back) e o antigo teleportnovo
Flash de carga, explosão de aura, Explod de animaçãovfxnovo
EnvShake fora de um golpequakenovo
Raio com vários golpes (projhits)projectile.hitsexistente
Voo, clone, forma (var)abilities.fly, helpers.clones, abilities.formsexistente
Rush com vários HitDefhits[] e moves[].velexistente
Helper com IA própria, Statedef -2/-3, Lua/ZSSscripts, ou ficar no formato legadonão migra

Campos do golpe

{ "id": "salvo", "kind": "special", "anim": "arcbolt", "cost": 250,
  "blink": { "at": 2, "to": "behind", "gap": 36 },
  "vfx": [{ "at": 1, "anim": "boltHit", "offset": [0, -50], "time": 12, "follow": true, "scale": 1.5 }],
  "quake": [{ "at": 3, "time": 12, "amp": 2 }],
  "projectile": { "at": 3, "anim": "boltFx", "speed": [6, 0], "offset": [44, -78], "damage": 22,
                  "repeat": { "count": 5, "every": 1, "offsetStep": [0, 8], "speedStep": [0.4, 0], "damageStep": 0 } } }
CampoSignificado
blink (objeto ou lista)quadro at, to = behind (vira, padrão), front, above, back; gap distância (padrão 40); y deslocamento vertical
vfx[]Um Explod de uma animação do lutador no quadro at: offset (padrão [0, -50]), time em ticks (padrão: até o fim da animação), follow prende ao lutador, scale, behind desenha sob o lutador
quake[]EnvShake no quadro at: time (8), amp (4)
projectile.repeatAbre um projétil em count (máx. 24): o k-ésimo sai no quadro at + k * every (padrão 2), deslocado por k * offsetStep, k * speedStep e k * damageStep. Uma rajada maior que a animação dispara o resto no último quadro

vfx reutiliza animações que o lutador já tem (quadros PNG). O motor nunca desenha um quadro por código.

Kit embutido abilities

Um kit de biblioteca: "extends": ["abilities"] não adiciona nada sozinho; só entram os golpes que você citar (por id ou com use). Golpes: ki_blast, ki_barrage, beam, instant_transmission, blink_strike, power_surge. Cada um traz números razoáveis; mude só o que difere. projectile e blink se mesclam campo a campo (veja o exemplo em Ability library).

Sempre troque anim (e projectile.anim) pelas animações do próprio lutador. Ferramentas que leem o arquivo do elenco sem parse_char (alguns testes) não entendem extends; os lutadores do elenco escrevem os blocos por extenso, e os kits servem a pacotes e mods.

Conversor

tools/mugen2umf converte Explod em explods e EnvShake em shake (com blink, vfx e quake disponíveis para escrita manual) e compara nomes de command sem diferenciar caixa, como o MUGEN faz (SPECIAL 1 no .cmd, "special 1" no gatilho). Antes da correção, um pacote assim ficava só com os normais: o Goku SS4 passou de 5 para 15 golpes.

Regras práticas

  • Repetir os mesmos controladores em dois golpes indica um bloco faltando: crie um campo ou um golpe de kit.
  • Um bloco novo precisa de teste unitário da expansão e de um teste do motor que o execute (crates/engine/tests/native_ability_blocks.rs).
  • Confira cada at contra a duração da animação; o compilador não estica animação.

Câmera de Replay

A câmera de replay é um diretor só de exibição. Ela enquadra a luta durante a reprodução, mas nunca muda a simulação: a câmera é salva antes do desenho e restaurada logo depois, então o resultado do replay e os checksums continuam iguais.

Entrada por frame: um Subject por lutador (x e se um hit está ativo). Saída: o foco x e o zoom do desenho.

  • O foco é o ponto médio dos lutadores, puxado 35% em direção ao atacante para enquadrar o golpe.
  • O pan avança 12% do caminho até o foco a cada frame, somado à câmera da simulação.
  • O zoom aperta quando os lutadores estão perto, até 1.6x o zoom da partida, e fica no zoom da partida quando estão longe.
  • Sem lutadores válidos, mantém o enquadramento anterior.

Puro e determinístico: sem relógio, sem aleatoriedade.

Código: crates/engine/src/replay_camera.rs (enquadramento aplicado em src/app/fight_screen.rs, em volta do desenho). Testes: crates/engine/tests/replay_camera.rs.

Criar cenários

Há dois caminhos: cenário M.U.G.E.N (arquivo .def + .sff, sem programar) ou cenário nativo (código Rust, com camadas procedurais e efeitos reativos).

Cenário M.U.G.E.N

Coloque meu_cenario.def e meu_cenario.sff em mugen/stages/.

[Info]
name = "Meu Cenário"
displayname = "Meu Cenário"

[Camera]
startx = 0
starty = 0
boundleft = -150
boundright = 150
boundhigh = -25
boundlow = 0
verticalfollow = .2
tension = 50

[PlayerInfo]
p1startx = -70
p2startx = 70

[StageInfo]
zoffset = 210
localcoord = 320, 240

[BGdef]
spr = meu_cenario.sff

[BG Céu]
type = normal
spriteno = 0, 0
layerno = 0
start = 0, 0
delta = .2, .2
tile = 1, 0
velocity = .1, 0

[BG Chão]
type = normal
spriteno = 1, 0
start = 0, 160
delta = 1, 1
mask = 1

[BG Bandeira]
type = anim
actionno = 10
start = 80, 60
delta = .8, .8

[Begin Action 10]
2,0, 0,0, 6
2,1, 0,0, 6
SeçãoChaves suportadas
[Info]name, displayname
[Camera]startx, boundleft, boundright, boundhigh, boundlow, verticalfollow, tension
[PlayerInfo]p1startx, p2startx
[StageInfo]zoffset, localcoord
[BGdef]spr
[BG ...]type (normal, anim, parallax), spriteno, actionno, layerno (0 atrás, 1 na frente), start, delta, tile, tilespacing, velocity, trans, mask, scalestart, scaledelta, angle, xshear, window, maskwindow, windowdelta, spacing

Parâmetros de transformação da camada (Ikemen / M.U.G.E.N 1.1), aplicados tanto pelo renderizador quanto pela pré-visualização na seleção de cenário:

ChaveSignificado
scalestart = x, yEscala base do sprite, ancorada no eixo dele (padrão 1, 1).
scaledelta = x, yVariação de escala por unidade de movimento da câmera, multiplicada por delta: escala = scalestart + scaledelta * câmera * delta; a camada cresce ou encolhe conforme a câmera se move (padrão 0, 0).
angleRotação em graus em torno do eixo do sprite, anti-horária para valores positivos.
xshearCisalhamento horizontal: cada linha é deslocada por xshear vezes a distância dela ao eixo.
window = x1, y1, x2, y2Retângulo de recorte em unidades do cenário.
maskwindow = x1, y1, x2, y2Segundo retângulo de recorte; com os dois presentes a camada é recortada pela interseção.
windowdelta = x, yQuão rápido a janela de recorte acompanha a câmera (padrão: o delta da camada).
spacing = x, yEspaço entre os ladrilhos; usado quando tilespacing não existe (tilespacing vence se ambos existirem).

Planejado: sombras e reflexos configuráveis.

Música, céu e camada de paralaxe

[Music] toca a faixa do cenário no início da luta e substitui a música padrão. O arquivo é resolvido em relação ao .def e, depois, pela raiz da pasta de conteúdo.

[Music]
bgmusic = sound/meu_tema.ogg
bgmvolume = 80
bgmloopstart = 0
bgmloopend = 0
ChavePadrãoSignificado
bgmusicnenhumArquivo da faixa (.ogg, .mp3, .flac ou .wav)
bgmvolume100Percentual do volume normal da música
bgmloopstart, bgmloopend0Pontos de loop em amostras; 0 e 0 repete o arquivo inteiro

type = parallax é uma camada que se repete sem fim no eixo X e desliza com o velocity, sem precisar de tile = 1, 0. Use para uma faixa de céu, colinas distantes ou nuvens. O delta continua definindo quanto a camada acompanha a câmera.

[BG Cordilheira]
type = parallax
spriteno = 2, 0
layerno = 0
start = 0, 140
delta = 0.8, 1
velocity = 0.1, 0

[Sky] desenha um céu animado atrás dos lutadores, sobre a primeira camada de fundo. Funciona em qualquer cenário, inclusive nos que vêm de um .def. type pode ser:

TipoAparência
auroraFaixas verde-azuladas de luz que derivam para os lados no alto da tela
godraysRaios de luz saindo do centro do alto da tela
starsCampo de estrelas que cintilam
cloudsNuvens suaves que atravessam a parte de cima da tela
ChavePadrãoSignificado
color255, 255, 255Tom, r, g, b de 0 a 255
intensity0.6Opacidade no ponto mais forte, de 0 a 1
speed1Velocidade da deriva e da pulsação, de 0 a 8
[Sky]
type = aurora
color = 120, 255, 200
intensity = 0.5
speed = 1

O cenário de exemplo assets/stages/data/example/ usa os três recursos.

Ler o cenário a partir de scripts

StageVar(<nome>) devolve o valor do cenário nas unidades do localcoord do próprio cenário. O prefixo da seção é opcional: StageVar(camera.boundleft) e StageVar(boundleft) são a mesma consulta.

NomeValor
info.name, info.displayname, info.author, info.mugenversiontexto, comparado com StageVar(info.author) = "nome" (sem diferenciar maiúsculas)
camera.startx, camera.starty, camera.boundleft, camera.boundright, camera.boundhigh, camera.boundlownúmeros
camera.verticalfollow, camera.tension, camera.zoomin, camera.zoomoutnúmeros
playerinfo.p1startx, playerinfo.p2startx, playerinfo.leftbound, playerinfo.rightboundnúmeros
playerinfo.autoturn1, a menos que o cenário defina autoturn = 0
stageinfo.zoffset, stageinfo.localcoord.x, stageinfo.localcoord.y, stageinfo.roundtimenúmeros (localcoord sozinho é a largura; roundtime é -1 quando o cenário não define)
shadow.intensity, shadow.yscale, reflection.intensitynúmeros

Consultas de texto valem 0 quando usadas como número. Nomes desconhecidos valem 0 e imprimem um aviso ao compilar a expressão. Nos cenários nativos e no cenário plano os valores vêm dos padrões do motor.

Parâmetros de câmera

O grupo [Camera] aceita estas chaves extras. Todas são opcionais e o padrão reproduz a câmera anterior, então um cenário que as omite se comporta exatamente como antes.

ChavePadrãoEfeito
verticalfollow0.2Fração da altura do lutador mais alto que a câmera acompanha para cima
tension50Zona morta horizontal: a câmera só se move quando um lutador chega a menos que isso de uma borda da tela, então um lutador encurralado fica parado enquanto o oponente se aproxima
verticalfollowdelta0Zona morta em pixels do cenário: o alvo vertical só muda quando se moveu pelo menos isso, evitando tremor em pequenos pulos
yscrollspeed0.3Parcela da distância vertical restante percorrida por tick (limitada a 0..1)
zoominspeed, zoomoutspeed0.04Parcela da diferença de zoom restante percorrida por tick ao aproximar ou afastar a câmera (limitada a 0..1; 0 mantém o zoom, 1 chega em um tick)
lowestcap0Com 1 a câmera nunca desce abaixo de starty
dynamicboundhigh0Com 1 o boundhigh sobe boundhighdelta por unidade de zoom-out acima de 1x, mantendo o céu alcançável com a câmera afastada
boundhighdelta0Usado por dynamicboundhigh

autoturn em [PlayerInfo] (padrão 1) define se os lutadores se viram sozinhos quando o oponente passa por cima deles nos estados parado, andando e agachado. autoturn = 0 mantém a direção até um controlador mudá-la (AssertSpecial flag = noautoturn continua desligando por personagem). StageVar(camera.<chave>) e StageVar(playerinfo.autoturn) leem todos esses valores.

Cenário embutido só com dados

Um cenário embutido não precisa de Rust. Crie a pasta assets/stages/data/<id>/ com um stage.def e o arquivo de sprites que ele citar (por exemplo example.sff). Na compilação, cada pasta ali é embutida no binário (build.rs), aparece no seletor de cenários como cenário embutido e é carregada como qualquer cenário M.U.G.E.N, com [Music], [Sky] e camadas de paralaxe. O nome exibido vem de [Info] displayname.

assets/stages/data/example/
  stage.def
  example.sff

A pasta example é um cenário funcional com céu aurora e uma cordilheira em paralaxe. scripts/make-example-stage.py a regenera. Recompile depois de adicionar ou alterar arquivos, porque eles são embutidos.

Os cenários nativos em Rust continuam disponíveis para arte procedural e efeitos reativos (veja abaixo).

Cenário nativo

Cenários nativos ficam em src/stages.rs e os efeitos animados em src/stagefx.rs.

  1. Escreva uma função fn meu() -> Stage montando as camadas com lay(...) e as primitivas de ume_engine::raster (rect, lin, gradientes) e texgen (blobs, grain, haze). Use dojo() como modelo.
  2. Registre em builtin():
#![allow(unused)]
fn main() {
StageEntry { id: "meu".into(), name: "Meu Cenário".into(), thumb: [[10, 10, 30], [40, 40, 90], [200, 120, 60]], build: Box::new(meu) },
}
  1. Para efeitos reativos (poeira, multidão, água), adicione uma variante em StageKind e trate em stagefx.rs.
  2. Gere capturas para revisar: UME_SHOTS_ONLY=stages UME_STAGE=meu cargo run --release -- --shots out/.

Cada Layer tem delta (parallax), y, front (desenhada na frente dos lutadores) e dynamic (sem bitmap, desenhada por stagefx).

Pixel art dos cenários nativos

As vinte e uma arenas nativas usam imagens PNG coloridas incorporadas de assets/stages/: os sete reinos principais (dojo.png, neon.png, bamboo.png, plains.png, spirit.png, volcano.png e brazil.png), os sete cenários emblemáticos do mundo (great_wall.png, petra.png, christ_redeemer.png, texas.png, chichen_itza.png, colosseum.png, taj_mahal.png) e as sete Maravilhas do Mundo Antigo (pyramids_giza.png, hanging_gardens.png, temple_artemis.png, statue_zeus.png, mausoleum_halicarnassus.png, colossus_rhodes.png, lighthouse_alexandria.png). Os prompts e a ferramenta de geração estão registrados em assets/stages/prompts.json. O jogo não precisa de serviço externo de imagens nem de acesso a esses arquivos em execução.

StageArt::Illustrated desenha o fundo com filtro nearest-neighbor, alinha o piso a 85% da altura da imagem e limita o movimento horizontal da câmera às bordas da imagem. O zoom de equipes mantém a proporção nativa do chão. Sombras, reflexos dos lutadores e efeitos de combate continuam ativos; as antigas animações de objetos ficam exclusivas da arte procedural.

Todas as vinte e uma arenas nativas têm oito fases de animação ambiente em assets/stages/animation/<stage_id>/. Cada PNG transparente de 1672×941 acrescenta pétalas, folhas, brasas, chuva, poeira ou partículas espirituais próprias do cenário, preservando a arte original e o piso de luta. O jogo compõe as camadas uma vez ao carregar o cenário e avança o loop a cada oito ticks da simulação. Builds nativas incorporam as pequenas camadas; a versão web só as busca para o cenário selecionado. Gere novamente as camadas com python tools/gen_stage_loops.py; os eventos e prompts estão em assets/stages/prompts.json.

Camadas vivas

Todo cenário ilustrado também carrega um perfil de ambiência (src/stages/ambience.rs, dados em src/stages/ambience/profiles/): bancos de névoa translúcidos que derivam para os lados, partículas (pétalas, brasas, vaga-lumes, poeira, folhas, faíscas, pássaros), poças de luz aditivas ancoradas em lanternas, janelas, fogo e sol, e raios de luz inclinados. Tudo é desenhado a cada quadro com polígonos de cor por vértice sobre a arte plana (camadas front: true passam na frente dos lutadores), reage ao paralaxe da câmera, usa Match::game_time para o movimento e escala a quantidade de partículas com a configuração de efeitos. Um teste unitário limita cada perfil a 420 polígonos por quadro e valida todos os intervalos. Para animar um cenário ilustrado novo, adicione um Profile para o id dele em profiles/classic.rs ou profiles/wonders.rs; ids desconhecidos usam algumas partículas de poeira.

O seletor exibe as mesmas imagens, recortadas nos cartões sem alterar sua proporção. A seleção aleatória e os cenários M.U.G.E.N importados mantêm os cartões com gradiente. Os cenários importados preservam sua própria arte durante a luta.

Use UME_STAGE_ART=procedural para comparar os cenários procedurais originais. O seletor continua mostrando as ilustrações em pixel art padrão. Capture o seletor com UME_SHOTS_ONLY=stage-select ultimate-mugen --shots out/ --res 1280x720 --mute, ou as sete lutas com UME_SHOTS_ONLY=stages.


Arenas Nativas, Lore e Associação de Personagens

Cada arena nativa de Ultimate MUGEN representa um ponto de convergência geográfico e espiritual crucial na colisão dos mundos. Abaixo encontra-se o guia completo dos sete campos de batalha, sua história e os combatentes vinculados a cada um.

1. Telhado do Dojo — Pôr do Sol (dojo)

Telhado do Dojo

  • Atmosfera: O cume de um dojo tradicional de madeira e telhas curvas erguido sobre montanhas cobertas de névoa ao entardecer. Galhos de cerejeira em flor emolduram o deck de combate, enquanto lanternas de papel iluminam as nuvens douradas e rosadas.
  • Lutadores Nativos (Cenário de Origem):
    • Kaito Arashi: O dojo sagrado onde Kaito completou seu treinamento inicial de karatê antes de partir em peregrinação pela Estrada da Tempestade.
    • Akio Hoshi: Pico vizinho onde o Dojo da Queda Estelar observa os céus noturnos.
  • Desafiantes e Batalhas da História:
    • Lian Feng: Viaja das montanhas de Wudang para um duelo de honra entre os chutes de seda chineses e o karatê de vendaval japonês.
    • Jin Kazaguruma: Salta pelos beirais para testar a velocidade de seus chakrams contra a firmeza de Kaito.
  • Significado Narrativo: Representa a pureza das artes marciais tradicionais, a disciplina do espírito e a tranquilidade anterior à corrupção cósmica.

2. Neo-Metrópole 2099 (neon)

Neo-Metrópole 2099

  • Atmosfera: O heliponto molhado pela chuva ácida no topo de um arranha-céu colossal de uma metrópole futurista. Painéis holográficos em ciano e magenta brilham em meio à névoa de meia-noite, enquanto naves aéreas cruzam os céus elétricos.
  • Lutadores Nativos (Cenário de Origem):
    • VX-9 Volta: O campo de testes de onde Volta escapou após quebrar seus protocolos corporativos de extermínio.
    • Valdric Morn: O complexo industrial militar onde o Império da Estrela Rubra mantém suas divisões de tanques e canhões de matéria escura.
  • Desafiantes e Batalhas da História:
    • Capitão Marlow Reyes: Atraca seu galeão voador para saquear bancos de dados imperiais e duelar contra patrulhas de elite.
    • Akio Hoshi: Invade a metrópole para provar a Valdric que a coragem de um lutador supera qualquer armadura mecânica.
  • Significado Narrativo: O palco da tecnocracia e da opressão corporativa, onde a consciência sintética de Volta luta pela liberdade contra a tirania imperial de Valdric.

3. Bambuzal ao Luar (bamboo)

Bambuzal ao Luar

  • Atmosfera: Um bosque milenar de bambus verde-jade sob a luz prateada de uma lua cheia imensa. Folhagens verde-azuladas, um riacho tranquilo de montanha, vagalumes e lanternas de pedra desgastadas criam um clima de silêncio mortal.
  • Lutadores Nativos (Cenário de Origem):
    • Shion Kurogane: O refúgio solitário onde Shion medita empunhando sua colossal espada lunar.
    • Suzume Kagerou: Os corredores de sombra por onde Suzume rastreia seus alvos sem produzir um único ruído.
    • Lian Feng: Os bosques sagrados na base do templo da Lanterna de Jade.
    • Jin Kazaguruma: A copa alta dos bambus por onde Jin salta com seus chakrams de vento.
  • Desafiantes e Batalhas da História:
    • Kaname Fuyutsuki: Duelo solene contra Shion sob a lua para decidir se o dever impessoal supera a dor do luto.
    • Mikazuki Oboro: As sombras ganham vida e corvos ilusórios atacam os sobreviventes das antigas dinastias.
  • Significado Narrativo: O terreno da furtividade, da paciência e da contemplação poética, onde o mínimo farfalhar de folhas prenuncia um golpe letal.

4. Planalto Rochoso (plains)

Planalto Rochoso

  • Atmosfera: Gargantas monumentais de arenito dourado e platôs esculpidos por milênios de ventos sob um céu azul infinito. Gramíneas estepárias douradas ondulam ao longo de estratos rochosos imponentes.
  • Lutadores Nativos (Cenário de Origem):
    • Daichi Ginrou: O território selvagem onde Daichi caça com lobos prateados e aprimora seu ki dourado contra rochedos maciços.
    • Akio Hoshi: Antigas crateras onde meteoritos repousam há eras.
    • Capitão Marlow Reyes: Os cânions abertos onde Marlow pousa sua nau para reparos náuticos e apostas.
    • Sylene Vashti: Terras altas e secas onde Sylene pratica condensar umidade do ar em barreiras de gelo.
  • Desafiantes e Batalhas da História:
    • Bruno Volk vs. Daichi Ginrou: O choque colossal entre o boxe peso-pesado e as garras do lobo dourado, fazendo o desfiladeiro ecoar.
    • Marlow Reyes vs. Lian Feng: Disputa acrobática por pergaminhos escondidos em ruínas nas escarpas.
  • Significado Narrativo: A força bruta e a vastidão da terra intocada, simbolizando a vitalidade e a alegria pura do combate aberto sem artifícios.

5. Portão dos Espíritos (spirit)

Portão dos Espíritos

  • Atmosfera: Portais torii vermelhos ancestrais vigiando um santuário misterioso sob a luz de tochas espectrais azul-turquesa. Lanternas de pedra cobertas de musgo e árvores milenares envolvem o pátio sob um céu estrelado pacífico.
  • Lutadores Nativos (Cenário de Origem):
    • Kaname Fuyutsuki: O limiar sagrado defendido pela lâmina do inverno de Kaname para impedir a violação do mundo espiritual.
    • Haruki Sumi: O arquivo sagrado onde Haruki estuda fórmulas de selamento para conter os Titãs do Crepúsculo.
  • Desafiantes e Batalhas da História:
    • Mikazuki Oboro: Surge entre os toriis para desestabilizar as barreiras astrais e alimentar seu eclipse de pesadelos.
    • Garan the Ashen Oni: Tenta invadir o pátio sagrado para devorar os espíritos ancestrais e romper os selos de Haruki.
    • Suzume Kagerou: Embosca os asseclas de Oboro antes que conspurquem os altares de seus antepassados.
  • Significado Narrativo: O núcleo metafísico do mundo, onde se decide se a alma humana preservará sua dignidade ou se renderá à corrupção eterna.

6. Cratera Vulcânica (volcano)

Cratera Vulcânica

  • Atmosfera: Uma gigantesca caldeira vulcânica em erupção contínua sobre rochedos de basalto negro e rios de lava alaranjada incandescente. Fumaça escarlate, fuligem e labaredas iluminam um terraço de obsidiana cortado por fendas brilhantes.
  • Lutadores Nativos (Cenário de Origem):
    • Garan the Ashen Oni: O abismo subterrâneo infernal de onde o demônio rastejou de volta à superfície.
    • Mikazuki Oboro: O vórtice culminante onde o ritual do Eclipse Escarlate atinge sua potência máxima de convergência.
    • Valdric Morn: As fundições geotérmicas onde o império forja canhões de alta potência.
  • Desafiantes e Batalhas da História:
    • Sylene Vashti: A rainha exilada marcha em direção à lava para congelar os veios magmáticos e vingar seu reino ancestral.
    • Kaito Arashi: A batalha decisiva contra as sombras de Oboro para dissipar o cataclismo com o Olho da Tempestade.
  • Significado Narrativo: O ápice do caos primordial e da destruição absoluta, onde o destino do universo convergente é selado no calor da forja final.

7. Praça do Interior — Brasil (brazil)

Praça do Interior

  • Atmosfera: Uma acolhedora praça histórica no interior do Brasil (inspirada nas cidades coloniais de Minas Gerais e do interior paulista) na hora dourada do entardecer. Casarões em tons pastéis com telhados coloniais de barro, uma igreja elegante ao fundo, um coreto tradicional, ipês e jacarandás floridos e calçamento em pedra portuguesa.
  • Lutadores Nativos (Cenário de Origem):
    • Bruno "Bulldozer" Volk: A praça do coração de Bruno, onde ele treina na academia do bairro e defende seus amigos e vizinhos.
  • Desafiantes e Batalhas da História:
    • Haruki Sumi: Chega em busca de sossego e hospitalidade, sendo recebido por Bruno com café coado e pão de queijo quentinho no coreto.
    • Daichi Ginrou: Desce das montanhas atraído pelos boatos de um peso-pesado de socos estrondosos que luta rindo.
    • Valdric Morn: Uma expedição imperial tenta confiscar suprimentos e recursos da cidadezinha, sendo repelida pelo cruzado demolidor de Bruno e pela bravura da comunidade local.
  • Significado Narrativo: Representa a vida pacífica, a ternura comunitária e a bondade das pessoas comuns, provando pelo que realmente vale a pena lutar e proteger. Utiliza a música tema do planalto e não possui versão procedural anterior.

As 7 Maravilhas Modernas do Mundo

8. Grande Muralha da China (great_wall)

Grande Muralha da China

  • Atmosfera: Uma imponente fortificação milenar de pedra serpenteando sobre montanhas verdejantes envoltas em névoa ao nascer do sol. Torres de vigia em tijolo emolduram as laterais, estandartes imperiais vermelhos e dourados e um amplo chão contínuo de pedra nas ameias.
  • Lore e Afinidades: Bastião ancestral onde os grandes mestres marciais do oriente aprimoram sua resistência. Lian Feng e Jin Kazaguruma realizam duelos de exibição no topo dos baluartes.

9. Petra — Al-Khazneh (petra)

Petra

  • Atmosfera: A monumental fachada helenística do Tesouro (Al-Khazneh) esculpida diretamente nos desfiladeiros de arenito avermelhado do cânion Siq. Luz solar quente do deserto, braseiros de bronze acesos e piso nivelado de arenito.
  • Lore e Afinidades: Santuário sagrado de antigas caravanas mercantes e nômades do deserto. Daichi Ginrou e Marlow Reyes disputam relíquias guardadas nas câmaras subterrâneas.

10. Cristo Redentor — Corcovado (christ_redeemer)

Cristo Redentor

  • Atmosfera: No cume do Morro do Corcovado no Rio de Janeiro na hora de ouro do entardecer. A gigantesca estátua Art Déco de braços abertos sobre a Baía de Guanabara e o Pão de Açúcar, com o céu em tons de magenta e dourado e as luzes da cidade cintilando ao longe.
  • Lore e Afinidades: Farol espiritual e santuário de proteção sobre a metrópole. Bruno Volk e Haruki Sumi testam suas forças sob a benção silenciosa do monumento.

11. Cidade do Interior — Texas, EUA (texas)

Cidade do Interior — Texas

  • Atmosfera: Uma cidade histórica no interior do Texas ao pôr do sol dourado e empoeirado. Fachadas rústicas de madeira com varandas cobertas de tábuas corridas, fórum do condado em tijolos vermelhos com torre sineira, catavento e caixa d'água de ferro silhuetados contra o crepúsculo carmesim e âmbar, postes telegráficos com fios caídos, bandeira do Texas tremulando ao vento da tarde, cactos nas laterais e uma ampla rua de terra batida nivelada para combate.
  • Lore e Afinidades: O coração indomável dos justiceiros e forasteiros do oeste americano. Bruno Volk e Captain Marlow Reyes travam duelos de valentões ao cair da tarde na poeira da rua principal.

12. Chichén Itzá — Templo de Kukulcán (chichen_itza)

Chichén Itzá

  • Atmosfera: A imensa pirâmide em degraus de El Castillo sob um céu crepuscular púrpura salpicado de constelações maias. Cabeças talhadas da serpente emplumada na base das escadarias e densa selva tropical circundante.
  • Lore e Afinidades: Vórtice de alinhamentos cósmicos e cultos estelares. Mikazuki Oboro e Garan canalizam energias de eclipse na praça cerimonial.

13. Coliseu de Roma (colosseum)

Coliseu de Roma

  • Atmosfera: O anfiteatro romano sob a luz dourada do final da tarde. Arcos de travertino em múltiplos níveis, colunas coríntias imperiais, estandartes vermelhos de seda e uma ampla arena de areia batida.
  • Lore e Afinidades: Berço histórico das batalhas de gladiadores e da coragem guerreira. Bruno Volk, Daichi Ginrou e Valdric Morn se enfrentam diante dos arcos monumentais.

14. Taj Mahal — Palácio de Mármore (taj_mahal)

Taj Mahal

  • Atmosfera: O deslumbrante mausoléu de mármore branco marfim refletido no espelho d'água dos jardins Charbagh à aurora. Ciprestes verde-escuros, flores de lótus e arcos com treliças de mármore entalhado emolduram o pátio de combate.
  • Lore e Afinidades: Homenagem suprema ao amor eterno e à harmonia espiritual. Akio Hoshi e Lian Feng trocam golpes de ki sobre a pureza do piso de mármore polido.

As 7 Maravilhas do Mundo Antigo

15. Pirâmides de Gizé (pyramids_giza)

Pirâmides de Gizé

  • Atmosfera: As colossais pirâmides de Quéops e Quéfren sob um pôr do sol incandescente no deserto do Saara. O imponente perfil da Grande Esfinge e dunas douradas cercam o amplo terraço de arenito.
  • Lore e Afinidades: Tumbas cósmicas construídas para a eternidade dos faraós. Garan e Marlow Reyes vasculham as areias em busca de segredos astrais esquecidos.

16. Jardins Suspensos da Babilônia (hanging_gardens)

Jardins Suspensos da Babilônia

  • Atmosfera: Terraços palacianos monumentais repletos de vegetação tropical exótica, palmeiras, salgueiros e cascatas de aquedutos fluindo para espelhos d'água. Paredes de tijolos azuis vidrados com relevos de leões dourados avistando o rio Eufrates.
  • Lore e Afinidades: Maravilha construída pelo amor de um rei mesopotâmico. Haruki Sumi e Sylene Vashti duelam entre flores perfumadas e fontes cristalinas.

17. Templo de Ártemis em Éfeso (temple_artemis)

Templo de Ártemis em Éfeso

  • Atmosfera: Grande colunata de mármore jônico sob um límpido céu noturno e mar Egeu ao luar. Braseiros sagrados com chamas âmbar, relevos esculpidos e olivedos emolduram o pátio cerimonial.
  • Lore e Afinidades: O templo inviolável da deusa da caça e das florestas. Suzume Kagerou e Shion Kurogane cruzam suas lâminas sob o brilho da lua cheia.

18. Estátua de Zeus em Olímpia (statue_zeus)

Estátua de Zeus em Olímpia

  • Atmosfera: O interior sagrado do templo abrigando a colossal estátua de ouro e marfim de Zeus em seu trono entalhado em cedro e pedras preciosas. Tochas fumegantes, tapeçarias vermelhas e piso de mosaico de mármore.
  • Lore e Afinidades: A morada do relâmpago e do juízo divino. Kaito Arashi e Valdric Morn medem forças perante o olhar imortal do senhor do Olimpo.

19. Mausoléu de Halicarnasso (mausoleum_halicarnassus)

Mausoléu de Halicarnasso

  • Atmosfera: Tumba monumental de mármore em múltiplos níveis, com frisos da Amazonomaquia, 36 colunas jônicas, teto piramidal coroado por uma quadriga de quatro cavalos de mármore e vista para o porto do mar Egeu.
  • Lore e Afinidades: Apogeu da escultura e arquitetura da Antiguidade clássica. Kaname Fuyutsuki e Akio Hoshi duelam entre os leões guardiões de mármore.

20. Colosso de Rodes (colossus_rhodes)

Colosso de Rodes

  • Atmosfera: A titânica estátua de bronze do deus Hélio erguendo sua tocha acesa sobre a entrada do porto na tempestade crepuscular. Ondas furiosas arrebentam no quebra-mar de pedra molhada enquanto triremes gregas balançam na baía.
  • Lore e Afinidades: Guardião dos mares e farol da liberdade egeia. VX-9 Volta e Marlow Reyes enfrentam o vento e a chuva no cais de pedra sob o archote de chamas ardentes.

21. Farol de Alexandria — Pharos (lighthouse_alexandria)

Farol de Alexandria

  • Atmosfera: A imensa torre de três estágios de Pharos projetando um feixe de luz dourada varrendo o mar revolto à meia-noite sob um céu repleto de estrelas. Muralhas brancas de calcário e estandartes ptolemaicos ao vento.
  • Lore e Afinidades: Guia supremo de marinheiros e estudiosos de Alexandria. Kaito Arashi, Shion Kurogane e Jin Kazaguruma se reúnem nas muralhas enquanto o facho de luz corta as trevas oceânicas.

Seleção de personagens

Resumo em português de Character-Select.

  • Pesquisa: grade central compacta, cor por jogador (azul P1, vermelho P2), retrato grande do lutador sob o cursor, confirmação com feedback claro, slots de equipe, cenário na mesma tela, tamanho comparável entre lutadores.
  • Design: painéis de vidro iguais ao menu e à HUD, retrato grande com brilho na cor do lutador, cursor suave com cantos e etiqueta P1/P2/CPU, até 5 slots de equipe, cenário no cabeçalho ([ e ]).
  • Paletas: linha de 12 amostras numeradas sob cada painel; , / . trocam, P sorteia e o clique escolhe direto. Cada lado e cada membro de equipe guardam a própria paleta; a última paleta de cada jogador fica salva em ultimate-mugen.cfg (pal1, pal2) e nos replays.
  • Navegação pela grade por coluna: Cima e Baixo mantêm a coluna e caem no quadro mais próximo da linha de destino, então uma última linha mais curta nunca trava nem pula o cursor. PgUp/PgDn andam uma página, Home/End vão aos extremos, a roda rola por linha e R sorteia um quadro.
  • Tamanho uniforme: draw_char_fit encaixa a caixa envolvente da animação parada num quadro fixo, calculada uma vez por lutador. Sprites e cenários nunca são alterados.

Força, vida e ordenação

Cada cartão tem uma barra dourada fina na borda inferior, que mostra a força. O painel lateral mostra três medidores acima da placa de nome: FOR (força), VID (vida) e VEL (velocidade de caminhada). Força = ataque × vida / 1000; vida e velocidade vêm dos dados do personagem, nativo ou M.U.G.E.N. A tecla O alterna a ordem: elenco, força, vida, velocidade e nome. Detalhes em Character-Select.

Elencos grandes (1000+ lutadores e cenários)

  • A lista visível (filtro, busca e ordenação) é calculada uma vez e reaproveitada até mudar o filtro, a ordenação, o texto da busca ou o conjunto jogável (src/app/select_view.rs). Com 1017 lutadores, ordenar por nome custa cerca de 0,9 ms ao recalcular e 0,08 ms ao reaproveitar.
  • A grade usa só as linhas que cabem acima do rodapé, ou acima dos espaços do time nos modos de equipe, então os espaços nunca cobrem a última linha (src/app/select_grid.rs).
  • O selo do cursor (P1, P2, CPU) fica dentro do tile e não cobre mais o nome do tile de cima. Os nomes são cortados na largura do tile com reticências (App::fit_label).
  • Uma pílula de busca abaixo do título mostra a busca atual e o número de resultados; / ou um clique abre a página de busca, Esc ou um clique limpa. A busca procura nome, id, autor e série. Na página de busca, as setas e PgUp/PgDn escolhem um resultado e Enter leva o cursor até ele.
  • O rodapé mostra a página (pág 3/15) ao lado da posição.
  • F ou o botão de estrela marca o lutador sob o cursor como favorito; favoritos ganham uma estrela dourada no tile e são salvos (favorites.txt). Cada escolha entra nas 24 escolhas recentes (recent.txt). Os chips FAVORITOS e RECENTES mostram só esses lutadores, os recentes do mais novo ao mais antigo (src/app/select_marks.rs).
  • O chip de autor (U, Shift+U ou clique) percorre os autores ordenados pelo número de lutadores e se combina com os outros filtros (src/app/select_author.rs).
  • Em telas de toque a página de busca mostra um teclado na tela (letras, números, espaço, apagar, OK, fechar) e menos linhas de resultado; tocar num resultado o escolhe (src/app/select_search/keyboard.rs). UME_OSK=1 força o teclado no desktop.

Seleção de cenário

  • Chips de filtro (Todos, Originais, M.U.G.E.N), alternados com Tab, e caixa de busca aberta com / ou um clique; Esc limpa a busca.
  • Nomes cortados na largura do tile com reticências; Home/End vão para as pontas; o rodapé mostra posição e página.
  • Aleatório sorteia entre os cenários que passam no filtro e na busca atuais.
  • As prévias de cenários M.U.G.E.N só começam depois que o cursor para por 0,12 s, uma por quadro, e prévias a mais de seis linhas de distância são liberadas, então rolar por centenas de cenários M.U.G.E.N não mantém todos decodificados na memória.

Modo de estresse

UME_STRESS=<n> (desktop) ou ?stress=<n> (web) adiciona n lutadores e n cenários gerados (até 5000), reaproveitando o conteúdo embutido com nomes, autores e séries gerados. É só um gancho de teste. UME_STRESS=1000 UME_SHOTS_ONLY=roster ultimate-mugen --shots <dir> --res 1280x720 --mute imprime linhas roster-perf: (custo da lista por ordenação, tempo de CPU por quadro andando na grade e na lista de cenários, memória) e salva screenshots da grade, da busca e dos filtros de cenário.

Checklist de conversão MUGEN para UMF

tools/mugen2umf (crate Rust, skill mugen-to-ume-migrator) migra um lutador M.U.G.E.N para um pacote UMF com comportamento idêntico. Ele não reescreve mais os estados como golpes UMF nativos: o pacote leva os dados originais e o motor carrega pelo mesmo código de um personagem M.U.G.E.N (ume_engine::loader::assemble_mugen_char). O formato está em Personagem UMF.

O que vai junto

ÁreaNo pacote
Estados e controllersmugen.cns, mugen.st, mugen.stcommon sem alteração (CNS e ZSS), incluindo helpers, Statedef -2/-3, IA e agarrões próprios
Comandosmugen.cmd sem alteração: [Defaults], todos os [Command] e as rotas do Statedef -1
Constanteslidas de [Data], [Size], [Velocity], [Movement] originais, com a mesma escala de localcoord
Animaçõesmugen.anims: cada action com offset, ticks, flip, blend e alpha, escala, ângulo, todas as caixas Clsn1/Clsn2, loopstart
Spritesum PNG indexado por sprite do SFF (mesmos índices e paleta), true color como RGBA, ordem e duplicados do SFF mantidos para a escolha de paleta
Paletaspaletas do SFF (sffpal_<k>.png) e pal1.act..pal12.act: troca de paleta e RemapPal/PalFX veem as mesmas cores
Sonscada entrada do .snd como snd_g_i.wav
Campos só do UMFprofile (país, nacionalidade, origem, bio, título, estilo de luta, afiliação em en/pt/es), series, falas, rivals: profile_facts junta os fatos, a skill escreve, set_profile valida
Melhorias--extra: nomes dos golpes (mugen.names), mugenRoutes para estados que o .cmd deixou sem comando, golpes novos em scripts (CNS/ZSS) ou como moves UMF nativos com anim igual ao número de uma action M.U.G.E.N

Prova

mugen2umf parity <original> <pacote> (também rodado pelo convert) compara:

  • dados: estados, comandos, constantes, animações, sprites (pixels e eixos), sprites indexados e paletas, sons, tamanhos;
  • comportamento: cada comando do Statedef -1 é jogado pelo input real no original e no pacote, 150 ticks na mesma luta, e cada tick de cada lutador (estado, animação, quadro, posição, velocidade, controle, vida, poder, helpers, sons) precisa bater.

O veredito é IDENTICAL ou o primeiro tick em que eles se separam. cargo test --release -p mugen2umf converte o Kung Fu Man de assets/mugen/elecbyte.zip e exige IDENTICAL.

Limites

O que o motor não suporta do M.U.G.E.N aparece no report.md do pacote (diagnóstico do motor). Vale igual para o original e para o pacote: corrija no motor, não no conversor.

Cobertura de controllers e triggers MUGEN

O teste de cobertura está em crates/engine/tests/mugen_coverage_matrix.rs. Ele verifica que cada controller e trigger listado do MUGEN 1.1 tem implementação na engine, usando o mesmo teste de despacho que relata nomes não suportados ao carregar um personagem.

Status

ÁreaNomes oficiais verificadosImplementadosObservações
Controllers de estado9090Coberto por teste.
Triggers (forma de valor)9292Coberto por teste.
Triggers (forma de comparação, ex.: StateType = S, MoveType = A, AnimElem = 3, Command = "x", Name = "...")1010Tratados na camada de expressões, cobertos por mugen11_triggers.rs. Fora da lista do teste.
Redirecionamentos (enemy, enemynear, partner, helper, parent, root)66Cobertos por enemy_selection.rs e helper_parity.rs.
Extensões do Ikemen GOmuitosa maioriaListadas em CNS-Scripts.md.

Itens parciais conhecidos

  • DestroySelf: recursive também destrói os helpers que ele criou, e removeexplods remove os explods que ele possui (semântica conforme a documentação do Ikemen GO).
  • Helper: os parâmetros inheritjuggle e size.xscale/sprpriority não são lidos no caminho de criação.
  • Explod: layerno = 1 se comporta como ontop (conforme a wiki do Ikemen GO). layerno = -1 e shadow não são lidos.
  • PlaySnd, Pause, VarSet e Trans: a verificação de parâmetros pelo teste de despacho é inconclusiva; precisam de uma revisão manual contra a documentação do MUGEN antes de afirmar cobertura total de parâmetros.
  • MakeDust: spacing é respeitado (poeira a cada spacing ticks, padrão 1).

Como verificar um nome novo

  1. Adicione o nome à lista correspondente em mugen_coverage_matrix.rs.
  2. Rode cargo test -p ume-engine --test it mugen_coverage_matrix::.
  3. Se falhar, implemente o controller ou trigger e documente em CNS-Scripts.md.

Strings de combo

Cada lutador nativo (os 16 do elenco e os 5 NPCs do Story) tem uma string assinatura de três partes além do gatling padrão. Tudo é dado: as animações string_* são montadas com os frames de soco, chute e golpe forte do próprio lutador (mesmas poses e partes de hit), com velocidade, número de hits e recuperação próprios.

EntradaGolpeFunção
B+xstring_aAbertura. Também sai do cancel do jab no contato
B+astring_bElo do meio. Cancel de string_a no contato
B+ystring_cFinalizador: lançamento, wall bounce ou ground bounce conforme o lutador; pesados ganham armadura

string_a e string_b cancelam em string_c e nos dois especiais assinatura do lutador no contato. Validado por native_combo_routes, native_roster_lab e native_hitbox_audit.

Mini combos com a mesma tecla

Apertar o mesmo botão de ataque de novo depois de acertar encadeia o próximo golpe, sem direção extra. Cada golpe da cadeia é um normal com rekka (after, window, contact: true): só dispara a partir do golpe de origem no contato, nunca do neutro. As animações reutilizam os sprites pixel art existentes do lutador em ordens e tempos novos.

TeclaCadeia
xjab > jab2 > jab3 (finalizador com empurrão leve, cancela nos dois especiais)
alkick > lkick2 > lkick3
ystrong > strong2
x agachadocjab > cjab2
x no arajab > ajab2

O speed do lutador (> 1 encurta cada frame) e a velocidade de andar/correr para frente subiram em todo o elenco; o chefe final acompanha para continuar mais rápido. A velocidade de recuo não mudou. Validado por cargo test --release -p ume-engine --test it native_same_button_chains::.

Variantes de projétil

Todo lutador do elenco tem uma variante lenta e pesada e uma rápida e baixa do projétil assinatura, com os mesmos efeitos: ~D, DB, B, y (lenta, dois hits, longo alcance) e ~D, DB, B, x (rápida, baixa, acerta agachado). Quem já usa o input pega o primeiro livre entre ~D, DF, F, y e ~D, DF, F, a.

Configuração e controles

Arquivo ultimate-mugen.cfg

Fica ao lado do executável e é gravado pelo menu Configurações (menu principal ou menu de pausa: Vídeo, Áudio, Controles, Jogabilidade, Idioma, Sobre). Pode ser editado à mão. Na web o mesmo texto fica no localStorage, no Android no armazenamento privado do app.

ChaveValoresEfeito
fullscreen0 / 1Tela cheia
res0 1280×720, 1 1920×1080, 2 2560×1440, 3 3840×2160, 4 5120×2880Tamanho da janela
quality0 automática, 1 3×, 2 4,5×, 3 6×Densidade da arte vetorial
fps0 / 1Mostra FPS
fx0 a 2Pós-processamento (bloom, vinheta etc.)
impact_lv0 mínimo (fotossensibilidade), 1 reduzido, 2 normal, 3 intensoForça dos efeitos de impacto
version2Versão do formato (arquivos antigos sem ela continuam válidos)
vsync0 / 1V-Sync (nativo)
fps_cap0 sem limite, 1 30, 2 60, 3 120, 4 144Limitador de quadros (nativo)
master music sfx0 a 10Níveis de volume
mute0 / 1Silencia tudo
difficulty1 a 8Nível da CPU
round_time0 99 s, 1 60 s, 2 30 s, 3 infinitoTempo do round
rounds0 primeiro a 1, 1 primeiro a 2, 2 primeiro a 3Rounds para vencer
life0 50%, 1 75%, 2 100%, 3 150%, 4 200%Multiplicador da barra de vida
langen / pt / esIdioma de toda a interface
keep_aspect1 (padrão) / 01 coloca barras pretas e mantém a imagem 16:9 em qualquer janela; 0 estica a imagem até preencher a janela
filternearest (padrão) / linearAmostragem dos sprites ao ampliar: pixels nítidos ou suavização bilinear
windowLARGURAxALTURA, 0x0 sem valorTamanho da janela, gravado automaticamente cerca de um segundo depois de parar de redimensionar; vale mais que res até você escolher um tamanho no menu Vídeo

Ficha do Jogador (player-card.json)

A tela Ficha do Jogador (menu principal) guarda card, partidas, lutadores, rivais e conquistas em player-card.json, ao lado do executável (no navegador, no armazenamento local). Partidas de Treino não contam. O arquivo fica só neste aparelho; não há sincronização com servidor.

Janela redimensionável

A janela pode ser arrastada para qualquer tamanho. O jogo desenha em um espaço lógico fixo 16:9 que é escalado para a janela, então a área de luta, o HUD e os menus ficam consistentes em todos os tamanhos e o tamanho da janela é independente da resolução do jogo. Com Manter proporção ligado, a sobra fica preta; desligado, a imagem é esticada e o mouse e o toque são mapeados de volta ao espaço esticado. A flag --res LxA continua definindo o tamanho inicial e tem prioridade sobre o valor salvo em window.

Linha de comando

FlagEfeito
--res 2560x1440Resolução da janela
--4kJanela 3840×2160
--fullscreenTela cheia
--touchForça os controles de toque
--muteSem áudio
--shots <pasta>Tour automático salvando capturas
--shots-audioAtiva som durante o tour de capturas; --mute continua tendo prioridade
--versionMostra a versão
--check-updateMostra se existe release mais nova e sai
--updateBaixa, verifica e instala a release mais nova, depois sai
--no-auto-update / --no-update-checkMantém só o aviso, sem pergunta / não procura atualização

Variáveis de ambiente

VariávelEfeito
UME_MUGEN_DIRPasta de conteúdo M.U.G.E.N alternativa
UME_MARKET_HOMEPasta dos downloads e do estado do mercado
UME_GITHUB_TOKEN / GITHUB_TOKENToken opcional do GitHub para o mercado (aumenta o limite da API)
UME_NO_UPDATE_CHECK=1Não procura atualizações
UME_NO_AUTO_UPDATE=1Mantém o aviso, mas nunca pergunta, baixa ou instala
UME_NOFX=1Desliga a camada animada dos cenários (teste de desempenho)
UME_TOUR=mugen + UME_CHARS=a,b + UME_STAGE=<id>Com --shots, fotografa lutadores importados

Idioma e localização

A interface traz três idiomas: inglês (padrão), português (Brasil) e espanhol. Configurações › Idioma alterna em tempo real e grava lang=en|pt|es em ultimate-mugen.cfg.

  • src/i18n/catalog.rs guarda a tabela por chave (inglês e português) e src/i18n/es_catalog.rs a coluna em espanhol; i18n::t(chave) procura idioma atual → inglês → nome da chave.
  • Textos avulsos usam i18n::tr3(pt, en, es); o antigo i18n::tr(pt, en) acha o espanhol em src/i18n/es_phrases.rs, indexado pelo texto em inglês. Marcadores usam i18n::fill("{nome}", &[("nome", valor)]).
  • Uma chave ausente é impressa uma única vez no log (i18n: missing key '<key>').
  • Ainda só em português: cutscenes e diálogos do modo história, biografias dos lutadores e nomes dos cenários (dados de conteúdo).
  • No primeiro uso (sem configuração salva) o idioma do sistema é escolhido: navigator.language na web, LC_ALL/LC_MESSAGES/LANG no desktop; inglês quando não houver suporte.

Importar conteúdo M.U.G.E.N

Menu principal › Importar M.U.G.E.N é o único ponto de entrada. Na web o botão abre o seletor de arquivos do navegador (a página sobrepõe um <label> invisível exatamente sobre o botão, para o clique ser um gesto real do usuário) e também dá para soltar .zip na janela. No desktop o botão abre o diálogo de arquivos do sistema (PowerShell no Windows, osascript no macOS, zenity ou kdialog no Linux); pastas em chars/ e stages/ continuam sendo lidas ao iniciar.

Controles

AçãoTeclado P1Teclado P2GamepadToque
MoversetasI K J LD-pad / analógicoanalógico virtual
Socos x y zQ W ENum 4 5 6□ △LP HP
Chutes a b cA S DNum 1 2 3✕ ○LK HK
Especiais rápidosV B NNum 7 8 9—ESPECIAL, SUPER
Atalhos de golpe (slots 1-4)1 2 3 4—L1, L2, R1, R2—
Despertar (transformar)TNum 0L3 + R3 / SELECT—
Troca (modo Tag)FNum EnterL3 + R3 / SELECTbotão de despertar
Carregar kiRNum DecimalR3 (sozinho) / START—
Pausa / hitboxesEsc / F2Esc / F2START❚❚
Tela cheia / FPSF11 / F3———

Os nomes x y z a b c são os mesmos usados nos comandos (input) dos personagens.

No pulo, x y a b lançam um golpe aéreo cada, e baixo + b é o chute para baixo (gerado para todo lutador nativo por native/air_normals.rs, reaproveitando as animações aéreas do próprio lutador).

Atalhos de golpe

No menu de pausa, escolha um golpe na lista e aperte 1-4 (ou L1, L2, R1, R2 no gamepad) para ligá-lo àquele slot. Apertar o mesmo slot de novo limpa o atalho. Depois disso, o golpe sai com um único toque, com o movimento e os botões certos executados por você. As ligações ficam por lutador em ultimate-mugen.shortcuts, ao lado do executável.

Botões na tela

A lista de golpes da pausa e a tela de Controles mostram a tecla ou o botão real do último dispositivo usado: teclado, Xbox (A/B/X/Y, LB/LT/RB/RT) ou PlayStation (✕ ○ □ △, L1/L2/R1/R2). Em telas de toque aparecem os nomes dos botões virtuais. Controles Xbox são detectados pelo nome ou pelo vendor ID 045E, PlayStation pelo 054C. A vibração funciona nos dois: Xbox via force feedback do gilrs (e Gamepad API na web), DualShock 4 / DualSense via relatórios HID diretos.

Tweaks (tweaks.toml)

Criado ao lado do executável na primeira execução (localStorage na web) com os padrões. Edite e salve: o jogo recarrega em cerca de um segundo e mostra um aviso. Erros nunca param o jogo; o valor afetado mantém o padrão e o aviso e o log citam a chave, com dica "você quis dizer" e a linha em erros de sintaxe.

SeçãoChaveEfeito
[theme]backgroundCor base do fundo do menu
[theme]glow_bottom, glow_left, glow_rightBrilhos de luz do menu
[theme]preset"default", "emerald", "sunset" ou "mono": define de uma vez o fundo, os brilhos, os cinco papéis abaixo, a barra de vida e as cores dos lados. Qualquer outra chave do arquivo continua valendo sobre o preset
[theme]accentCor de seleção: destaque do menu principal, botões da pausa e das configurações, controles deslizantes
[theme]title, info, muted, textTítulos e valores (dourado), dicas e links (ciano), texto secundário e texto comum, em todos os menus e no HUD
[hud]life, life_low, damagePreenchimento da barra de vida, a cor abaixo de 25% de vida e o trecho de dano que escorre. O topo de cada degradê é derivado da cor
[music]fightArquivo de áudio tocado em toda luta no lugar do tema embutido (.ogg, .mp3, .wav, .flac). Caminhos relativos à pasta do tweaks.toml. Só no desktop
[music]<id do cenário> (dojo, neon, bamboo, volcano, brazil, ...)Arquivo de áudio daquele cenário; vale sobre fight e sobre a música do próprio cenário
[hud]p1_tint, p2_tintCor de destaque das barras por lado
[hud]bar_offset_yDesce as barras de vida (-4 a 40)
[accessibility]hud_opacityMultiplicador de opacidade do HUD (0.3 a 1.0)
[accessibility]colorblindtrue usa azul/laranja nas cores dos lados em vez dos tons padrão
[accessibility]hud_scaleMultiplicador do tamanho do HUD (0.8 a 1.25)
[accessibility]reduce_motiontrue desliga o tremor da tela
[accessibility]title_crtfalse desliga o chiado e as scanlines de TV CRT na tela de título; com reduce_motion = true ficam só scanlines estáticas

Por padrão o controle mostra só os seis botões de ataque e o direcional. O botão pequeno + abre os botões extras (despertar, carregar, golpes rápidos, troca, ataques do terceiro lutador, defesa) e x fecha. O controle esmaece para 30% da opacity após 2,5 s sem toques e respeita as áreas seguras (notch e barra inferior) nos celulares. | [rules] | rounds_to_win (1-9), round_seconds (0 = sem limite, até 999), life_percent (10-500), game_speed (0.5-2.0) | Sobrescrevem os valores do menu Settings em toda luta; remova a linha para voltar ao valor do menu | | [menu] | arcade, story, survival, cpu, versus, training, watch, team_seq, team_simul, team_tag, mugen, market, controls, settings, replays, quit | Texto dessa entrada do menu principal |

Cores são "#rrggbb" ou "#rgb". Exemplo de um visual próprio completo:

[theme]
preset = "mono"
accent = "#7a3cff"
title = "#b8ff5c"

[hud]
life = "#5cc8ff"
life_low = "#ff5ca8"
damage = "#7a3cff"

[menu]
arcade = "Fliperama"

[music]
fight = "music/meu-tema.ogg"
dojo = "music/dojo.ogg"

Capturas de todos os presets ficam em screenshots/themes/ (UME_TOUR=themes). Plano e comparação com outras engines: docs/research/customization-comparison.pt-BR.md.

Container de Sprites (LZ4)

Todo bloco de pixels que o engine guarda para usar depois é comprimido com LZ4, com uma regra só para os dois tipos de lutador. Os decoders são Rust puro (lz4_flex, modo seguro, compila para wasm32), o formato não perde nada e o PNG continua como formato de criação.

Formatos

MagicContémGerado porLido por
UML1um sprite: indexado (8 bits + paleta) ou RGBAume-tools pack-sprites (packs web dos lutadores)ume_formats::lz4_sprite, carregador de sprites de ume_native
UMSFum .sff inteiro: paletas, tabela de sprites, um bloco UML1 por buffer de pixels distintoume-tools cook-sffume_formats::sff::decode_sff e decode_sff_only

Os leitores reconhecem o magic, então PNG, .sff clássico e arquivo cozido são intercambiáveis sob o mesmo nome. Um arquivo cozido pode substituir o .sff original na pasta ou no zip do personagem.

Layout UML1 (little endian)

"UML1"  tipo u8 (0 RGBA, 1 indexado)  cores u16  largura u16  altura u16
recorte x u16  y u16  largura u16  altura u16
paleta: cores * 4 bytes (RGBA), só no indexado
bloco LZ4 dos pixels recortados (ausente quando o recorte é vazio)

O recorte remove só a borda exatamente zero (índice 0, ou RGBA 0,0,0,0), então a decodificação devolve todos os bytes. Cor escondida sob alfa zero no resto da imagem é mantida.

Layout UMSF

Cabeçalho "UMSF", versão u8 (1), versão do sff u8, 2 bytes zero; depois paletas únicas, tabela de paletas (grupo, índice, referência), blocos (UML1 sem paleta) e a tabela de sprites (grupo, índice, eixos, largura, altura, palette_index, referência de paleta e de bloco; u32::MAX = nenhum). Sprites que compartilhavam um buffer no .sff decodificado (links) compartilham um bloco e voltam como um Arc só. Os blocos decodificam em paralelo por ume_formats::par::map (uma thread no wasm32) e decode_sff_only pula os blocos dos sprites não pedidos.

Limites

Um sprite tem no máximo 8192 px por lado e 16 Mpx, e um arquivo UMSF pode declarar no máximo 512 Mpx de sprites pedidos. Contagens e tamanhos são checados contra o tamanho do arquivo; arquivo truncado ou corrompido devolve erro e nunca dá panic.

Comandos

cargo run --release -p ume-devtools --bin ume-tools -- cook-sff in.sff out.sff
cargo run --release -p ume-devtools --bin ume-tools -- pack-sprites web/dist

cook-sff decodifica o original, cozinha, decodifica o resultado e falha se alguma paleta ou sprite (pixels, eixos, paleta, links) for diferente.

Medições

62 personagens M.U.G.E.N. reais do mugen-assets (54.382 sprites), uma thread, blocos por sprite: LZ4 decodifica ~1,5 GB/s de pixels indexados, 28 µs por sprite contra 61 µs do decode RLE8/LZ5 original. Totais, .sff original contra UMSF: 853,6 MB contra 624,1 MB, decode de 2,30 s contra 1,42 s com o número padrão de workers. A comparação com zstd, PNG8, QOI e deflate está no ADR 0009.

Adicionar conteúdo M.U.G.E.N

Personagens

  1. Coloque a pasta em mugen/chars/<nome>/ com o .def dentro, ou jogue o .zip direto em mugen/.
  2. Abra o jogo: o personagem aparece na seleção. Tab filtra entre todos, originais e M.U.G.E.N.

Use Menu principal › Importar M.U.G.E.N (o único botão de importação; na web abre o seletor do navegador, no desktop o diálogo de arquivos do sistema) ou arraste o .zip para a janela da web. A importação é idempotente: o mesmo arquivo, ou o mesmo lutador ou cenário encontrado de novo em outro caminho, nome ou caixa de letras, é registrado uma única vez (a identidade é um hash do .def normalizado mais o arquivo de sprites). Pacotes salvos no navegador por versões antigas são deduplicados automaticamente no próximo carregamento.

A tela mostra um mosaico de hologramas com todos os lutadores importados (F inclui também os nativos). Setas, controle ou toque movem o cursor, Enter ou clique abre a ficha: retrato, autor, série, .def de origem, versão, quantidade de paletas, nacionalidade e bio quando existem, medidores e a lista completa de golpes com comando e custo de energia (Esquerda/Direita trocam de lutador, Esc volta). Cima na primeira linha foca o botão de importar. Capture com UME_SHOTS_ONLY=mugenroster (UME_ROSTER_ZIPS=a.zip:b.zip importa pacotes antes).

Uma importação web mostra uma tela de carregamento em tela cheia desde o momento em que os arquivos são escolhidos até o último pacote ser registrado. Os arquivos são lidos, descompactados e registrados um por frame, com no máximo dois pacotes brutos aguardando na memória do wasm; um lote de pacotes grandes não roda mais em um único frame congelado. A mesma tela aparece na inicialização enquanto os pacotes salvos no IndexedDB são restaurados, um de cada vez.

Centenas de personagens são registradas sem decodificar tudo; só o que está sob o cursor é carregado, e um cache LRU limita a memória.

Antes de um personagem entrar na lista, o catálogo confere se cada arquivo que o .def cita em [Files] existe dentro da própria pasta do personagem (ou na raiz do pacote, ou em data/): sprite, anim e cns são obrigatórios. Quem falha na conferência vai para a quarentena: fica fora da seleção e o motivo é listado. Arquivos nunca são emprestados da pasta de outro personagem, então um .def copiado que aponta para os sprites de outro lutador não carrega esses sprites pelo nome. A conferência é estrutural (presença dos arquivos), rápida o bastante para a varredura de inicialização; um lutador cujos arquivos existem, mas cujas animações referenciam sprites faltando, continua carregando e aparece com os frames faltantes.

Abra Personagens MUGEN no menu principal para ver o resumo: quantos personagens carregaram, quantos estão em quarentena e os motivos mais comuns, além de uma galeria de todos os personagens carregados (retrato, nome e autor; ←/→ trocam de página) e a lista da quarentena (TAB alterna a visão; ESC volta).

Cenários

Coloque <nome>.def e o .sff em mugen/stages/, ou dentro de um .zip em mugen/.

O que é suportado

ItemSituação
.sff v1 e v2 (PCX, RLE8, RLE5, LZ5, PNG 8/24/32)Suportado
.air, .cmd, .cns, .st, .snd (WAV PCM 8/16 bits), .actSuportado
localcoord (personagens HD 720p)Suportado
~80 state controllers e mais de 100 triggersVer Scripts CNS
ReversalDef, HitOverride, RemapPal, SndPan, VictoryQuotePlanejado
[BGCtrl] em cenários, screenpacks, lifebars fight.def, fontes .fntPlanejado
Extensões do Ikemen-GO (ZSS, Map, Dizzy, Tag...)Planejado

Validar um personagem

cargo run --release -p ume-engine --example mugen_check -- mugen/chars/kfm
cargo run --release -p ume-engine --example sprite_audit -- mugen/chars/kfm
cargo run --release -p ume-engine --example hover_check -- mugen/chars/kfm

cargo run --release -p ume-formats --example mugen_refs -- mugen/chars cargo run --release -p ume-formats --example mugen_lint -- mugen/chars cargo run --release -p ume-engine --example mugen_pairs -- --matrix mugen/chars cargo run --release -p ume-formats --example mkselectdef -- mugen > mugen/select.def


| Ferramenta | Mostra |
|---|---|
| `mugen_check` | Carrega e simula uma luta sem janela; lista erros de parse, estados inválidos e controladores, triggers e parâmetros não suportados (`--strict` falha neles); `--lint` adiciona checagens de fonte: parâmetros duplicados, valores inválidos de `trans`/`postype`/`space`, `persistent` em estados negativos, `[State N]` diferente do `[Statedef]`, linhas inválidas, chaves duplicadas em `[Command]`, ações `.air` duplicadas e vazias (`TRACE=1` lista cada linha) |
| `sprite_audit` | Sprites ausentes ou em branco referenciados pelo `.air` |
| `hover_check` | Lutador preso fora do chão (`TRACE=1` mostra as transições) |

Personagens com licença que proíbe redistribuição não devem ser commitados: `mugen/` é ignorada pelo git.

Contribuindo com o Ultimate MUGEN

English · Português (BR)

Obrigado por ajudar. Esta página leva você de um clone novo até um pull request aceito. A documentação completa é a wiki em https://juninmd.github.io/ultimate-mugen/wiki/.

Por onde começar

Compilar e rodar

git clone https://github.com/juninmd/ultimate-mugen
cd ultimate-mugen
cargo run --release

No Linux instale antes libudev-dev libasound2-dev libx11-dev libxi-dev libgl1-mesa-dev pkg-config. A versão para navegador é ./scripts/build-web.sh, servida a partir de web/dist.

Verificações antes do pull request

VerificaçãoComando
Testes Rustcargo test --workspace --release
Limite de 250 linhas por arquivonode scripts/file-size.mjs
Fronteiras entre cratesnode scripts/crate-boundaries.mjs
Testes dos scriptsnode --test scripts/*.test.mjs
Livro da wiki./scripts/build-wiki.sh (precisa de mdbook)
Smoke no navegador./scripts/build-web.sh e depois node scripts/web-smoke.js web/dist (Playwright)

Não rode cargo fmt --all: a árvore não está formatada e o comando reescreve arquivos sem relação. Formate só arquivos novos com rustfmt --edition 2021 <arquivo>.

Regras

  • Sem comentários no código; os nomes explicam a intenção. Explicações vão para a wiki.
  • Inglês é o idioma padrão de código, commits, issues e docs. O português fica em *.pt-BR.md e docs/wiki/pt-BR/; mantenha os dois em sincronia.
  • Um arquivo de código fica abaixo de 250 linhas. Arquivos que já passam do limite não podem crescer; veja Layout de arquivos.
  • crates/engine é determinístico: sem relógio, threads, aleatoriedade ou alocação dentro de Match::tick.
  • Respeite as fronteiras entre crates em Arquitetura; o CI aplica scripts/crate-boundaries.mjs.
  • Atualize docs/wiki/ quando mudar formato, controller, trigger, flag ou estrutura de pastas.
  • Mudanças de design relevantes ganham um ADR em docs/wiki/adr/.

Pull requests

  • O título deve ser tipo(escopo)?: descrição com tipo em feat|fix|perf|refactor|docs|test|build|ci|chore|style|revert; o commit-lint rejeita o resto.
  • Um PR trata de um assunto. Coloque lógica nova em arquivo novo e ligue com uma linha nos arquivos compartilhados, para PRs paralelos não colidirem.
  • Inclua prints ou GIFs (antes e depois) para qualquer mudança visível e o resultado do smoke no navegador para mudanças de jogo, renderização, carregamento ou entrada.
  • Os releases são automáticos a partir dos tipos de commit no master; feat é minor, fix e perf são patch.

Agradecimentos

O Ultimate MUGEN é inspirado no M.U.G.E.N da Elecbyte e no Ikemen GO. Mantenha esse crédito respeitoso em docs e discussões.

Controle virtual (web, celulares e tablets)

A versão web mostra um gamepad na tela em todo aparelho com toque: analógico à esquerda, oito botões de ataque (X Y Z ESP / A B C SUPER) e uma fileira com VOLTAR, OK, DESP. e II (pausa) à direita. Ele é desenhado com formas simples de HTML e CSS (sem sprites) em web/vpad.js, acima do canvas, e fica visível em todas as telas: título, menus, seleção, VS, luta, pausa e história.

Como funciona

  • Cada dedo é rastreado pelo pointerId: o analógico e vários botões podem ser segurados ao mesmo tempo, e um dedo pode deslizar de um botão de ataque para outro.
  • O próprio navegador decide qual botão foi tocado, então tamanho do canvas, densidade de pixels e escala de render não mudam onde o toque cai.
  • O motor lê o controle uma vez por quadro com ume_vpad_poll() (bits da luta) e ume_vpad_nav() (OK/VOLTAR/START dos menus). O analógico e A/B também navegam nos menus, como um gamepad físico.
  • Um toque mais curto que um quadro ainda vale por dois quadros.
  • Os dedos são soltos em pointerup, pointercancel, lostpointercapture, perda de foco, aba escondida e pagehide. Um toque longo (contextmenu) não solta nada.
  • O controle liga quando o aparelho informa toque (maxTouchPoints, ontouchstart, pointer: coarse) ou no primeiro toque, e nada o esconde depois. ?touch=1 força no desktop.

Depurar num celular de verdade

Abra o jogo com ?debug=1. Uma caixa no canto superior esquerdo mostra se o controle está ligado, a densidade de pixels, a viewport, os dedos segurados, os bits enviados ao motor e as contagens de pointerdown, pointerup e pointercancel.

Testes

node scripts/web-vpad-smoke.js web/dist roda a build web real no Chromium com multitoque real (Input.dispatchTouchEvent): confere o controle visível e sem obstrução em cada tela, navega menu, seleção e cenários só pelo toque, anda, pula, ataca segurando o analógico, segura três dedos ao mesmo tempo, solta um dedo sem perder o analógico, pausa e volta. VPAD_DEVICE escolhe o aparelho (padrão Pixel 7 landscape; a CI também roda Pixel 7 em retrato e iPhone 13 landscape). VPAD_SHOTS=<pasta> salva prints.

Criar um cenário (guia rápido)

English · Português (BR)

Há três tipos de trabalho com cenários. Escolha o que você precisa:

Você querPrecisa de código?Vá para
Um fundo novo com a sua arte, no formato M.U.G.E.NNãoCenário M.U.G.E.N
Mais conteúdo em um dos cinco cenários do modo história (objetos, música, céu animado)NãoCenários do modo história
Um cenário novo no modo história ou um cenário embutido novoSim, RustO que precisa de código

1. Um cenário M.U.G.E.N

  1. Coloque dois arquivos em mugen/stages/: meu-cenario.def e meu-cenario.sff (a arte).
  2. Parta de docs/examples/stage/my-stage.def.

O .def é texto simples com seções:

SeçãoO que definir
[Info]name, displayname, author
[Camera]startx, boundleft, boundright (até onde a câmera vai), boundhigh, boundlow, verticalfollow, tension
[PlayerInfo]p1startx, p2startx (onde cada lutador começa)
[StageInfo]zoffset (altura da linha do chão na tela), localcoord (tamanho de desenho, por exemplo 320, 240)
[BGdef]spr: o arquivo .sff
[BG nome]Uma seção por camada (veja abaixo)

Cada camada de fundo:

[BG Sky]
type = normal          ; normal (um sprite) ou anim (uma ação do arquivo .air)
spriteno = 0, 0        ; grupo, imagem do .sff
layerno = 0            ; 0 = atrás dos lutadores, 1 = na frente
start = 0, 0           ; posição em unidades locais
delta = .2, .2         ; paralaxe: 1, 1 anda junto com o chão; menor anda mais devagar
tile = 1, 0            ; repete em x, em y (0 = sem repetir)

Todas as chaves do formato, incluindo escala, rotação e janelas de recorte, estão na referência de cenários.

O texto depois de ; é comentário. Os nomes das chaves são os do M.U.G.E.N, então um cenário copiado de um pacote M.U.G.E.N é um bom ponto de partida.

Limites deste caminho: o céu animado em loop, as faixas do modo história, os quebráveis e a música por cenário das próximas seções não se aplicam a cenários M.U.G.E.N.

2. Cenários do modo história

O modo história tem cinco cenários: brazil, neon, bamboo, volcano e dojo. Cada um pode ser estendido com dados:

O queOndeObservações
Faixa de fundoassets/stages/story/<cenário>.pngUm segmento por luta (quatro ondas e o chefe). Regere com python3 tools/story_segments.py
Fundo animadoassets/stages/animation/<cenário>/Oito quadros-chave opacos de 1672×941 (00.png a 07.png) e oito quadros intermediários -mid.png. A animação avança a cada quatro ticks e completa o ciclo em 64 ticks. Mantenha a câmera e o piso alinhados durante todo o loop.
Quebráveis, comida, fase bônusassets/story/objects.toml, tabela [stages.<cenário>]Formato completo em Objetos de cenário
Música da lutatweaks.toml, seção [music], chave <id do cenário>Caminho para .ogg, .mp3, .wav ou .flac, relativo ao tweaks.toml. Só no desktop. Veja Configuração

Exemplo de tweaks.toml:

[music]
fight = "music/minha-luta.ogg"   ; toda luta sem trilha própria
dojo = "music/dojo.ogg"          ; vence o fight, só no dojo

Exemplo de entrada em objects.toml:

[stages.dojo]
objects = [
  { fight = 0, kind = "crate", x = -78.0, lane = -22.0, drop = "apple" },
]

Confira com o tour de evidências: UME_TOUR=storyobjects e UME_TOUR=storyloop (veja Objetos de cenário).

Loops contínuos, tamanho e interatividade dos cenários embutidos

  • Loop contínuo a 60 FPS: os cenários animados embutidos (assets/stages/animation/<id>/00.png..07-mid.png) são decodificados em paralelo (ume_formats::par::map) e fazem cross-fade suave entre quadros consecutivos em um ciclo fechado de 96 ticks (loop_sample), eliminando saltos no retorno do último quadro para o quadro 0.
  • Arenas ampliadas: os cenários embutidos agora cobrem de bound_left = -680 a bound_right = 680 (bound_high = -140, zoom_out = 0.62, zoom_in = 1.05) com paralaxe panorâmica 0.21 em illustration_layout.
  • Piso reativo e objetos interativos: todos os 21 cenários ilustrados (incluindo brazil e as 14 Maravilhas do Mundo via StageKind::Arena) renderizam rachaduras, marcas de impacto, ondas e destroços do StageReact. Em lutas Versus/Arcade, src/stages/interactive.rs posiciona caixas destrutíveis e barris explosivos (ObjectEvent::Blast) nas alas externas (|x| >= 220, mantendo o centro da arena limpo); lutadores arremessados contra objetos os destroem e ambos os lados podem coletar itens (any_collector = true). Use UME_STAGE_PROPS=0 para desativar os objetos de arena.

3. O que precisa de código

Estas coisas não podem ser feitas só com arquivos hoje. Cada uma é uma lacuna do formato, não erro nos seus arquivos:

  • Um cenário embutido novo. Cenários nativos são funções Rust em src/stages.rs (builtin()). Um novo precisa de código, de um PNG embutido e de uma miniatura. Veja Criar cenários.
  • Um cenário novo no modo história. A lista de cenários é fixa em src/stages/story_strip.rs (STORY_ARENAS), e os dados do modo história em src/story/stages.rs.
  • Céu animado para um cenário M.U.G.E.N. Os quadros do loop são lidos só para os ids de cenários embutidos.
  • Seção [Music] em um .def. A música por cenário vem só do tweaks.toml.
  • Camada type = parallax. Planejada, ainda não existe no formato.

Teste

cargo test --release -p ume-engine --test it wiki_examples::
UME_SHOTS_ONLY=stages cargo run --release -- --shots out/   # capturas de todos os cenários

O primeiro comando confere as seções do .def de exemplo. O segundo salva capturas dos cenários em out/.

Próximos passos

Referência de cenários · Objetos de cenário · Modo história · Criar um personagem · Início da wiki

Criar um personagem (guia rápido)

English · Português (BR)

Este é o caminho curto. Você faz um lutador funcionando em cerca de dez linhas e depois o expande. Todos os campos estão na referência completa do UMF.

1. Comece de um lutador que já funciona

Um arquivo UMF pode herdar um lutador inteiro com extends. O seu lutador recebe os atributos, a arte, as animações e os golpes do pai, e você escreve só o que muda.

Copie este arquivo para umf/hello.json (ou use o pronto em docs/examples/umf/hello-fighter.json):

{
  "format": "umf/1",
  "id": "hello",
  "name": "Hello Fighter",
  "author": "você",
  "color": "#2a9d8f",
  "extends": "kaito",
  "palettes": [{ "top": "#2a9d8f", "trim": "#16544d" }],
  "moves": [{ "id": "gale", "name": "Sky Gale", "cost": 500 }]
}

O que cada linha diz:

LinhaSignificado
formatSempre umf/1
idÚnico, minúsculo, sem espaços. É também o nome interno do arquivo
name, author, colorO que a tela de seleção mostra. color é a cor do cartão
extendsHerda tudo de kaito (vale qualquer lutador ou kit carregado)
palettesRecoloração. As chaves são os nomes de cor da arte do pai (top, trim, hair)
movesAltera um golpe pelo id. Aqui gale mantém os comandos e ganha outro nome e custo

2. Onde colocar o arquivo

  • Ao lado do jogo: coloque em umf/. Não precisa recompilar.
  • Ou aponte uma pasta com UME_UMF_DIR=/caminho/da/pasta.
  • Dentro do jogo: coloque em assets/chars/, adicione o id em assets/chars/index.json se quiser uma ordem fixa na seleção, e rode cargo run --release.

Abra o jogo e escolha Treino para testar. Aperte F2 para mostrar as caixas de golpe.

3. Adicione um golpe novo

Os golpes são pareados pelo id, então você pode adicionar, alterar ou remover qualquer um:

"moves": [
  { "id": "gale", "name": "Sky Gale", "cost": 500 },
  { "id": "slide", "remove": true },
  {
    "id": "crest", "name": "Crest Kick", "input": "F, F, b",
    "kind": "special", "anim": "gale",
    "hits": [{ "at": 3, "damage": 80, "level": "heavy", "launch": true }]
  }
]
  • input usa a sintaxe de comandos: D, DF, F, x é o quarto de círculo mais x; x+y significa as duas teclas juntas.
  • kind é normal, special ou super. Um normal cancela em especiais e supers ao acertar ou bloquear.
  • anim precisa ser o nome de uma animação do pai (gale aqui). Animações próprias vão em "anims".
  • hits[].at é o quadro em que o golpe fica ativo. damage é o dano.

Mais: golpes, hits e sintaxe de comandos.

4. Dê a sua cara

  • Só cores: altere palettes, ou adicione awakeningPalette para a transformação.
  • Atributos: "stats": { "life": 1080, "attack": 104 } muda um número e mantém o resto.
  • Sprites: sua arte em pixel vai em assets/chars/sprites/<id>/. Veja Importação de sprite atlas e Quadros de efeito.
  • Perfil: nacionalidade e uma biografia curta em inglês, português e espanhol. Veja Perfil.

5. Teste antes de jogar

cargo test --release -p ume-engine --test it wiki_examples::
cargo test --release --test it native_roster_lab:: -- --nocapture

O primeiro comando confere os exemplos deste guia. O segundo roda todos os ataques do elenco e mostra dano e alcance.

Não é um lutador UMF?

  • Personagens M.U.G.E.N (.def, .sff, .cns) vão em mugen/chars/ e rodam sem mudanças. Veja Personagens e Scripts CNS.
  • Lutador sem sprites: não é suportado. Todo lutador é desenhado por PNGs em pixel art, como os personagens M.U.G.E.N; não existe fallback procedural.

Próximos passos

Referência completa do UMF · Reuso com kits · Criar um cenário · Início da wiki

Decisões de compatibilidade

Esta página registra o que a engine deliberadamente não implementa, para que autores de personagens e cenários tenham uma resposta clara em vez de uma falha silenciosa.

State controllers de módulo

A camada de módulos/motif do Ikemen é triada em grupo. Nenhum destes está implementado; o verificador de compatibilidade os reporta como controllers não suportados.

ControllerDecisãoMotivo
StoryboardPlanejadoDepende do runtime de screenpack/storyboard; anda junto com o trabalho de screenpacks
DialoguePlanejadoMesmo runtime do Storyboard
MatchRestartPlanejadoDepende das opções de regras e de um reinício determinístico
LifebarActionPlanejadoDepende do renderizador de lifebars do fight.def
ChangeMovelistPlanejadoPrecisa de uma move list por luta; a lista de debug é somente leitura hoje
LoadFileRejeitado por decisãoPersonagens rodam dentro de uma luta determinística; leitura de disco por script não é permitida
SaveFileRejeitado por decisãoMesma regra de sandbox do LoadFile
SaveStateRejeitado por decisãoA engine não tem snapshot de rollback; reproduzir o stream de inputs é o caminho suportado
LoadStateRejeitado por decisãoIgual ao SaveState
ShaderSetRejeitado por decisãoShaders fazem parte do renderizador, não do conteúdo do personagem

A lista REJECTED_CONTROLLERS em crates/engine/src/diagnostics.rs é usada pelo relatório de carga: esses nomes aparecem como (rejected by design) no detalhe, enquanto os planejados aparecem apenas como não suportados.

Cenários 3D

Cenários glTF são rejeitados por decisão. O loader de cenário detecta o pedido de modelo ([Model], model = *.glb, [StageInfo] scene = ...), avisa uma vez por cenário e renderiza as camadas 2D normais. Não existe fallback para cenários que só tenham modelo 3D.

Música de tracker

Música xm, it, mod e s3m é rejeitada por decisão por enquanto. O backend de áudio decodifica ogg/vorbis, mp3, flac e wav; uma faixa não suportada gera aviso e a luta continua com a música embutida em vez de ficar muda.

Desvios de física intencionais

ComportamentoM.U.G.E.NUltimate MUGENMotivo
Estado de hit aéreo com physics = NSem gravidade: um lutador atingido por golpes repetidos com yvel = 0 fica suspenso no arO lutador cai, como se o estado tivesse gravidadeImpede que lutadores flutuem enquanto um projétil continua acertando. Estados de ataque com physics = N (golpes de voo e pairar) mantêm a altura programada.

Desafios de Combo

O modo treino mostra uma escada de sete metas de combo acima da arena. Funciona com qualquer lutador, nativo ou M.U.G.E.N, porque só lê os contadores de combo que o motor já mantém.

#Meta
13 acertos
25 acertos
38 acertos
425% da vida do rival em um combo
56 ou mais acertos terminando com super (ao menos 1000 de energia gasta)
610 ou mais acertos sem gastar barra
745% da vida do rival em um combo

O combo é avaliado quando termina. As metas são cumpridas em ordem, um aviso mostra DESAFIO CUMPRIDO e o progresso é salvo por lutador em trials.json (ao lado da configuração, ou no armazenamento do navegador na versão web). Ao terminar a escada aparece TODOS OS DESAFIOS CONCLUÍDOS.

Como funciona

  • src/trials.rs: Tracker puro, alimentado a cada quadro com combo_count, combo_damage e power do jogador e life_max do rival. Guarda a energia no início e o mínimo durante o combo para saber se houve gasto de barra.
  • src/app/trials_hud.rs: lê a partida após cada tick (sem alterá-la) e desenha o painel; some na pausa, em replays e fora do treino.
  • Tracker::demo substitui a amostra real e existe só para o tour de prints: UME_SHOTS_ONLY=trials.
  • Custo: uma atualização de struct por quadro só no treino, sem alocação.

Desempenho

English · Português (BR)

Como a engine mantém o carregamento rápido e os quadros estáveis, e como medir.

Carregamento

EtapaO que aconteceThreads
Decodificação SFF v1Cabeçalhos de subarquivos escaneados; payloads PCX decodificados em paralelo entre núcleos; sprites ligados compartilham pixels de origem (Arc)Todos os núcleos (máx. 32)
Decodificação SFF v2Os cabeçalhos são lidos em ordem; os dados LZ5, RLE5, RLE8 e PNG são decodificados em paralelo; sprites ligados compartilham os pixels de origem (Arc)Todos os núcleos (máx. 32)
Importação e Descompressão ZipDiretório central escaneado, entradas descompactadas em paralelo com barra visual de progresso ZipProgress e indicador de threads de hardwareTodos os núcleos (máx. 32)
Sprites do personagemA conversão paleta para RGBA roda em paralelo, uma vez por buffer de pixels e paleta únicos; sprites ligados compartilham um ImageData e, portanto, um único upload na GPUTodos os núcleos (máx. 8)
Sprites do cenárioMesma conversão RGBA em paralelo; o buffer RGBA é movido para o cenário, nunca copiadoTodos os núcleos (máx. 8)
Cache e reuso de cenáriossrc::registryInstâncias de MugenStage são cacheadas entre a prévia de seleção e o início da luta em StageEntry, reduzindo o carregamento do cenário de ~30 ms para 0,0 ms
Parsing de cenário em passada únicaume_formats::stageO .def do cenário é processado uma única vez com parse_ini_no_lines e compartilhado com a detecção de modelos 3D, eliminando passadas duplicadas e alocações de linhas
Cache de estados comunsume_engine::commoncommon_def() cacheado via OnceLock<Arc<CharDef>>, eliminando ~4 ms de parsing duplicado de common1.cns por partida
Parsing CNS e CMD em passada únicaume_engine::loader, cnsSeções processadas uma única vez com parse_ini_no_lines e compartilhadas entre constantes e estados; evita passadas redundantes de INI
Cache de bytecode de expressões e parâmetrosume_engine::chardefsafe_expr e Param::new cacheiam AST e bytecode compilados para triggers e parâmetros idênticos via armazenamento thread-local
Consultas INI sem alocaçãoume_formats::iniSection::get e find_section usam eq_ignore_ascii_case evitando alocações no heap; strip_comment atalha linhas sem comentário
Retratos da tela de seleçãoload_mugen_portrait decodifica só os sprites 9000,0, 9000,1 e o primeiro quadro parado (mais as origens dos links) via decode_sff_only1
Sprites e efeitos nativos (UMF)Cada quadro único é decodificado ou rasterizado em paraleloTodos os núcleos (máx. 8)
Personagem inteiroCarregado numa thread char-load enquanto a tela de VS aparece1 thread em segundo plano

O auxiliar é ume_formats::par::map. Na web (wasm32) ele roda na própria thread, pois o build do navegador não tem threads.

Quadros estáveis

TécnicaOndeEfeito
Ritmo de quadrosume_shell::PacerTempos de quadro a até 4% de uma taxa de atualização comum (30 a 240 Hz) viram o período exato; a sobra é devolvida quando soma um período inteiro, então o tempo de jogo segue o tempo real. Com vsync, isso dá exatamente um tick de 60 Hz por quadro, sem alternar entre 0 e 2
Passo fixoSession::updateSimulação a 60 Hz com tolerância mínima e no máximo 5 ticks por quadro (sem espiral de atraso)
Pré-carga de texturasGfx::prefetch, Texture2D::prefetchOs sprites dos lutadores sobem para o atlas no início da luta (até 50% do atlas), então o primeiro especial não faz upload no meio da partida
Pré-aquecimento de sonsAudio::preload_matchTodos os sons dos lutadores são decodificados em paralelo na tela de VS; sons de personagens que saíram da partida são liberados
VM de bytecodeume_engine::bytecodeExpressões CNS/ZSS compilam para uma VM em pilha fixa ([f64; 32]) com redirecionamentos inline (parent, root, helper, enemynear), intrínsecos matemáticos, triggers de 0/1 argumento, CmpStr, Special (animelem, timemod) e atribuições :=
Caminhos críticos sem alocaçãocommands, matchs, triggers, ai, ikemenChaves de comando em Arc<str>, verificação ASCII de HitDefAttr sem alocação, buffers reutilizáveis de colisão Clsn1/Clsn2 (fill_boxes), seleção de golpes da IA em duas passagens e RefCell::get_mut evitam alocações no heap a cada tick
Caminho rápido de batch de quadsume_render::Batch, ume_shell::quadpush_quad_verts dedicado insere índices contíguos de quad sem mapeamento por iterador; coordenadas de quad sem rotação evitam trigonometria (sin_cos)
Caminhos críticos sem alocaçãocommands, matchs, triggers, ai, ikemenChaves de comando em Arc<str>, verificação ASCII de HitDefAttr sem alocação, seleção de golpes da IA em duas passagens e RefCell::get_mut evitam alocações no heap a cada tick
Atalho de paleta identidadeume_engine::paletteA verificação is_identity() pula trigonometria flutuante, multiplicações e clamp em paletas intocadas, além de atalho em PalParams::combine e lote em apply_slice
Caminhos críticos sem alocaçãocommands, matchs, triggers, ai, ikemenChaves de comando em Arc<str>, verificação ASCII de HitDefAttr sem alocação, buffers de rascunho de colisão (fill_boxes, fill_proj_boxes), array de pilha para projéteis congelados, explods remove_on_get_hit pré-filtrados e RefCell::get_mut evitam alocações no heap a cada tick
Caminhos críticos sem alocaçãocommands, matchs, triggers, ai, ikemenChaves de comando em Arc<str>, verificação ASCII de HitDefAttr sem alocação, índices de alvos em array de pilha, persistência em vetor linear, avaliação de parâmetros num_opt em passagem única e RefCell::get_mut evitam alocações no heap a cada tick
Caminhos críticos sem alocaçãocommands, matchs, triggers, ai, ikemenChaves de comando em Arc<str>, verificação ASCII de HitDefAttr sem alocação, rel_dirs sem desvios condicionais, verificação de botões recentes em ciclo único por operação bitwise e RefCell::get_mut evitam alocações no heap a cada tick
Limites de resiliênciaume_formats, ume_engine::matchsDecodificadores de imagem rejeitam cabeçalhos acima de MAX_IMAGE_PIXELS (1 << 26) antes de alocar; partidas limitam helpers (60), explods (512), projéteis (256) e textos (128)

Memória de GPU

TécnicaOndeEfeito
Paleta no shaderGfx::sprite_tex, IndexedTexture, PaletteSprites M.U.G.E.N com pixels indexados vão para o atlas de índices de 8 bits e são coloridos por uma linha de paleta no shader: 4x menos upload e espaço de atlas que RGBA. RemapPal troca a linha de paleta em vez de gerar uma nova imagem RGBA
Reinício separado dos atlasume_shell::quadO atlas RGBA (UI, texto, sprites true-color) e o atlas de índices (+ linhas de paleta) reiniciam cada um por conta própria quando enchem, então encher um nunca obriga o outro a refazer uploads
Caminhos rápidos da composiçãopost.wgsl fs_compositeSem desfoque radial o passe em resolução total usa 1 amostra por pixel (3 com aberração cromática) em vez de 21, e painéis de vidro pulam pixels fora do alcance da sombra. Saída idêntica; tempo de quadro em GPU por software em UME_TOUR=perf caiu de 44 ms para 25 ms

Medindo

ComandoMede
cargo run --release -p ume-engine --example mugen_load_bench [zip] [execuções]Tempo de carga de personagem M.U.G.E.N (padrão: elecbyte.zip embutido)
cargo run --release -p ume-engine --example load_benchTempo de compilação nativa (UMF)
cargo run --release -p ume-engine --example tick_bench -- [zip_ou_dir] [segundos] [por_lado]Taxa de simulação (ticks/s) e percentis de latência (p50, p99, max, % do orçamento de 16,6 ms)
cargo test -p ume-engine --release --test it tick_alloc::Zero alocações por tick de simulação
cargo test -p ume-formats --release --test it fuzz_resilience::Fuzzing por mutação em decodificadores SFF v1/v2, SND, PCX, PNG, FNT, RLE8/RLE5/LZ5, AIR e INI
cargo test -p ume-engine --release --test it stress_resilience::Expressões CNS hostis, floods recursivos de helper/explod/projétil e estresse 4v4 simul
UME_TOUR=perf --shots <dir>Laço de quadro real de uma luta CPU vs CPU: percentis de simulação e desenho, vértices, draw calls, uploads/preenchimento do atlas e RSS, uma vez por segundo

Referência (release): kfm caiu de 48,3 ms para 3,5 ms (13,8x mais rápido), kfm720 de 60,1 ms para 7,8 ms (7,7x mais rápido). Taxa de simulação atinge 235.000+ ticks/s em p50 0,004 ms (0,1% do orçamento de frame).

Profile de quadros e memória

UME_TOUR=perf executa o App real (não um laço sintético) e imprime uma vez por segundo:

perf: 1s step p50 0.03 p99 0.11 max 0.21 · draw p50 0.09 p99 0.26 max 1.11 ·
frame p50 5.52 p99 5.75 max 5.84 ms · 1661 v 2.0 dc 0 up 143 KB ·
atlas 75%/0% · rss 379 MB

UME_PERF_SECONDS=<n> define a duração, UME_CHARS=a,b[,c,d…] escolhe os lutadores (quatro ou mais ids viram time paralelo) e UME_STAGE=<id> escolhe o cenário. UME_PERF_ROTATE=1 inicia uma luta para cada par nativo do roster e imprime o RSS após cada carga, expondo caches que nunca diminuem.

Medido a 1280×720 (Windows, 16 núcleos lógicos, release, vsync):

CenárioPasso p50Desenho p50Quadro p50RSS após carregar
Kaito vs Shion0,03 ms0,09 ms5,52 ms (vsync 180 Hz)380 MB
2v2 paralelo (4 lutadores nativos)0,05 ms0,13 ms5,52 ms533 MB

A simulação e a montagem do lote ficam muito abaixo de um quadro de 16,6 ms; o tempo de parede é a taxa do monitor. O que custa memória é a arte RGBA nativa: cada lutador nativo tem cerca de 90 MB de pixels descomprimidos a 720p. Três correções saíram desta passagem:

CorreçãoOndeEfeito
Compartilhar o buffer RGBA entre ImageData e Texture2Dchardef::ImageData, Texture2D::from_rgba_sharedRemove a segunda cópia completa de cada sprite nativo: o RSS de 1v1 caiu de 455 para 380 MB
Descartar o cache de texturas da GPU quando o roster mudaApp::warm_step (Gfx::trim(0))Sprites e arte do cenário da luta anterior são liberados; uma revanche mantém os atlas já preenchidos
Limitar definições nativas em cacheRegistry::trim_cache (CAP_NATIVE = 4)Percorrer o roster somava ~150 MB por luta e chegava a 1,3 GB após sete lutas; com o limite o cache guarda o par atual mais dois recentes e o time atual nunca é descartado

Percorrer o roster nativo também mostra o atlas ciclando: quatro lutadores deixam o atlas RGBA em 83%, então uma animação que precisa de um quadro novo dispara um reset e reenvia só os sprites em tela (rajadas de algumas centenas de KB, pior quadro de desenho 1,4 ms). A arte M.U.G.E.N indexada não paga esse custo porque vive no atlas de 8 bits.

Web (wasm)

TécnicaOndeEfeito
ControlFlow::Wait na webume_shell::runO Poll do winit gira um laço postTask/AbortController ao lado do requestAnimationFrame; o profile mostrou cerca de 75% do tempo da main thread (mais GC) gasto aí. Os redraws são auto-solicitados, então Wait basta
Zerar atlasRenderer::newTexturas de atlas e paleta são inicializadas uma vez, então texSubImage2D não força mais limpeza lazy (aviso do Firefox)
Retry da surfaceShell::redrawFalha em get_current_texture pede novo frame em vez de travar o laço (tela preta)
Loader + cacheweb/index.html, web/sw.jsProgresso do download do wasm, JS e wasm buscados como ?v=<build> (carimbado pelo build-web.sh) e cacheados de forma imutável, então o cache nunca mistura dois builds e recarga automática se o contexto WebGL for perdido
Pacotes de sprites sob demandasrc/web_sprites.rs, ume-tools pack-spritesCada lutador tem um <id>.pack completo e um <id>.menu.pack pequeno com exatamente os arquivos que o retrato da seleção e a prévia do menu leem (registrados por ume_engine::native::menu_sprite_files). O boot baixa só os pacotes de menu; o pacote completo é baixado quando o lutador recebe foco na seleção ou entra em uma luta. Os bytes baixados no boot foram de 37,2 MB para 17,0 MB
Perfil de build webCargo.toml [profile.web], scripts/build-web.shO build do navegador usa LTO completo, uma unidade de codegen e opt-level = "s", mantendo opt-level = 3 nos crates quentes (ume-engine, ume-formats, ume-render, tiny-skia, png, miniz_oxide, fdeflate, simd-adler32). O wasm foi de 17,9 MB para 13,2 MB (7,6 MB para 6,7 MB com gzip)
Laços de recolor e recortenative::recolor, native::pixel_fitO recolor de paleta usa um cache de cores de mapeamento direto e uma janela de cabelo por linha em vez de HashMap e teste de região por pixel; o recorte de sprites varre linhas em vez de colunas. Mesmos pixels (cobertos por testes de referência); o trabalho na thread principal do boot até a luta na sonda de perfil foi de 5,0 s para 4,0 s

Sonda: NODE_PATH=$(npm root -g) node scripts/web-profile.js Enter Enter Enter (Chromium headless, rode ./scripts/build-web.sh antes).

Carregamento de cenários no navegador

O WASM do navegador embute miniaturas de cenários de 240×135, em vez dos sete PNGs completos (21.858.090 bytes). A grade de seleção decodifica apenas as miniaturas solicitadas. Confirmar um cenário baixa assets/stages/<id>.png durante o carregamento da tela VS; erros HTTP e um limite de 30 segundos retornam ao menu. O cache em Rust do navegador retém apenas a última ilustração completa preparada; uma luta ativa ainda pode manter sua própria referência. O cache HTTP/service worker do navegador pode reutilizar arquivos já baixados.

A versão nativa mantém as imagens completas embutidas, decodificando cada cenário separadamente no primeiro uso. As definições UMF e o pacote Elecbyte continuam dentro do WASM; esta alteração separa apenas a arte dos cenários. A compilação dos lutadores e a preparação de áudio continuam na thread principal do navegador.

scripts/build-web.sh copia os PNGs externos e assets.js para web/dist/. Publique o diretório inteiro, incluindo assets/stages/. Jogar offline exige que o cenário escolhido tenha sido baixado anteriormente. Ao substituir a arte de um cenário, regenere sua miniatura em assets/stages/thumbs/ como PNG RGB de 240×135 com python scripts/generate-stage-thumbnails.py (exige Pillow).

Execute node scripts/web-smoke.js web/dist após compilar a versão web (exige Playwright e Chromium). O teste rejeita downloads de cenários completos antes da confirmação e exige exatamente um na primeira luta. Isso verifica o escopo da transferência, não um percentil de latência nem um ganho de FPS.

Orçamento da thread principal no carregamento

Regra: a thread de render nunca espera disco, decodificação, parsing ou síntese. No nativo esse trabalho roda em threads de trabalho e a UI consulta a conclusão; no wasm (thread única) continua fatiado em um passo por quadro.

TrabalhoOnde roda agora
Preview e retrato MUGEN na seleçãoCharEntry::stream_preview / stream_portrait (máx. 2 workers, coletados por Registry::reap_streams). Chamada ~0,1 ms contra 28 ms (KFM) e 84 ms (KFM HD) síncronos
Importação de .zip (hash + descompressão)registry::read_zip em worker; só finish_import (~4 ms) roda na thread principal
Decodificação dos sons da lutaAudio::preload_match em worker; a barra do VS espera
Síntese da música do cenário (17-31 ms)Audio::music_ready em worker
Tela de vitóriausa a definição em cache (peek), nunca carrega

Watchdog de quadros: UME_WATCHDOG=1 registra todo quadro acima de UME_HITCH_MS (padrão 50) com o bloco que segurou a CPU (ume_shell::watchdog::label("load:stage")) e, ao sair, um resumo com o pior quadro. Cada quadro é atribuído ao seu segmento mais lento, não ao último rótulo definido, então a contabilidade final não esconde um passo de carregamento lento. Rótulos em uso: select:reap, select:preview, select:grid, load:character, load:stage, load:session, load:audio, load:sprites, fight:prefetch, import.

Inicialização com coleções M.U.G.E.N grandes

Abrir uma pasta lia todos os arquivos para a memória: uma coleção de 15.000 arquivos (4,5 GB de SFF, 3,4 GB de SND) levava 338 s e 10,2 GB de memória residente antes da tela de título, e o Windows marca uma janela como "não está respondendo" após 5 s sem bombear mensagens.

TécnicaOndeEfeito
Índice de pasta preguiçosoume_formats::vfs::add_dirPercorre só metadados (caminho + tamanho) e lê o arquivo quando ele é usado. Zips dentro da pasta são indexados pelo registro final e diretório central, nunca descompactados de antemão
Cache de cargas pequenasvfs::FileLeituras de até 4 MiB ficam para reuso (def, CNS, AIR); bancos de sprite e som são lidos uma vez por uso em vez de ficarem presos a sessão inteira
Chave de conteúdo amostradavfs::File::signatureA identidade de personagem/cenário usa tamanho + amostras do início e do fim em vez do banco de sprites inteiro, então o mesmo lutador copiado para outra pasta continua sendo deduplicado
Descoberta e chave em paralelofind_char_defs, find_stage_defs, Registry::add_vfs_innerCabeçalhos de def e chaves de conteúdo são calculados com ume_formats::par::map (até 8 workers)
Roster fora da thread principalApp::newRegistry::new + scan_folders + dedupe + sort_mugen rodam na thread registry-scan enquanto a tela de boot continua desenhando quadros
Deduplicação por conjuntoRegistry::add_vfs_innerIds e chaves do roster ficam em HashSet; a varredura linear por lutador era quadrática
Thumbnail de cenário assíncronoRegistry::stage_previewO primeiro tile que precisa de um cenário MUGEN dispara um worker; antes o cenário inteiro (SFF + RGBA) era decodificado no quadro em que a grade rolava até ele
Montagem do cenário fora da threadRegistry::prepare_stageO cenário é carregado, o preview é gerado e o BGM é localizado no worker stage-load; a tela de VS consulta o resultado
Liberação fora da threadRegistry::drop_off_threadDescartar uma definição de lutador (centenas de MB de sprites) acontece no worker char-free, não dentro de um quadro
Carregamento que bombeia quadrosApp::start_fightRevanche e tour desenham a tela de carregamento e bombeiam quadros enquanto os workers terminam, então a janela continua respondendo às mensagens do Windows

ultimate-mugen --scan-report imprime o custo de inicialização sem janela (bundled | scan | total | roster | RSS). cargo run --release -p ume-formats --example scan_bench -- <mugen_dir> mede índice, descoberta e chave separadamente.

Referência (Windows, 32 GB de RAM, cache do sistema aquecido): uma coleção de 15.053 entradas com 723 personagens e 137 cenários passou de 338 s e 10.192 MB para 0,89 s e 33 MB. Com o watchdog de quadros ligado, catalogar esse roster não registrou nenhum quadro acima de 100 ms; só a indexação caiu de 337,9 s para 0,83 s, a descoberta de 4,31 s para 0,02 s e a geração de chaves de 716 lutadores de 11,0 s para 0,19 s. Conteúdo MUGEN de pasta (210 .def, 4,5 GB de .sff) continua carregando e lutando: mugen_check mugen/chars/Sukuna reporta 1773 sprites em 232 ms.

Busca no sistema de arquivos virtual

cargo run --locked --release -p ume-formats --example vfs_bench mede normalização de caminhos e busca por nome com 50.000 arquivos não relacionados. Exibe cinco amostras por cenário. O benchmark sintético exclui acesso a disco, decodificação e renderização.

A busca alternativa na pasta usa o intervalo do mapa ordenado da VFS correspondente ao diretório do personagem, evitando percorrer outros personagens. Os limites de diretório importam: chars/kfm-extra não pode substituir um arquivo de chars/kfm. A busca global por nome continua como última alternativa de compatibilidade. A normalização ASCII cria uma única string de saída; caminhos não ASCII mantêm as regras Unicode de minúsculas, inclusive sigma grego contextual.

Na máquina de desenvolvimento na nuvem, a mediana da normalização caiu de 60,8 para 48,0 ns por operação, e a da busca na pasta de 278,2 para 1,0 µs. São resultados de microbenchmark, não medidas de FPS ou de carregamento completo do jogo. Arquivos ausentes que exigem busca global ainda podem percorrer todo o mapa.

Decodificação de PNG

cargo run --locked --release -p ume-formats --example png_bench -- assets/chars/sprites 7 decodifica todos os PNGs de uma pasta (2.610 arquivos, 136 MB nos personagens incluídos) sete vezes e imprime mínimo, mediana, máximo e um checksum de pixels. O unfilter das linhas é especializado por tamanho de pixel (1 a 4 bytes), então Sub, Average e Paeth rodam sem a sobrecarga de bounds check e desvio por byte, e a passada de Adler-32 não usada é pulada porque o decoder só confere o tamanho da saída. Na máquina de nuvem com 4 núcleos a mediana caiu de 3.420 para 2.220 ms (três execuções cada, variação abaixo de 4%) com checksum idêntico. Os testes de png_unfilter comparam cada filtro e tamanho de pixel com as fórmulas da especificação.

Alocações de áudio e interface

cargo run --locked --release --example audio_bench decodifica cinco vezes um WAV estéreo gerado de 30 segundos a 44,1 kHz, contando alocações e realocações durante cada decodificação. O decodizador reutiliza o buffer de conversão de amostras intercaladas enquanto houver capacidade; ele cresce quando um pacote posterior precisa de mais amostras. A quantidade de amostras escritas continua vindo do pacote atual, inclusive em pacotes finais parciais e entrada mono.

No ambiente de desenvolvimento na nuvem, as alocações após aquecimento caíram de 2.331 para 1.183 por decodificação. Os tempos variaram (aproximadamente 9–11 ms após aquecimento) e não demonstram ganho de velocidade. A mudança reduz alocações temporárias, não o tamanho final do PCM decodificado. O benchmark exclui reprodução e latência do dispositivo de áudio. Execute cargo test --locked --release --example audio_bench para os testes de preservação de amostras, mono/estéreo, cauda e demais operações PCM.

Ui::quad transforma os quatro vértices em um array fixo, eliminando uma alocação temporária por quadrilátero desenhado sem mudar a ordem dos triângulos ou suas coordenadas. Isso não comprova ganho de FPS.

Decodificação Vetorizada de Codecs SFFv2

decode_rle5 e decode_lz5 em crates/formats/src/sff.rs utilizam preenchimento contíguo de fatias (out[j..e].fill(val)) em vez de laços escalares de atribuição elemento a elemento. O LLVM traduz o preenchimento de fatias em instruções memset vetorizadas, acelerando corridas longas em folhas de sprites em alta definição (720p/1080p). Para kfm720.def, o tempo de carregamento caiu de 60,1 ms para 6,7 ms (8,97x mais rápido).

Pipeline Paralelo de Recursos de Personagem

load_mugen_char em crates/engine/src/loader.rs sobrepõe as fases de recursos do personagem entre núcleos de CPU utilizando std::thread::scope. Decodificação de sprites (sff:decode), análise de animação (air:parse) e decodificação de áudio (snd:decode) rodam simultaneamente em threads trabalhadoras enquanto constantes CNS, arquivos de estado e gatilhos CMD são analisados na thread chamadora. par::workers em crates/formats/src/par.rs escala até 32 threads de processamento paralelo em hardwares multithread. O tempo total de carregamento passa a ser limitado pela fase individual mais lenta em vez do acúmulo serial.

Gatilhos e Atribuições de Variáveis com Alocação Zero

A avaliação de partidas em crates/engine/src/matchs.rs, crates/engine/src/triggers.rs e crates/engine/src/hitdef.rs elimina alocações na heap durante os ticks de estado:

  • Match::assigns registra mutações de variáveis usando o enum compacto VarKind (Var, FVar, SysVar, SysFVar) em vez de alocar chaves String dinâmicas por atribuição.
  • state_mask, attr_kind_mask e guardflag_bits processam fatias de string byte a byte com to_ascii_uppercase() em linha, eliminando alocações temporárias de String maiúscula em avaliações de hitbyattr.
  • A taxa de simulação atingiu mais de 262.000 ticks/segundo com latência máxima por tick inferior a 0,053 ms.

Conversão de Sprites para RGBA sem Ramificação via LUT em Cache L1

sprite_to_rgba em crates/formats/src/sff.rs pré-popula uma tabela de busca de 256 entradas lut: [[u8; 4]; 256] em cache L1, mapeando índices de paleta de 8 bits diretamente para quads RGBA. O laço de pixels usa cópias de 4 bytes sem desvio condicional (chunk.copy_from_slice(&lut[c])), eliminando desvios por pixel para transparência (c != 0) e reduzindo falhas de predição de desvio durante a decodificação de sprites. A fase de decodificação SFF executa em ~0,8 ms para folhas de sprites padrão de lutadores.

Fila de Comandos de Entrada da IA com Alocação Zero

crates/engine/src/ai.rs reutiliza a memória do buffer circular em Ai.queue: VecDeque<u32> por meio de append_seq(&mut queue, ...) em vez de criar e descartar vetores temporários na heap Vec<u32> a cada decisão de movimento da IA. A latência máxima por tick caiu para 0,046 ms sob carga.

Lotes de Vértices Contíguos e Rasterização sem Multiplicação Prévia

Batch::push em crates/render/src/batch.rs substitui chamadas repetidas a self.vertices.push() por uma única cópia de fatia contígua (self.vertices.extend_from_slice(&[...])), agrupando os quatro vértices do quadrilátero em uma única operação de memória. Em crates/engine/src/raster.rs, pixmap_to_image pré-dimensiona os buffers de pixel (vec![0u8; pixels.len() * 4]) e desmultiplica os canais straight-alpha usando chunks_exact_mut(4), viabilizando auto-vetorização sobre superfícies e efeitos procedurais de cenários.

Despacho Direto de Gatilhos em Bytecode

O trait Host em crates/engine/src/expr.rs e a máquina virtual em crates/engine/src/bytecode.rs introduzem ganchos de despacho direto trigger0 e trigger1. Para avaliação de gatilhos unários (Op::Trig1), operandos na pilha avaliam diretamente na lógica do gatilho sem encapsulamento em arrays AST temporários [Node::Num] ou redirecionamento via eval(). Gatilhos críticos (var, fvar, sysvar, animelemno, animelemtime, animexist, selfstatenoexist) executam como índices e consultas inline em arrays, reduzindo a latência máxima de tick de simulação para 0,042 ms.

Analisador de Animações AIR com Alocação Zero

parse_air em crates/formats/src/air.rs opera diretamente sobre fatias de string de cada linha sem alocar instâncias String em minúsculas (line.to_ascii_lowercase()) para cada linha do arquivo de animação. O reconhecimento de seções e cabeçalhos (parse_begin_action, parse_clsn_header, parse_clsn_box) avalia fatias de bytes com insensibilidade a maiúsculas ASCII (eq_ignore_ascii_case), e as coordenadas de caixas de colisão são processadas em um array de pilha fixo [f32; 4] em vez de alocar um Vec<f32> na heap por caixa delimitadora.

Cópia Pré-alocada de Canais de Áudio PCM

Em src/sound_mix.rs:decode, a decodificação de quadros de áudio calcula a capacidade do pacote antecipadamente e invoca out.frames.reserve(count), eliminando realocações geométricas repetidas do vetor durante a leitura de amostras. Um fluxo dedicado para áudio mono (ch == 1) transfere quadros sem divisão de fatias, e a decodificação estéreo utiliza chunks_exact(ch) para eliminar verificações de limites. As alocações em execução aquecida caíram para 1.175 por fluxo de áudio de 30 segundos.

  • Onda 23 - Tabela de Jump Direta Inline do Bytecode e Dispatch com Host Fatiado:
    • Aplica inline das operações aritméticas e relacionais mais frequentes (Add, Sub, MulF, MulI, DivF, DivI, Eq, Ne, Lt, Le, Gt, Ge, BitAnd, BitOr, BitXor, Xor) diretamente no loop de casamento externo de run_slice, eliminando chamadas intermediárias de função e closures.
    • Fatia self.host antecipadamente em run_slice, reduzindo overhead de desreferenciação de struct a cada resolução de gatilho e expressão.
  • Onda 24 - Passo de Fundo de Cenário Sem Cópias e Retorno Rápido de Ondas:
    • Utiliza casamento de padrões disjunto (BgState { layers, def_time, ctrl_defs, stage } = self) em step(), eliminando incrementos atômicos de self.stage.clone() em Arc e alocações de std::mem::take a cada tick.
    • Adiciona retorno rápido para amplitude zero s[0] == 0.0 em sin_wave(), evitando cálculos transcendentais de .sin() para camadas estáticas de fundo.
    • Ignora a soma de quadros de início de repetição de animação quando .loop_start == 0.
  • Onda 25 - Codificação Rápida de WAV e Reamostragem de Áudio em Taxa Identidade:
    • Substitui loops de extensão de fatia por amostra por redimensionamento em bloco de passagem única e escrita indexada direta em wav() e o_wav().
    • Implementa caminho rápido vetorizável por SIMD para reprodução em taxa unitária ((rate - 1.0).abs() < 1e-4) em Pcm::render, içando produtos de ganho constantes para fora do loop de mixagem.
  • Onda 26 - Parser de HitDef Sem Alocações e Construção Estática de Shake:
    • Elimina formatação intermediária de strings e clones em hitdef::build utilizando Option<&str> emprestado para parâmetros, casamento direto de bytes em ttr_bits, state_mask e guardflag_bits.
    • Substitui formatação dinâmica de strings por consultas estáticas de campo para parâmetros de shake de tela/câmera.
    • Ramo padrão com zero alocações para estado e tipos de ataque.
  • Onda 27 - Caixas de Colisão In-Place e Início Rápido de Elemento de Animação:
    • Implementa Fighter::fill_boxes utilizando buffers scratch fornecidos pelo chamador, eliminando alocações contínuas de Vec nos loops de detecção de reversals, golpes e projéteis.
    • Substitui coleta de vetor na heap para verificação de caixa única p2clsnrequire por fatia em array na pilha com zero cópias.
    • Adiciona saída antecipada if n <= 1 { return 0; } em elem_start para ignorar instanciação de iteradores nas consultas mais frequentes de tempo de quadros de animação. Onda 30 - Direções Relativas de Entrada Sem Desvios e Tabela de Salto em Bytes:
  • Substitui desvios aninhados em input::rel_dirs por deslocamento binário branchless ud | (4 << (is_back ^ 1)).
  • Substitui casamento de strings em button_bit por casamento em nível de byte na fatia, suportando insensibilidade a maiúsculas sem alocação.
  • Implementa atribuição de direção branchless em InputHistory::push.
  • Onda 31 - Descompactação ZIP VFS Paralela Multi-Thread e HUD de Loading Cibernético:
    • Implementa descompressão em blocos com escopo multi-thread (std::thread::scope) aproveitando todo o paralelismo de CPU disponível para extração de arquivos ZIP em add_zip.
    • Substitui descompressão sequencial por trabalho concorrente em lote, reduzindo a decodificação de recursos SFF de 222.6 ms para 88.7 ms (-60.1%).
    • Adiciona HUD de carregamento cibernético com bordas brilhantes, pulso laser de dois tons ciano/branco e telemetria de pipeline paralelo.

Decodificação SIMD de paletas ACT e fast-path de limites de câmera

  • Decodificação vetorizada ACT: decode_act e encode_act utilizam s_chunks::<3>() e s_chunks_mut::<4>() para decodificar tripletos RGB para RGBA em lotes sem checagens redundantes de limites.
  • Limites de câmera em passada única: Match::update_camera calcula os limites de todos os lutadores raiz (minx, maxx, highest) e dos lutadores vivos (lo, hi) em uma única iteração de self.roots(), eliminando filtragens redundantes.
  • Checagens de sobreposição otimizadas: Match::overlap armazena as coordenadas de  em registradores escalares antes do laço interno de colisão contra  e substitui divisões por 2.0 por multiplicações * 0.5.

Pipeline de avaliação de controladores e gatilhos com zero alocações

  • Indexação de alvos sem alocação no heap: controllers::target_indices retorna buffer em pilha Vec<usize> em vez de Vec<usize>, eliminando alocações em controladores de alvo (targetstate, targetlifeadd, targetpoweradd, targetfacing, targetbind, etc.).
  • Resolução de flags AssertSpecial sem alocação: flags::names_in e flags::lookup operam diretamente em fatias &str com comparação ASCII insensível a maiúsculas/minúsculas (eq_ignore_ascii_case), removendo alocações de strings a cada quadro.
  • Constantes de velocidade em buffer na pilha: triggers::Ctx::const_val formata a chave em um buffer de 64 bytes para buscar sufixos .x sem alocação no heap via format!("{k}.x").
  • Atribuições de variáveis tipadas: Match::assigns armazena o enum AssignKind em vez de alocar uma String na atribuição de variáveis de gatilhos.

Descompressão RLE em bloco e eliminação de escrita redundante de zeros no SFF v2

  • Eliminação de escrita de zeros em decode_rle8: Como vec![0u8; size] já aloca memória inicializada em zero, repetições de pixels transparentes (val == 0) e literais zero (d == 0) pulam escritas na memória e apenas avançam o índice j. Isso elimina esperas nos buffers de escrita e sujeira nas linhas de cache (geralmente 50-80% de transparência).
  • Preenchimento em bloco no RLE5: Em decode_rle5, loops byte a byte foram substituídos por .fill(c) em fatias (ou avanço direto quando c == 0), transformando iterações individuais em memsets vetorizados.
  • Cópia direta de fatias para paletas SFF v2: Em decode_sff_v2, paletas com limites válidos utilizam cópia em lote ou direta via copy_from_slice, eliminando checagens de limites e adições saturadas por cor.

Saída antecipada de caixas de colisão, fatiamento de alvos sem alocação e despacho de IA indexado

  • Fast-path em caixas de colisão: Em fighter::boxes(), quadros sem caixas e sem modificadores ativos retornam imediatamente vec![] sem consultar tabelas de escala ou calcular fatores. Fatores de escala pré-multiplicados e inversão horizontal com XOR único (flip = fr.flip_h ^ (self.facing < 0.0)) removem penalidades de ramificação em cada vértice.
  • Fatiamento de alvo sem alocação em p2clsnrequire: Em Match::tick, alvos específicos emprestam a fatia &d_boxes[req..req + 1] diretamente em vez de alocar um Vec no heap.
  • Despacho de comandos de IA indexado: Em ai::Ai, comandos são indexados como Vec<usize> em fighter.def.commands em vez de clonar árvores CommandDef. Ataques próximos e à distância são separados na inicialização, tornando a seleção em O(1) sem varreduras lineares.
  • Conversão vetorizada de pixmap para straight alpha: raster::pixmap_to_image evita divisões inteiras em pixels opacos (alpha == 255) e transparentes (alpha == 0) utilizando as_chunks_mut::<4>().

Decodificação SND pré-alocada e filtragem de comandos sem alocação

  • Tabelas hash pré-alocadas para sons SND: snd::decode_snd_checked limita a capacidade em count.min(8192) e pré-aloca as tabelas out e seen, eliminando redimensionamentos repetidos e rehashes durante a decodificação de áudio de personagens.
  • Resolução estática de chaves de paleta no carregador: loader::load_mugen_char resolve substituições de paletas (pal1..pal12) usando uma tabela estática de fatias PAL_KEYS em vez de formatar 12 strings no heap por personagem.
  • Deduplicação de sprites pré-alocada: Pré-dimensiona os vetores seen e unique para o tamanho de sff.sprites.len().
  • Extração de lista de golpes e comandos de IA com zero alocações: loader::load_mugen_char filtra comandos no local usando eq_ignore_ascii_case antes de clonar ou alocar strings, removendo dezenas de alocações no heap por personagem carregado.
  • Onda 27 - Caixas de Colisão In-Place e Início Rápido de Elemento de Animação:
    • Implementa Fighter::fill_boxes utilizando buffers scratch fornecidos pelo chamador, eliminando alocações contínuas de Vec nos loops de detecção de reversals, golpes e projéteis.
    • Substitui coleta de vetor na heap para verificação de caixa única p2clsnrequire por fatia em array na pilha com zero cópias.
    • Adiciona saída antecipada if n <= 1 { return 0; } em elem_start para ignorar instanciação de iteradores nas consultas mais frequentes de tempo de quadros de animação.
  • Onda 30 - Direções Relativas de Entrada Sem Desvios e Tabela de Salto em Bytes:
    • Substitui desvios aninhados em input::rel_dirs por deslocamento binário branchless ud | (4 << (is_back ^ 1)).
    • Substitui casamento de strings em button_bit por casamento em nível de byte na fatia, suportando insensibilidade a maiúsculas sem alocação.
    • Implementa atribuição de direção branchless em InputHistory::push.

Analisador de animação e colisão AIR no local sem alocações no heap

  • Eliminação de alocações to_ascii_lowercase() por linha: air::parse_air processa linhas de texto diretamente com comparação ASCII de bytes insensível a maiúsculas (eq_ignore_ascii_case), removendo de 5.000 a 20.000 alocações de string por arquivo .air.
  • Analisador de caixas de colisão em pilha: parse_clsn_box analisa quatro coordenadas diretamente em um array fixo [f32; 4] na pilha, eliminando alocações de Vec<f32> por caixa de colisão.
  • Tokenização de parâmetros de quadros em buffer de pilha: Linhas AnimFrame desempacotam até 11 parâmetros separados por vírgula em um array fixo [&str; 11] sem alocar Vec<&str>.
  • Análise de flags de flip e blend no local: Flags fl e bl são avaliadas diretamente sem alocação de strings em maiúsculas.

Parâmetros de shake no HitDef sem alocação e correspondência de tipos no local

  • Resolução de parâmetros de shake sem alocação: hitdef::build usa consultas diretas de strings estáticas (parse_shake) em vez de formatar 10 chaves dinâmicas no heap ({prefix}.freq, {prefix}.time, {prefix}.ampl, etc.) a cada instanciação de HitDef.
  • Análise de animtype e groundtype no local: hitdef::animtype e hitdef::groundtype comparam tokens padrão de animação/chão do MUGEN usando eq_ignore_ascii_case diretamente em fatias &str sem alocar strings em minúsculas.

Consultas de seções INI sem alocação e análise de constantes CNS em pilha

  • Section::get e Section::get_all sem alocação: ini::Section::get e ini::Section::get_all comparam chaves diretamente com eq_ignore_ascii_case sem alocar instâncias de String em minúsculas a cada consulta.
  • find_section sem alocação: ini::find_section utiliza eq_ignore_ascii_case diretamente no nome da seção sem alocar strings em minúsculas.
  • Análise de constantes CNS em pilha: cns::parse_constants desempacota vetores numéricos separados por vírgula em um array [f64; 4] na pilha, eliminando alocações de Vec<f64> em cada linha de constantes.
  • Vetor de comandos pré-alocado: cns::parse_cmd pré-aloca a capacidade de cmds para secs.len().

Fast-path de bytecode de operação única e avaliação sem pilha

  • Atalho de expressão com operação única: Em bytecode::Code::run, expressões com exatamente um opcode (Op::Const(v), Op::Trig0(i), Op::Host(i)) retornam imediatamente sem inicialização do array de pilha, avanço do program counter ou despacho no loop da máquina virtual.
  • Consultas de constantes e parâmetros com custo zero: Números constantes e gatilhos sem argumentos (Time, StateTime, AnimTime, StateNo, etc.) executam em 1 ciclo de CPU sem overhead de frame de execução.

Avanço de animação em consulta única e atalho na limpeza de alvos

  • Desempacotamento de quadro de animação em consulta única em advance_anim: Desempacota (total, loop_start, len, ft) em uma única consulta a self.anim(), eliminando buscas repetidas em HashMap por lutador e explod animado a cada tick.

  • Atalho para substituições de tamanho vazias: fighter::c consulta diretamente constantes do personagem quando self.size_overrides.is_empty(), pulando varreduras lineares na fatia.

  • Limpeza de alvos obsoletos com atalho: Match::tick pula movimentações de vetores e chamadas de retenção sempre que self.fighters[k].targets.is_empty().

  • Onda 42 - Caminho Rápido de Efeitos de Paleta, Buffers de Quadro em Pilha e Consultas Zero-Alloc:

    • PalParams::apply: Caminho rápido para transformações idênticas e sem rotação de matiz/inversão, ignorando trigonometria e desenrolando canais de cores.
    • PalFx::from_controller: Eliminação de alocações na heap para buscas de parâmetros de controladores usando chaves em buffer de pilha.
    • Match::tick: Remoção de alocações dinâmicas de Vec por tick para waken e ag_requests através de arrays em pilha, unificando loops com etain_mut.
  • Onda 43 - Carregador de Personagens Zero-Alloc e Unquote In-Place:

    • ini::unquote_str: Empréstimo in-place de fatias sem alocar novas instâncias de String para strings limpas ou entre aspas.
    • loader::load_mugen_char: Conversão de fget para retornar Option<&str> ao invés de Option<String>, eliminando cerca de 20 alocações na heap por carregamento de lutador.
    • loader::local_size: Análise em pilha via split_once(',') substituindo a alocação dinâmica de nums.
    • cns::parse_cmd: unquote_str in-place para nome e comandos.
  • Onda 44 - Despacho de Estado AssignKind Zero-Alloc e Máscaras de Bits Case-Insensitive:

    • matchs::AssignKind: Substituição de alocações dinâmicas de String em atribuições de variáveis por um enum de 1 byte AssignKind, reduzindo pela metade a memória da tupla e eliminando operações na heap.
    • hitdef::state_mask / attr_kind_mask / guardflag_bits: Processamento de bytes ASCII insensível a maiúsculas in-place sem alocação de strings.
    • triggers::const_val: Busca em buffer de pilha com zero alocações para constantes velocity.*.x.
  • Onda 45 - Cache de Explods em Array e Varredura Triangular de Colisão de Projéteis:

    • Match::update_explods: Pré-indexação de posições e estados de pausa dos lutadores em array compacto de 8 posições na pilha, eliminando varreduras lineares por explod.
    • Match::update_projectiles: Flags de congelamento em buffer de pilha para até 64 projéteis sem alocações na heap, e iteração triangular de pares (a + 1)..n reduzindo pela metade verificações de colisão entre projéteis.
  • Onda 46 - Caminho Rápido de Caixas de Colisão e Geometria Pré-Escalada:

    • Fighter::boxes: Saída antecipada para listas vazias de caixas de colisão antes de calcular constantes ou fatores de escala (reduz drasticamente o trabalho em frames ociosos/movimento).
    • Dimensões X e Y pré-escaladas (sx * s e sy * s), reduzindo as multiplicações de ponto flutuante por caixa de 8 para 4.
    • Combinação de flip_h != (facing < 0.0) em uma única condição booleana XOR branchless.
    • Fighter::c: Busca de fatia guardada por !self.size_overrides.is_empty().
  • Onda 47 - Junção de Candidatos VFS em Buffer de Pilha e Casamento de Sufixo Zero-Alloc:

    • vfs::resolve: with_joined em buffer de pilha de 512 bytes para caminhos candidatos base_dir/name e data/name, eliminando alocações na heap no caminho direto de busca.
    • Substituição de strings dinâmicas format!("/{base}") por predicado de bytes in-place is_match.
    • Uso direto de ini::unquote_str sem alocar strings intermediárias.
    • Fallback de pasta sub-microssegundo em 50k arquivos (0.9 us/op) e redução no tempo de carga de lutadores (kfm.def caiu para 6.7 ms).
  • Onda 48 - Pipeline de HUD Zero-Alloc e Quads de Textura Diretos:

    • Hud::draw: Otimização de main_of em varredura única de iterador sem alocar Vec<&Fighter> por lado a cada quadro.
    • Uso de array fixo em pilha roots = [r0, r1] substituindo vetores dinâmicos na heap.
    • Eliminação de alocações de parceiros em partidas 1v1 convencionais.
    • Substituição de vetores de malha/vértices/índices no desenho de retratos por chamadas diretas de draw_texture_ex.
  • Onda 49 - Curto-Circuito em Bytecode de Duas Operações e Contexto Único em Gatilhos:

    • bytecode::Code::run: Execução em caminho rápido para expressões de 2 operações (!trigger, -const, !const, !host), ignorando inicialização de pilha e loop do interpretador.
    • Match::triggered: Reutilização de instância única de Ctx entre trigger_all e grupos de gatilhos, eliminando recriações de contexto por controlador.
    • Match::num: Avaliação direta de expressão sem mapeamento intermediário de closure.
  • Onda 50 - Pré-Alocação de SND, Deduplicação de Parsing de Estados e Filtros de Comando Zero-Alloc:

    • snd::decode_snd_checked: Pré-alocação do dicionário de sons e do conjunto de offsets visitados usando a contagem de sons do cabeçalho, com inserções in-place Entry::Vacant evitando realocações redundantes.
    • loader::load_mugen_char: Eliminação da segunda passagem redundante de parsing do stcommon durante o carregamento de personagens.
    • Chaves de paletas estáticas pré-alocadas PAL_KEYS evitando 12 alocações de formatação de string dinâmica por carga.
    • Pré-alocação de capacidade para HashSet, sprites, indexed e counts com base no número de sprites decodificados do SFF.
    • Comparação de bytes ASCII insensível a maiúsculas (eq_ignore_ascii_case) nos filtros de ai_commands e movelist, eliminando strings temporárias na heap para nomes de comandos.
    • loader::load_mugen_portrait: Extração in-place de fatias de string em consultas de seção evitando clones de strings pertencidas.
  • Onda 51 - Cache de Dimensões Comuns, Consulta Única de Sprites e Despacho Direto de Textura:

    • CharDef: Dimensões centrais e fatores de escala (scale_x, scale_y, size_ground_back, size_ground_front, size_air_back, size_air_front, size_height, size_attack_dist) em cache direto na estrutura via refresh_sizes.
    • Fighter::c: Casamento de padrões em caminho rápido para chaves size.*, evitando hashing de strings dinâmicas e consultas a HashMap a cada tick de física, colisão e avaliação de gatilhos.
    • Gfx::sprite_tex_for: Eliminação da consulta duplicada de def.sprites.get por quadro renderizado em todos os lutadores, sombras, ajudantes e explods.
    • Gfx::draw_sprite: Uso direto de def.scale_x e def.scale_y, removendo consultas repetidas à tabela def.c(...) a cada quadro.
    • Redução no tempo de carregamento de kfm.def para 4.6 ms e taxa de simulação acelerada para 216k ticks/s.
  • Onda 52 - Cache de Temporização de Animação e Atalhos em Bytecode de 3 Operações:

    • Fighter: Cache de anim_total_time e anim_loop_start em mudanças de animação, convertendo anim_time_trig (animtime) em uma subtração escalar direta sem consultas a mapas.
    • Fighter::advance_anim: Reutilização da consulta única de animação durante o avanço de quadros, eliminando chamadas repetidas a self.anim().
    • Fighter::anim_elem_time: Retorno instantâneo para animelemtime(1) sem iteração de quadros.
    • bytecode::Code::run: Curto-circuito em caminho rápido para expressões de comparação de 3 operações ([Trig0, Const, Cmp] e [Const, Trig0, Cmp]), avaliando gatilhos diretamente via Host::trigger0 e ignorando alocações na pilha da máquina virtual.
    • Redução do tempo de carregamento de kfm720.def para 8.7 ms e de kfm.def para 4.4 ms.
  • Onda 53 - Dicas de Índice de Lutadores, Acertos em Buffer de Pilha e Atalhos de Reversão:

    • Match::idx_hint: Resolução de índice direta em $O(1)$ baseada em dicas de posição da ordem de execução, substituindo varreduras lineares entre lutadores no pipeline de cada tick.
    • Match::detect_reversals: Saída rápida antecipada quando nenhum lutador possui estado ativo de reversão, além de buffers de pilha de tamanho fixo para reversões detectadas.
    • Match::detect_hits: Buffer fixo em pilha pending armazenando apenas índices e coordenadas de lutadores, eliminando clones prematuros na heap de HitDefData em frames sem impacto.
    • Lista de struck migrada para buffers de pilha, eliminando alocações dinâmicas nos loops de física e detecção de acertos.
  • Onda 54 - Índices de Alvo em Buffer de Pilha e Avaliação Direta de Expressões:

    • controllers::target_indices: Substituição de Vec<usize> alocado na heap por array fixo em pilha [Option<usize>; 8], eliminando alocações repetidas em TargetState, TargetLifeAdd, TargetPowerAdd, TargetFacing e TargetBind.
    • controllers::set_vars: Avaliação direta de param.exprs.first() sem iterações duplicadas de busca por string sc.param(...).
    • controllers::run: Substituição de checagens duplas de parâmetros em changestate/selfstate por consultas unificadas opt(...) para ctrl e anim.
    • Vazão de simulação elevada para 226.415 ticks/s com p50 em 0.003 ms, e decodificação de retratos reduzida para 0.6 ms.
  • Onda 55 - Decodificacao RGBA Alinhada em u32, Tabelas SFF Pre-Alocadas e Paletas PCX Sem Desvios:

    • sff::sprite_to_rgba: Alocacao direta em Vec garantindo alinhamento de 4 bytes por hardware, eliminando loops de alinhamento de fatias e checagens de desvio, e convertendo para Vec via Vec::from_raw_parts com custo zero.
    • pcx::read_rgb_palette: Conversao de blocos RGB de 768 bytes em [u32; 256] com u32::from_ne_bytes sem desvios condicionais e atribuicao direta de canal alfa constante.
    • sff::decode_v1: Remocao do campo nao utilizado idx em V1Job e pre-alocacao do vetor jobs com count.min(8192).
    • sff::decode_v2: Pre-alocacao das tabelas de palettes com pal_count.min(buf.len() / 16 + 1) e jobs com spr_count.min(buf.len() / 28 + 1).
    • sff::decode_v2_image: Otimizacao de quadros RAW profundidade 32 com copia direta de fatias e profundidade 24 com chunks de 3 bytes em vez de consultas byte a byte.
  • Onda 56 - Binds com Semantica Copy, Fallbacks Preguicosos e Animacoes Diretas:

    • fighter::Bind: Implementacao de Copy e PartialEq, convertendo verificacoes e atualizacoes em rebind e update_bind em copias binarias de pilha sem clones na heap.
    • fighter::Fighter::change_anim_own: Adicao de metodo auxiliar para troca de animacao propria, removendo clones externos de def.clone() em changestate, changeanim e transicoes de auto-turn.
    • matchs::run_state: Conversao da consulta a common em fallback preguicoso (let fallback;), ignorando clones de self.common em todos os estados negativos (-3, -2, -1) e estados definidos pelo personagem.
    • matchs::change_state: Substituicao do clone ansioso de self.common por igualdade de ponteiro &self.common e fallback sob demanda.
    • matchs::tick: Eliminacao do clone por quadro de f.st_def no loop de override de fisica atraves de extracao escalar de Option<char>.
  • Onda 57 - Parsing INI Sem Alocacao de Linhas, Controladores e Estados Pre-Dimensionados:

    • ini::parse_ini_no_lines: Substituicao do parsing de INI que copiava linhas em parse_states, parse_constants, parse_cmd e na resolucao de DEF do loader.rs por parse_ini_no_lines, evitando dezenas de milhares de alocacoes de String descartadas por personagem.
    • ini::parse_ini_opt: Pre-alocacao do vetor de secoes com text.len() / 256 + 4 e das entradas de cada secao com capacidade 8.
    • cns::build_controller: Pre-alocacao de params do controlador com a capacidade exata de s.entries.len().
    • cns::parse_states: Pre-alocacao de StateDef com capacidade de 16 controladores e parametros dimensionados pelas entradas da secao, eliminando realocacoes dinamicas na compilacao de estados.
  • Onda 58 - Normalizacao de Caminhos em Pilha, Atalhos Rapidos de Comandos e Simbolos Copy:

    • vfs::with_norm_path: Buffer de 512 bytes em pilha para normalizacao e remocao de aspas de caminhos, eliminando alocacoes na heap em todas as consultas de recursos de vfs::resolve.
    • commands::CmdSymbol: Implementacao de Copy e PartialEq para manipulacao binaria de simbolos de 20 bytes.
    • commands::held: Verificacao antecipada de mascara de botoes antes de consultas de direcao relativa e orientacao, descartando botoes inativos na primeira instrucao.
    • commands::fires: Avaliacao de now & !prev antes de ler ticks anteriores do historico (p2, p3), evitando sondagens de historico em frames sem disparo.
  • Onda 59 - Escala em Cache no Preenchimento de Caixas e Poda AABB Multicaixas:

    • fighter::fill_boxes: Ignoradas consultas dinamicas por string size.* quando nao ha overrides de tamanho, lendo def.scale_x e def.scale_y diretamente.
    • matchs::overlap: Adicionada saida antecipada por bounding box composto (AABB) em colisoes de grupos multicaixas (a.len() > 1 || b.len() > 1), eliminando testes $O(N imes M)$ em pares disjuntos.
  • Onda 60 - Tokenizacao de Quadros AIR Sem Alocacao e Buffers Pre-Dimensionados:

    • air::parse_air: Substituicao da alocacao em heap de Vec<&str> por quadro por um array fixo em pilha [""; 12], eliminando alocacoes dinamicas de vetores em todos os quadros de animacao.
    • air::parse_air: Substituicao de alocacoes String via to_ascii_uppercase() para flags e modos de blend por inspecao em nivel de byte (fl.as_bytes(), bl.as_bytes()).
    • air::parse_as_d: Substituicao de busca por strings por varredura de bytes sem distincao de maiusculas/minusculas para parametros alfa AS...D....
    • air::parse_air: Pre-alocacao do vetor de quadros com Vec::with_capacity(8) e do HashMap de animacoes com text.len() / 512 + 16.
  • Onda 61 - Despacho Dedicado de Gatilhos Sem Argumentos e Comparacao de Strings em Bytes:

    • triggers::trigger0: Desvio rapido para os 20 principais gatilhos sem argumentos (time, animtime, stateno, prevstateno, anim, ctrl, alive, life, facing, roundstate, movecontact, movehit, vel, pos) diretamente sem criacao de closures de argumentos ou passagem pelo match geral de 90 bracos.
    • triggers::cmpstr: Migracao da decodificacao de caracteres para inspecao de byte unico (v0.as_bytes().first()) para statetype, movetype e physics, e reutilizacao de fatias de string em checagens de command.
  • Onda 62 - Atalhos Rapidos na VM de Bytecode para Gatilhos de 1 Argumento e Comparacoes Aritmeticas:

    • bytecode::Code::run: Adicionados atalhos dedicados para instrucoes unarias de 2 ops de 1 argumento ([Op::Const, Op::Trig1]), gatilhos invertidos de 3 ops ([Op::Const, Op::Trig1, Op::Not]) e comparacoes de 4 ops ([Op::Const, Op::Trig1, Op::Const, Op]), ignorando o loop da pilha e indexacoes para expressoes como var(X) = Y, fvar(X) > Y e animelemtime(X) >= Y.
    • bytecode::Code::run: Expandidas comparacoes de 3 ops para suportar aritmetica (Add, Sub) e relacoes entre dois gatilhos ([Op::Trig0, Op::Trig0, Op]), eliminando o interpretador de pilha para expressoes como anim = stateno ou time > animtime.
  • Onda 63 - Deteccao Lazy de Ciclos em SND e Tokenizacao Sem Alocacao de Glifos FNT:

    • snd::decode_snd_checked: Substituicao da alocacao antecipada de HashSet<usize> por arquivo SND por inicializacao preguicosa (Option<HashSet<usize>>) ativada somente quando offsets apontam para tras (next <= ofs), eliminando alocacao em heap e hashing em todos os arquivos SND sequenciais padrao.
    • fnt::decode_fnt_v1: Substituicao da alocacao de split_whitespace().collect::<Vec<&str>>() por linha de glifo por um iterador continuo lendo ate 3 tokens diretamente, eliminando centenas de alocacoes de vetor por fonte.
    • fnt::decode_fnt_v2: Migracao da analise do descritor de fonte para parse_ini_no_lines, evitando a coleta desnecessaria de lines: Vec<String>.
  • Onda 64 - Analise de Carga de Comandos Sem Alocacao e Troca de Animacao com Guarda de Ponteiro:

    • commands::parse_command: Substituicao da coleta de String na heap em prefixos de comando de carga/liberacao (~30) por indexacao de fatias de bytes sem alocacao e correspondencia de bytes ASCII para prefixos (/, $, >, ~).
    • fighter::change_anim: Adicionada guarda Arc::ptr_eq evitando incremento de contagem de referencia quando from ja e a definicao ativa anim_def.
    • fighter::change_anim_own: Migracao para emprestimo direto por referencia imutavel de self.def sem clonar o contador atomico Arc<CharDef>.
  • Tela de selecao na web (scripts/web-frame-probe.js, scripts/web-profile.js):

    • Os quadros dos personagens nativos desenham portrait.png por CharEntry::tile_portrait (uma decodificacao pequena, em cache por revisao do pacote) em vez de compilar uma previa de idle e vitoria por quadro; a previa completa so e montada para o personagem em foco ou escolhido.
    • As previas esperam o pacote de sprites chegar (CharEntry::tile_art_ready), entao nenhuma arte provisória é desenhada durante o download.
    • Em wasm32, um personagem sem pacote previsualiza so o primeiro quadro de cada animacao do menu, e a resolucao automatica da arte fica limitada a 3.0.
    • Recolor::apply_in_region usa um hasher multiplicativo e memoria do ultimo tom no lugar de SipHash por pixel.
    • O cache de pacotes guarda 64 pacotes, entao elencos acima de 24 personagens nao se expulsam mais.
    • Medido com o profiler no Chromium headless (tela de selecao, 53 movimentos de cursor): tempo ocupado da thread principal caiu de cerca de 98 s para cerca de 2,5 s.

Efeitos em sprite-sheet

src/vfx/sheet.rs toca sheets de efeito CC0 de assets/fx/ (embutidas com include_bytes!, decodificadas e enviadas à GPU no primeiro desenho). Uma faísca de impacto toca em todo golpe não bloqueado; uma explosão toca em golpes de 150 de dano ou mais e no KO. No máximo 12 sprites de sheet ficam vivos, com blend aditivo, e são limpos ao iniciar o round. Sheets pixel-art do PVFX Foundry (filtro nearest, blend alpha) adicionam soco em golpes leves, crítico em golpes pesados, onda de choque e impacto no chão em golpes de 150+ de dano no chão, defesa em golpes bloqueados e poeira de dash. Raio e estática tocam nos supers, pilar de fogo nas transformações, bomba de fumaça no KO e explosão de gelo em defesas de golpes pesados. Sheets e créditos estão em assets/fx/CREDITS.md.

Rasterização paralela das variantes de sprite

Compilar um lutador UMF rasterizava os frames base em paralelo e depois recoloria cada variante de forma e de despertar de cada frame em uma única thread, o que era 80 a 90% da carga. native/frame_raster.rs agora renderiza cada frame junto com suas variantes no mesmo pool de workers (min(núcleos, 8), uma thread em wasm32), e as paletas de forma são montadas uma vez por lutador em vez de uma vez por frame.

cargo run --release -p ume-engine --example load_bench na máquina de nuvem de 4 núcleos, três execuções de cada:

Elenco inteiro (21 lutadores)OboroKaitoSuzume
Antes11,40 / 11,76 / 11,79 s1674 ms1250 ms900 ms
Depois4,70 / 4,46 / 4,54 s551 ms405 ms319 ms

A saída não muda: um checksum de todos os sprites (pixels, tamanho, eixo, escala) e de todos os frames de animação dos 21 lutadores em duas paletas é idêntico antes e depois. Lutadores sem formas (npc_*) não mudam, pois não têm variantes para renderizar.

Predefinições gráficas para máquinas fracas

Ajustes, aba DESEMPENHO: uma predefinição (Alta, Média, Baixa, Mínima ou Personalizada quando alguma opção difere) mais opções individuais. Tudo é só visual; Match::tick, rollback e replays nunca leem esses valores.

  • Escala de renderização: a cena da luta é desenhada em um alvo menor e o pós-processamento amplia para a janela; o HUD continua nítido.
  • Opções: pós-processamento, qualidade da arte, partículas, rastro de imagem, HUD translúcido, sombras, fundo animado, filtro CRT e limite de FPS.
  • Ajuste automático (ligado por padrão na web): média do tempo de quadro por 4 s de luta após 3 s de aquecimento; acima de 24 ms desce uma predefinição, salva e mostra um aviso. Nunca sobe a qualidade sozinho.
  • Medir: UME_PRESET=0..3 UME_TOUR=perf no desktop ou a luta ?e2e=1&modo=watch no Chromium.

Medido na máquina de nuvem com renderização por software (1280x720): desktop 28,7 ms (Alta) para 15,8 ms (Mínima); web 10,5 fps (Alta) para 21,8 fps (Mínima).

Resoluções baixas de janela

Ajustes, aba VÍDEO (desktop): a resolução da janela agora começa em 640x360, depois 854x480, 960x540, 1024x576, 1280x720 até 5K. O cfg guarda res_px=LxA e arquivos antigos (res=<índice>) são migrados. Escolher uma resolução limpa o tamanho de janela salvo. Na web e no celular use a Escala de renderização (até 25%).

Desktop com renderização por software: 1280x720 31,5 ms, 854x480 15,1 ms, 640x360 10,5 ms por quadro.

Dissecação de quatro lutadores M.U.G.E.N

Estudo somente leitura de quatro pacotes públicos, abertos arquivo por arquivo com tools/mugen2umf: Aizen TYBW (Fighter Factory Ultimate, SFF v2), Gogeta SSJ4 (Pocket_Danyell e Sarevok), Goku SSJ GT (Yamcha Z) e Goku SSJ4 (_Vision). Os pacotes são arquivos de terceiros: nada deles é commitado, só o que aprendemos. Estudos relacionados: Estudo de código M.U.G.E.N e Estudo de lutadores.

Tamanho de cada pacote

Aizen TYBWGogeta SSJ4Goku SSJ GTGoku SSJ4
SpritesSFF v2.01, 1380 sprites, 696 paletas, 29 MBSFF v1, 523 imagensSFF v1, 116 imagensSFF v1, 198 imagens
Sons272 (19 grupos, até 4 MB cada)33519
Ações AIR26223284171
Caixas Clsn1 / Clsn283 / 1538301 / 1202115 / 477309 / 1469
Comandos CMD67656265
Life / ataque / defesa2250 / 115 / 1252600 / 110 / 1402100 / 120 / 1102400 / 130 / 130

A Clsn2 supera a Clsn1 em cerca de 5 para 1 em todos: o corpo é dividido em 4 a 6 caixas pequenas por frame (cabeça, tronco, braços, pernas) e o ataque é de uma a três caixas. É a mesma regra da auditoria de hit boxes nativa.

Layout de arquivos

ArquivoPapel
.def[Info], [Files], pal1..pal12, pal.defaults
.cmd[Remap], [Defaults] (command.time, command.buffer.time), lista [Command], [Statedef -1] roteando entrada para estado
.cnsConstantes [Data], [Size], [Velocity], [Movement] e depois os estados
st1..st3IA.cns (-2/-3), Especials.cns, Supers.cns, -final, -story-intros
common1.cnsCópia dos estados comuns, sobrescritos ao redeclarar o número
.airFrames grupo,imagem,x,y,ticks[,flip,trans], Clsn1 (ataque), Clsn2 (corpo), Clsn2Default, Loopstart
.sff / .snd / .actSprites, sons e paletas de 256 cores

Constantes que valem copiar

  • Andar 2,3 a 2,4, correr 4,6, pulo -8,1 a -10,1, yaccel 0,43 a 0,44, airjuggle 15, largura de chão 15, altura 60, attack.dist 160. O elenco nativo já usa essa escala.
  • O Aizen usa airjump.num = 6 e andar 7: movimento rápido e flutuante feito só de constantes.

Camada de comandos

  • Quarto de círculo ~D, DF, F, a, meia-lua ~B, DB, D, DF, F, a, carga ~60$D,U,a e ~60$B,F,a (Goku SSJ), toque duplo FF, BB, ~D,U para super pulo, botões a+b.
  • /$B,x, /$D,y: direção segurada com botão, gerando golpes de comando.
  • Buffers: command.time = 10 e buffer.time 1 na maioria; 15 a 30 nos pacotes de entrada fácil.
  • Um movimento, um botão por golpe: no Aizen, D,DF,F com a, b ou c é Silent Slash, Dark Waves ou Kurohitsugi. A UMF faz igual, um golpe por botão.
  • Gogeta e Goku SSJ4 têm comandos ai..ai13 (sequências de botões) que só ligam uma flag de IA no -2; o motor tem IA própria, então não migram.
  • Cancels são triggers extras: trigger2 = numhelper(700) > 0 (Aizen cancela em especiais enquanto o clone vive), movehit e movecontact (165 usos no Aizen, 22 no Gogeta, 14 no Goku SSJ4). Na UMF: cancels e rekka.

Números dos golpes normais

Valores: dano, pausetime de atacante e defensor, ground.hittime, pontos de juggle e poweradd.

EstadoGogetaGoku SSJGoku SSJ4Aizen
200 leve em pé20, pausa 4,5, hit 11, juggle 4, power 2223, pausa 7,8, hit 11, juggle 1, power 2023, pausa 5,8, hit 7, juggle 1, power 2020, pausa 9,9, hit 15, juggle 2, power 40
210 forte em pé55, pausa 4,5, hit 1155, pausa 11,11, hit 15, juggle 4, power 6063, pausa 12,12, hit 15, juggle 5, power 6530, pausa 9,9, hit 15
400 leve agachado23, pausa 10,11, guardflag = L23, pausa 10,12, L23, pausa 5,820, pausa 0,15
410 forte agachado37, pausa 12,12, M62, trip, fall = 1, juggle 737, pausa 12,12, M30, pausa 0,60
600 leve no ar20, pausa 7,8, HA12, pausa 7,8, HA12, pausa 7,830, pausa 10,10
610 forte no ar72, pausa 12,12, hit 1770, pausa 9,10mesmos valores do 600sem HitDef direto

Regras dos pacotes: leves pausam 4 a 8 ticks e dão 15 a 25 de power, fortes pausam 11 a 12 e dão 55 a 70, hittime de chão 11 a 15, golpes baixos usam guardflag = L e ground.type = Low, golpes aéreos usam HA, e o forte agachado é a rasteira (Trip com fall = 1).

Tipos de golpe e como são feitos

TipoExemploConstrução
Bola de energiaGoku SSJ 1000Projectile em Time = 14 com ProjAnim, ProjHitAnim, velocity = 5.5,0, projpriority, HitDef embutido, AnimTime = 0 volta ao 0
Bola no arGoku SSJ 1005Igual, type = A, ProjHeightBound remove no chão
Super de raioGoku SSJ 1800poweradd = -2000, SuperPause no AnimElem = 1, AfterImage, três Projectile no mesmo frame: visual, longo com projhits = 30, projmisstime = 5, damage = 19,4
Ataque múltiploGoku SSJ 1050Uma ação longa, pares de VelAdd (+4 e -4) em AnimElem alternados, EnvShake no último
AgarrãoGoku SSJ4 1601TargetBind a cada elemento, TargetLifeAdd em AnimTime = 0, TargetState para o levantar
CloneAizen 700Helper com anim = 9999, DestroySelf em time = 15 ou sem o root, e numhelper(700) como trigger de cancel
Faísca de hitAizen 995Helper em movehit = 1 && numhelper(995) = 0, postype = p2
Contra-ataqueAizen Kyouka SuigetsuJanela de ReversalDef ou HitOverride e estado que teleporta com PosSet
TeleporteAizen ShunpoPosAdd de p2dist x + 40 e Turn (o mesmo código que a UMF gera em teleport)
FormaGogeta Kaio KenFlag var(11), -2 soma power por tick, AttackMulSet 1.2, DefenceMulSet 1.2, aura Explod a cada 10 ticks
Power upGoku SSJ 730 a 741Sobrescreve os estados comuns de power up com PalFX, EnvColor e som

O Aizen é o único que constrói quase tudo com helpers: 98 Helper, 140 Explod, 128 AssertSpecial, 48 AngleDraw. O Goku SSJ é o oposto: nenhum helper nem explod, 12 Projectile. O Gogeta fica no meio com 32 Projectile e 109 Explod.

Organização de sprites, sons e tempo

  • Sprites: grupo 0 parado, 20 andar, 40 pulo, 100 e 105 virar e agachar, 200 a 240 ataques em pé, 400 agachado, 600 pulo, 5000 a 5120 apanhar, 9000 retrato. Especiais usam grupos livres de 1000 em diante. Goku SSJ4: 121 grupos para 198 imagens; Gogeta: 523 imagens em 109 grupos (63 vinculadas, reaproveitando pixels).
  • Sons: grupo 0 golpes e vozes, 5 acertos, 6 defesa, 11 KO, 20 em diante para especiais. O Aizen tem 104 sons só no grupo 0.
  • Paletas: pal1..pal12 no .def; Goku SSJ4 e Gogeta trazem 5 .act; o Aizen embute as paletas no SFF v2.
  • Tempo: um golpe normal dura de 8 a 17 ticks no total (Goku SSJ4 leve em pé 4 + 11 + 2, Aizen 2 + 2 + 4 + 4, Gogeta forte em pé 2 + 4 + 2); o frame de acerto é o do meio.

O que mudou na UME

  1. Lutadores nativos devem ler como esses pacotes: cadeias de normais, rekka, golpes de comando, versões aéreas, um projétil por botão, teleporte, contra-ataque e forma.
  2. Caixas de acerto e de corpo seguem o membro: no mínimo 3 caixas de corpo.
  3. Frame data mira a tabela acima: pausa de 4 a 8 nos leves, 11 a 12 nos fortes, hit time de chão 11 a 15.
  4. A reconstrução do Captain Marlow Reyes é o primeiro lutador feito com este método, veja Recriar um lutador M.U.G.E.N como UMF.

Easter Eggs Durante as Lutas

O Ultimate MUGEN inclui um sistema de Easter Eggs puramente de apresentação (src/easter.rs e src/easter/) que reage a momentos clássicos de jogos de luta, eventos de cenário e lore dos lutadores sem tocar na simulação determinística (crates/engine).

Arquitetura

  • Seguro para determinismo: lê &Match apenas na camada de apresentação (src/app/fight_screen.rs), mantendo rollback e replays intactos.
  • Localizado: todos os banners, falas e cameos possuem suporte a Português, Inglês e Espanhol via crate::i18n::tr3.
  • Sprites animados em Pixel Art: folhas multi-frame em assets/easter/ renderizadas com FilterMode::Nearest.
  • Ritmo limpo: controle por bitsets (por round e por partida), cooldown global e limite de 3 elementos simultâneos na tela.

Easter Eggs de Combate e Arcade (20)

  1. QUENTINHO! — Cameo clássico do árbitro no canto inferior direito em lançamentos pesados (dano >= 115).
  2. EMPATE ÉPICO! — Nocaute duplo simultâneo.
  3. PIXEL MÁGICO! — Vencer um round ou lançar um Super com menos de 5–6% de vida.
  4. INTOCÁVEL! — Vitória perfeita com 100% de vida e coroa dourada.
  5. CHOQUE DE TITÃS! — Troca simultânea de golpes em até 3 ticks.
  6. PROVOCOU, LEVOU! — Levar golpe até 90 ticks após provocar.
  7. RESPEITO MÚTUO! — Ambos os lutadores provocam em até 120 ticks.
  8. NO MESMO RITMO! — Ambos pulam juntos duas vezes no mesmo round.
  9. AGACHAMENTO TÁTICO! — Sequência rápida de 4+ agachamentos à distância.
  10. SPEEDRUN K.O.! — Vencer um round em menos de 10 segundos.
  11. NO ESTOURAR DO RELÓGIO! — Round decidido nos últimos 3 segundos.
  12. SEM GRAVIDADE! — Combo aéreo de 5+ acertos.
  13. MURALHA DE FERRO! — Defender 6+ golpes seguidos sem quebrar a guarda.
  14. DEFESA EM PEDAÇOS! — Quebra de guarda (state_no == 5300).
  15. COLISÃO DE SUPERS! — Ambos os lados disparam um Super em até 90 ticks.
  16. DESPERTAR DUPLO! — Ambos os lutadores despertam/transformam na mesma partida.
  17. CHEGA, JÁ DEU! — Combo monstruoso de 15+ acertos com cameo do árbitro.
  18. FUGA DE MESTRE! — Virar o jogo com golpe pesado após ficar preso no canto.
  19. DUELO DE OLHARES... — Ambos parados se encarando por 3 segundos fazem um arbusto seco rolar pela arena.
  20. FICHA MÁXIMA — 1UP! — Encher a super barra no máximo dispara uma ficha dourada girando pela tela.

Easter Eggs de Cenário e Cameos Ambientais (20)

  1. Dojo — Grou de Origami: Um grou de papel animado cruza o pôr do sol sobre o telhado.
  2. Dojo — Telhas Trêmulas: Impactos pesados fazem o velho telhado do dojo tremer.
  3. Neo-Metrópole 2099 — OVNI em Neo-Metrópole: Um disco voador neon piscante cruza o horizonte cibernético.
  4. Neo-Metrópole 2099 — Sobrecarga // 2099: Disparar um Super sobrecarrega a rede neon.
  5. Bambuzal ao Luar — Espíritos do Bambuzal: Máscaras espirituais surgem entre os bambus em combos.
  6. Planalto Rochoso — El Viento Salado: O galeão voador de Marlow cruza as nuvens ao fundo.
  7. Portão dos Espíritos — Aparição Kitsune: Uma máscara kitsune brilhante flutua sobre o torii em Supers ou Despertares.
  8. Cratera Vulcânica — Erupção Sísmica: Golpes pesados provocam um rugido sísmico da caldeira.
  9. Praça do Interior (Brasil) — Capivara de Boa: Uma capivara em pixel art com uma tangerina na cabeça passeia tranquilamente pela praça.
  10. Praça do Interior (Brasil) — Caramelo na Área: O guardião oficial da praça dá as caras no Round 2+.
  11. Cristo Redentor (Corcovado) — Tucano no Corcovado: Um tucano colorido cruza os céus do Rio de Janeiro.
  12. Grande Muralha da China — Dragão de Papel: Uma pipa sobrevoa as montanhas da Grande Muralha.
  13. Petra (Al-Khazneh) — Escaravelho de Petra: Um escaravelho dourado brilha no cânion em golpes pesados.
  14. Texas — Meio-Dia no Texas: Um arbusto seco rola pela rua principal ao meio-dia.
  15. Chichén Itzá — Sombra de Kukulcán: O brilho esmeralda da serpente emplumada surge em Supers.
  16. Coliseu de Roma — Ave Gladiator!: O Imperador aplaude combos de 6+ acertos com louros dourados.
  17. Taj Mahal — Pombas de Agra: Pombas brancas levantam voo sobre o mármore no Round 2+.
  18. Pirâmides de Gizé — Olho de Hórus: Encher a super barra desperta o escaravelho dourado de Gizé.
  19. Jardins Suspensos da Babilônia — Plumas da Babilônia: Voo colorido sobre os jardins durante combos aéreos.
  20. Bênção das Maravilhas Antigas (Estátua de Zeus, Farol de Alexandria, Templo de Ártemis, Colosso de Rodes, Mausoléu de Halicarnasso): Fenômeno mítico exclusivo para cada maravilha clássica.

Easter Eggs de Lore, Rivalidades e Lutadores (20)

  1. Espelho (Mirror Match): Qualquer lutador enfrentando a si mesmo solta uma fala de "impostor".
  2. Suzume vs Oboro: Banner de vingança do clã Kagerou com emblema do Eclipse Escarlate.
  3. Sylene vs Garan: Gelo ártico de Borealia contra as chamas violetas do Submundo.
  4. Kaito vs Oboro: Tempestade de Izu contra o arquiteto do Eclipse Escarlate.
  5. Bruno no Brasil / Corcovado: A torcida da casa vibra pelo tricampeão de Minas Gerais.
  6. Volta em Neo-Metrópole 2099: Fala de livre-arbítrio ao retornar à cidade onde foi construído.
  7. Akio Empolgado (<30% de vida): Otimismo do Dojo Queda Estelar com ícone de ramen fumegante.
  8. Desculpas do Haruki: O arquivista gentil pede desculpas no meio da luta após um combo de 5+ acertos.
  9. Marlow vs Valdric: O pirata dos céus provoca o príncipe sobre sua coroa imperial.
  10. Kaito vs Jin: Corrida contra o vento entre os Penhascos de Izu e as Montanhas Azuis.
  11. Shion vs Kaname: Lâmina de meteorito contra a katana espiritual (crossed_blades).
  12. Lian na Grande Muralha: A grã-mestra da Lanterna de Jade defende a Grande Muralha.
  13. Bruno vs Daichi: Choque de gigantes entre o Ringue de Ferro e o Lobo de Altai.
  14. Garan na Cratera Vulcânica: O Portão de Cinzas se abre onde os 99 monges o selaram.
  15. Valdric vs Oboro: Duas coroas, um trono — Império Rubro contra Eclipse Escarlate.
  16. Suzume vs Jin: Duelo de velocidade entre Huế e o Vale do Vento.
  17. Volta vs Haruki: O androide pergunta ao arquivista o que torna um coração corajoso.
  18. Akio vs Kaito: Rivalidade clássica — "Quem perder paga o ramen!"
  19. Papagaio do Marlow: O imediato do El Viento Salado cruza a tela em Supers ou combos de 6+ acertos.
  20. Reclamação dos Capangas (npc_*): Os capangas do modo história reclamam do salário ao levar um combo de 4+ acertos.

Efeitos Sonoros Sintetizados (src/audio/easter_sfx.rs)

Todos os 60 Easter Eggs disparam um dos 12 efeitos sonoros retrô sintetizados em 32 kHz e pré-carregados junto ao banco nativo (desktop, web/WASM, Android e iOS):

  • easter_toasty — Stinger ascendente de arcade com eco rápido (QUENTINHO!, Provocou, Levou!, Overkill, No Estourar do Relógio).
  • easter_coin — Clássico sino dourado de ficha / 1UP em duas notas (Ficha Máxima, Sync Jump, Sem Gravidade, Speedrun K.O.).
  • easter_crown — Fanfarra real em arpejo brilhante (Intocável, Pixel Mágico, Empate Épico, Despertar Duplo, Coliseu).
  • easter_clash — Choque metálico de lâminas e energia (Choque de Titãs, Muralha de Ferro, Colisão de Supers, Shion vs Kaname, Suzume vs Oboro).
  • easter_tumbleweed — Assobio clássico de faroeste com rajada de vento seco (Duelo de Olhares, Texas).
  • easter_ufo — Oscilação sci-fi de disco voador estilo theremin (OVNI em Neo-Metrópole, Sobrecarga 2099, Volta).
  • easter_kitsune — Sino místico de santuário japonês com estalo de madeira (Aparição Kitsune, Grou de Origami, Bambuzal, Grande Muralha, Lian).
  • easter_capybara — Melodia tropical leve estilo marimba (Capivara de Boa, Caramelo, Torcida do Bruno, Agachamento Tático).
  • easter_bird — Trinado alegre de pássaro tropical (Tucano no Corcovado, Pombas de Agra, Plumas da Babilônia, Kaito vs Jin).
  • easter_parrot — Grasnar duplo de papagaio pirata (Papagaio do Marlow, El Viento Salado).
  • easter_wonder — Harpa pentatônica mítica com gongo grave de bronze (Pirâmides, Petra, Chichén Itzá, Vulcão, Maravilhas Antigas, Garan).
  • easter_banter — Estalo de balão de fala cômico (Mirror Match, Desculpas do Haruki, Marlow vs Valdric, Akio vs Kaito, Capangas).

Customização via TOML (assets/interactions.toml)

Provocações de início de round, rivalidades entre personagens, interações de cenário e reações durante a luta são 100% parametrizadas em assets/interactions.toml. Jogadores e criadores podem colocar um arquivo interactions.toml na pasta de dados do usuário para sobrescrever provocações ou adicionar novas interações tanto para lutadores nativos UMF quanto para personagens M.U.G.E.N importados, sem recompilar o jogo:

[[matchup]]
id = "rivalidade_custom"
fighters = ["ryu", "ken"]
speaker_id = "ken"
speaker = "KEN"
style = "speech"
sfx = "easter_banter"
color = [1.0, 0.45, 0.2]
title_pt = "Vamos nessa, Ryu! Sem segurar!"
title_en = "Come on, Ryu! Don't hold back!"
title_es = "¡Vamos, Ryu! ¡Sin contenerse!"

Seções suportadas:

  • [taunts]: listas opening_pt/en/es e answer_pt/en/es das provocações de abertura e resposta.
  • [[matchup]]: fighters = [a, b] ou mirror = true, style, sprite, sfx, color, title_* e sub_*.
  • [[stage_interaction]]: fighter + stage_contains = [...].
  • [[fighter_trigger]]: fighter ou fighter_prefix, trigger ("low_hp", "combo", "opp_combo", "super", "super_or_combo", "taunt"), threshold, per_round.

Diálogos em Duas Partes ([[exchange]]) e Provocações de Todo o Elenco

assets/interactions.toml também suporta diálogos de ida e volta [[exchange]] (o lutador A fala e o lutador B responde automaticamente após delay_ticks), além dos gatilhos first_attack, transform e round_win e falas dedicadas de provocação (taunt) para todos os 16 lutadores jogáveis.

Referências a Bleach (assets/interactions.toml)

Conectadas diretamente aos lutadores nativos com kits inspirados em Bleach (Kits inspirados em Bleach), além do Oboro e de personagens de Bleach importados do M.U.G.E.N, com 3 sprites pixel-art inéditos (sakura_petals.png, hollow_mask.png, reiatsu_badge.png) e 2 SFX sintetizados (easter_bankai, easter_shunpo):

  • Kaname (estilo Byakuya): Disperse-se! Mil Pétalas! (super), Liberação Final — Bankai! (transform), ressonância no Portão dos Espíritos e diálogo de Shunpo contra Suzume.
  • Shion (estilo Zaraki): "Agora vou usar as duas mãos!" (low_hp <= 45%), Pressão Espiritual no Máximo! (super) e diálogo Reiatsu vs Ilusão contra Oboro.
  • Suzume (estilo Yoruichi): Shunpo! (first_attack) e Shunko — Relâmpago Veloz! (transform).
  • Oboro (estilo Aizen): Tudo conforme o plano — Desde quando achou que não era uma ilusão? (super).
  • Personagens de Bleach importados do M.U.G.E.N: reações automáticas para ichigo* (Bankai — Getsuga Tensho!) e aizen* (Kyoka Suigetsu!).

Quadros de efeito

Os lutadores são desenhados apenas por sprites PNG em pixel art (assets/chars/sprites/<id>/). A única arte desenhada pelo motor são os efeitos de projétil e faíscas abaixo.

Um quadro com effect desenha um efeito no lugar do corpo. Use em projéteis e faíscas.

{ "effect": { "type": "slash", "size": 26, "color": "#ff3a5c", "color2": "#ffd0d8", "phase": 0 }, "ticks": 3 }
typeFormato
orb (padrão), burstBola de energia / explosão
dragonDragão de energia voltado para frente, com corpo em movimento
beam (length)Raio horizontal
pillar (length)Coluna vertical
shockwaveOnda no chão
slash, wave, waterCorte em arco
kunai, shurikenArremessáveis
ice, fire, darkfire, lightning, petalElementos

Sem color, o efeito usa a cor energy da paleta. A caixa de acerto do efeito é gerada sozinha a partir do formato.

Efeitos visuais

Pós-processamento cinematográfico (assets/postfx.toml)

src/postfx/look.rs lê postfx.toml (ao lado do executável ou no localStorage na web) e usa o assets/postfx.toml embutido como padrão. Seções: bloom, grade (tonemap ACES, exposição, split tone), distortion (shockwave e heat), lens e quality (nível mínimo de fx para cada efeito). Chaves ausentes ficam neutras e valores fora da faixa são limitados.

Engenharia reversa de um port de M.U.G.E.N para o navegador

Português (BR) · English

O que https://w8.snokido.com/games/html5/dbz-vs-marvel-vs-capcom/ faz para rodar um elenco de 78 lutadores de M.U.G.E.N no navegador, como seu sistema de animação funciona, por que ele segura 60 fps, e o que disso devemos copiar — ou não — no Ultimate MUGEN.

Tudo abaixo foi medido ou lido dos artefatos publicados. Os scripts que produziram os números estão em docs/research/ikemen-web/, então cada medição pode ser refeita.

1. O que a página é

A página pública é uma casca de 11 KB: menus, seleção de personagem, tela de versus e opções são DOM comum (essa parte é a camada de UI runtime-ui.js da snokido). A luta em si é um documento separado, frame.html, dentro de um iframe — e o motor ali não é JavaScript: é um programa Go compilado para WebAssembly.

ArtefatoTamanhoPapel
index.html11 KBcasca: boot, menu, seleção, opções
local-runtime.js342 KBbootstrap ofuscado: guarda o glue wasm_exec do Go e o módulo do frame como strings, além do catálogo de conteúdo
runtime-ui.js420 KBa UI em DOM (ofuscada, protegida por digest)
frame.html2,2 KBhospeda o motor: um <canvas id="ikemen-canvas">
runtime-engine.bin5.887.387 Bgzip de um módulo WebAssembly de 25.343.508 B
content/catalog.shvd.json265 KB78 personagens, 74 cenários, URLs dos pacotes, sha256, tamanhos
content/packs/*.zip1–24 MB cadaarquivos M.U.G.E.N sem modificação, um zip por personagem/cenário

O bootstrap envia {frameJs, wasmExec, descriptor, gzipBytes} ao frame.html, que instala o wasm_exec.js a partir de uma string, importa o módulo do motor de uma Blob URL e o condiciona a um SHA-256 dos valores recebidos. Isso é proteção contra cópia, não projeto de motor.

$ node docs/research/ikemen-web/wasm-artifacts.js runtime-engine.bin
module bytes: 25343508
[imports "gojs"] 25
  runtime.scheduleTimeoutEvent:function
  runtime.wasmExit:function
  syscall/js.valueGet:function
  syscall/js.copyBytesToJS:function
  mem:memory
[exports] run:function resume:function getsp:function mem:memory
[build info] ikemen-GO v0.0.0-20260927200105-cae6cd63ba4a+dirty
[go source files named by the symbol table] ... render_webgl.go render_webgl_cmdbuf.go system_js.go audio_js.go input_js.go loadyield_js.go ...

Imports gojs mais as exportações run/resume/getsp são a ABI WebAssembly do runtime Go, e a tabela de símbolos Go preserva o caminho de cada arquivo-fonte. O motor é o Ikemen-GO (a reimplementação em Go do M.U.G.E.N) com um backend WebGL2 adicionado para o navegador: render_webgl.go, render_webgl_cmdbuf.go, system_js.go, audio_js.go, input_js.go, pause_js.go, platform_js.go, loadyield_js.go, font_webgl.go, netplay_js.go.

O catálogo declara a própria proveniência, e foi assim que o código do backend foi localizado e conferido contra o binário:

"source": { "components": [
  { "name": "ikemen-go-web",      "url": "https://github.com/energyjp/ikemen-go-web",             "revision": "54305ec917c3e995f433004e2e8f7c8902bff96a" },
  { "name": "Ikemen-GO-Screenpack","url": "https://github.com/ikemen-engine/Ikemen-GO-Screenpack", "revision": "87f348a5f6e01e878a62ae865c6ee7d3281f8c98" } ] }

O ikemen-engine/Ikemen-GO original não tem backend WebGL; o energyjp/ikemen-go-web tem. O código conferido bate com o binário exatamente (tabela de opcodes, GLSL, nomes de símbolos, id do canvas), então o "como" abaixo está verificado nas duas fontes.

2. Conteúdo: nenhuma recodificação, só zips

Os pacotes contêm os arquivos M.U.G.E.N originais — .def, .sff, .snd, .air, .cns, .zss, .act — intactos. Verificado no pacote do Goku (24.319.368 B, sha256 igual ao do catálogo): files/goku.sff 9,6 MB, files/goku-jap-en-bl.snd 20,7 MB, files/goku.air 287 KB, 21 arquivos de paleta .png/.act, além do movelist HTML do próprio personagem.

Ou seja: o navegador baixa conteúdo M.U.G.E.N cru e o motor em WASM interpreta SFF/SND sozinho. Nada é pré-renderizado em spritesheets, e só a mídia do front-end (retratos, ícones, miniaturas de cenário) vem pré-codificada em WebP com nome endereçado por conteúdo (collections/shvd/media/<sha256>.webp).

O core (7,0 MB zip → 9,7 MB) é o screenpack e os dados de sistema, e todo outro pacote declara "dependencies": ["core"]. Uma luta carrega: core + um pacote por lutador + um por cenário.

3. Animação: semântica de M.U.G.E.N, sem mudanças

As animações são arquivos .air interpretados nas mesmas estruturas que o M.U.G.E.N usa (src/anim.go):

EstruturaCampos que importam
Animationframes, loopstart, curtime, curelem, totaltime, looptime, interpolate_offset/scale/angle/blend, mask, transType, srcAlpha/dstAlpha
AnimFrameGroup, Number, Xoffset, Yoffset, Time (ticks), Xscale/Yscale, Angle, TransType, Clsn1/Clsn2
Anim (instância)anim, x/y, xscl/yscl, window, xshear, rot, palfx, layerno, localcoord

O caminho por tick é deliberadamente barato:

  1. Animation.Action() avança curtime; em totaltime salta para loopstart e marca newframe.
  2. Animation.UpdateSprite() roda em todo tick mas só faz trabalho quando newframe está marcado — é ali que o sprite é resolvido, com uma consulta de mapa: a.spr = a.sff.GetSprite(uint16(group), uint16(number)) (anim.go:702), depois de aplicar os presets Remap do personagem.
  3. O desenho lê frames[drawidx] para a transformação e o spr em cache para a textura. Nada é reconsultado por tick e nada é interpolado.

Portanto não há tweening nem interpolação sub-tick: o quadro muda no tick de 60 Hz, exatamente como no M.U.G.E.N. A suavidade percebida vem da taxa de ticks, dos blocos interpolate offset/scale/angle/blend (que animam transformações entre quadros do AIR) e do shader fazer todo o trabalho de cor em uma passada.

Cor é recurso de shader, não bake

Duas coisas que normalmente custariam upload vão para o fragment shader (src/shaders/sprite.frag.glsl, que também está embutido no WASM como string):

c = COMPAT_TEXTURE(tex, uv);
if (isRgba) { ... } else {
    c = COMPAT_TEXTURE(pal, vec2(c.r*0.9966, 0.5));   // paleta lida do canal vermelho
}
if (hue  != 0.0) c.rgb = hue_shift(c.rgb, hue);
if (neg)         c.rgb = neg_base - c.rgb;
c.rgb = mix(vec3((c.r+g.c+b)/3.0), c.rgb, 1.0 - gray);
c.rgb += final_add;
c *= final_mul;
if (!isFlat) c.rgb = mix(c.rgb, tint.rgb * c.a, tint.a);
  • Paletas: um sprite indexado mantém os pixels de 8 bits como textura e é colorido por uma textura de paleta 256×1 (newPaletteTexture() → newTexture(256, 1, 32, false)). Trocar pal1…pal12 ou RemapPal reenvia 1 KB, não o sprite. Sprite::CachePalTex (image.go:1336) compara as 256 palavras de cor e só reenvia quando muda, então uma troca de paleta custa um texSubImage2D por sprite que realmente mudou.
  • palFX (add, mul, color, hue, invertall) são uniforms por sprite no mesmo draw — sem segunda passada, sem troca de shader por RenderMode.
  • Distorção trapezoidal (sombras de chão / skew de xscale) é calculada no mesmo shader a partir de gl_FragCoord, não reprojetando vértices.

Um shader cobre quadrados chapados, sprites RGBA, sprites indexados, trapézios e toda a cadeia de palFX. O problema de "mais um shader por efeito" do M.U.G.E.N simplesmente não existe ali.

4. Como ele se mantém rápido

A parte interessante. Medido na build publicada (Chromium headless, ANGLE/SwiftShader, ou seja, números de GPU renderizados em software, 1280×720 CSS, duas execuções numa máquina carregada):

MétricaValor
Backing store do canvas640×480 (CSS 1280×720, object-fit: contain)
drawArrays por rAFp50 82–105, p95 113–163, máx 172–224
bufferData por rAF82–125 (um upload pequeno por sprite; sequências de texto compartilham um)
Chamadas de uniform por rAF322–397
useProgram por segundo30–76 (poucas por quadro)
bindTexture por segundo1,4 mil–6,2 mil
Quadros do motor por rAF0,78–0,89 (60 Hz fixo, com portão)
Heap JS em uma luta9–74 MB
Boot → menu1,9 s
Menu → seleção4,0 s
Seleção → primeira luta37 s (core + 2 pacotes de lutador + cenário pela rede, depois decode SFF)
Long tasks durante a luta50–90 ms, recorrentes (decode de assets / GC na thread principal)

4.1 A cena é renderizada em 640×480 numa FBO e depois sofre um blit

Init() cria uma textura RGBA + um renderbuffer DEPTH_COMPONENT24 no tamanho sys.scrrect (640×480) e desenha a cena inteira ali; EndFrame() roda os shaders de pós-processamento externos em duas FBOs ping-pong e só então faz um drawArrays(TRIANGLE_STRIP, 0, 4) para o framebuffer padrão, com viewport letterboxed e NEAREST (ou LINEAR, se o usuário escolheu escala suavizada). Todo sprite é rasterizado em 640×480, independente do tamanho da janela.

4.2 Uma travessia JS por quadro em vez de uma por chamada GL

É o truque principal (render_webgl_cmdbuf.go). As chamadas GL não saem do Go; elas são codificadas num fluxo de bytes:

// GL command buffer: batches the browser build's per-frame WebGL commands into a shared ArrayBuffer
// that a JS-side interpreter drains in ONE syscall/js crossing per flush, instead of one crossing
// per GL command.
//
// Why: profiling the shipped (v0.9) build showed hundreds of `gl.Call` crossings per frame; each
// crossing boxes its arguments through syscall/js.makeValue (~450MB/30s of JS garbage) and pays the
// wasm->JS context switch.
  • Buffer de staging de 256 KB (wglCmdBufBytes = 1 << 18), 23 opcodes (useProgram, uniform*, activeTexture+bindTexture, bufferData, drawArrays, enable/disable, blendFunc, scissor, depthMask, bindVertexArray, texParameteri, …).
  • Objetos GL (texturas, programas, locations de uniform, VAOs, buffers) são registrados uma vez num array JS e referenciados por handle inteiro.
  • flushCmds() faz um js.CopyBytesToJS + um Invoke de um interpretador JS criado com o construtor Function.
  • Toda chamada GL direta passa por glc(), que descarrega o buffer antes, então a ordem dos comandos é preservada por construção.

4.3 Deduplicação de uniforms e de estado no lado Go

SetUniformISub/SetUniformFSub mantêm caches por programa com chave (programID << 16) | uniformIndex e não emitem nada quando o valor não mudou. EnableBlending, SetDepthTest, SetDepthMask, EnableScissor e ChangeProgram fazem o mesmo para estado GL. É por isso que ~14 uniforms por sprite viram ~4 na média, e por que useProgram aparece só 30–50 vezes por segundo.

4.4 Zero alocação no caminho de desenho

O mesmo arquivo documenta o custo medido da versão ingênua: passar um [16]float32 local para um método de interface fazia o array escapar, alocando vértices + uniform + modelview por quad, e só drawQuads alocava >1 GB a cada 30 s de heap. A correção são arrays de scratch no escopo do pacote, reusados por chamada (o caminho de render é single-thread e cada buffer é consumido de forma síncrona).

4.5 Portão de rAF na taxa do jogo

system_js.go não roda um quadro por requestAnimationFrame; roda no máximo um a cada 1000/Video.Framerate:

// Browsers fire rAF at the DISPLAY's refresh rate - 120/144/240Hz on high-refresh screens. ...
// Releasing a frame on every rAF therefore runs the whole loop 2-4x more often than the game is
// authored for, multiplying allocation and forcing far more frequent GC pauses (the 200-500ms
// mark stalls high-refresh users saw) for zero visual benefit.

SwapBuffers() então estaciona a goroutine principal num canal até o próximo quadro liberado — o que também devolve o controle ao event loop JS para input, rede e áudio.

4.6 Sprites não vão para atlas; fontes vão

Cada sprite mantém a própria textura. Não existe atlas de sprite nem política de despejo, então uma luta nunca bate num "atlas cheio". As 16 unidades de textura são usadas como cache LRU (texCacheTexSerial/texCacheLastUsed), para que sprites consecutivos da mesma folha não re-vincullem.

Só texto usa TextureAtlas: 256×256, empacotamento skyline com extrusão de borda, e quads de glifo agrupados por atlas, então um trecho de texto é um único draw.

4.7 Um draw call por sprite, por projeto

SetVertexData(...16 floats...) + RenderQuad() → bufferData(STATIC_DRAW) seguido de drawArrays(TRIANGLE_STRIP, 0, 4). Por sprite: 1 bufferData, 1 drawArrays, ~4 uniforms, ≤1 bind de textura — tudo dentro do command buffer, então o lado Go paga só alguns emitI/emitF por sprite. Com 82–172 sprites por quadro isso dá 5–10 mil chamadas GL/s, que é exatamente o que um rasterizador em software no Chromium headless aguenta.

5. O que já fazemos melhor

O Ultimate MUGEN não precisa do command buffer: nossa shell fala wgpu, que já empacota um quadro em poucas submissões. E nosso caminho de sprite está arquiteturalmente à frente do deles:

AspectoBuild web do IkemenUltimate MUGEN
Draw calls1 por sprite (82–172/quadro)agrupado: quads fundidos por estado de blend + scissor num único buffer de vértices/índices
Estado de bindbind por sprite, LRU de 16 unidadesum bind group; atlas + textura de paleta vinculados uma vez
Paletatextura 256×1 por sprite, upload por sprite quando muda1024 linhas de paleta numa textura, índice de linha por vértice, RemapPal troca a linha
Atlasnenhum para sprites (textura por sprite)atlas RGBA + atlas de índices de 8 bits, com reset independente
Simulaçãomáquina de estados inteira em WASMhotpath_bench (abaixo)
Ritmo de quadrosportão de rAF em Video.Framerateume_shell::Pacer + passo fixo de 60 Hz (≤5 ticks/quadro)

Nosso custo de simulação, para deixar claro que o orçamento de quadro não é o problema:

$ cargo run --release -p ume-engine --example hotpath_bench
sff decode                   mean      829.6 us
air parse                    mean      493.5 us
cns parse+compile            mean     3680.8 us
char load (no images)        mean     7388.2 us
match tick (2 fighters)      mean        4.2 us   p99  9.0
match tick (6 fighters)      mean       11.3 us   p99 17.6
match tick (10 fighters)     mean       20.1 us   p99 33.5

4–20 µs por tick contra um quadro de 16,7 ms: 0,03–0,12 %. A luta é gasta no renderizador e no carregamento — exatamente onde o port para navegador também gastou o esforço dele.

6. O que mudamos

Os relatos de bug do próprio port (>1 GB/30 s de GC por alocação por quad, 450 MB/30 s de boxing por chamada, stalls de 200–500 ms por simular demais a 144 Hz) têm todos a mesma forma: o trabalho de uma luta inteira pago dentro de um quadro só. Tínhamos a mesma forma num lugar: o aquecimento de sprites.

App::finish_fight subia os sprites dos lutadores no único quadro que trocava para a luta:

#![allow(unused)]
fn main() {
self.g.trim(4000);
for f in &sess.m.fighters { if !self.g.prefetch(&f.def, 0.5) { break; } }
}

Quanta arte um lutador carrega (exemplo novo sprite_mem):

$ cargo run --release -p ume-engine --example sprite_mem -- mugen/chars/BuuZ2 mugen/chars/cell mugen/chars/frieza
mugen:c/buuz2.def   sprites=2510  indexed=2510 | index atlas  33.71 MB | total  33.86 MB | largest spr 5202 KB
mugen:c/cell.def    sprites=631   indexed=631  | index atlas   9.91 MB | total   9.99 MB | largest spr  818 KB
mugen:c/frieza.def  sprites=673   indexed=673  | index atlas   8.67 MB | total   8.74 MB | largest spr  682 KB

Um par de DBZ é 43,6 MB de folhas indexadas em 3.141 sprites, e o maior sprite sozinho tem 1,3 MB.

6.1 Pagar o aquecimento por quadro, não por partida

App::warm_step + Gfx::prefetch_step: um passo de carregamento próprio que copia no máximo WARM_BUDGET = 512 KiB por chamada. Atrás da tela de VS é um pedaço por quadro (a splash dura no mínimo 1,8 s), e o caminho bloqueante de start_fight (revanche pelo menu de pausa ou pela tela de resultados, início de netplay, tours roteirizados) agora cede um quadro entre os pedaços em vez de congelar.

Medido na mesma máquina, mesmo tour, mesmos lutadores, com UME_WATCHDOG=1:

Quadro danoso
antes212.8 ms em 'fight:prefetch' (um quadro)
depois2.3 / 2.4 / 2.5 / 2.1 / 8.8 ms em 'load:sprites' (um pedaço por quadro)

Uma revanche com o mesmo elenco não limpa mais o cache de texturas (ver 6.3), então o aquecimento dela não copia nada.

6.2 Linhas de paleta são compartilhadas por conteúdo

ume_render::PaletteRows mantém uma linha por paleta de 256 cores distinta em vez de uma por objeto de paleta: espelho, RemapPal que cai numa paleta existente e um novo aquecimento depois de um reset do atlas reusam a linha e pulam o upload. Testado em crates/render/src/palette.rs (50 consultas às mesmas cores → uma linha; atlas cheio reporta falha em vez de sobrescrever uma linha em uso).

6.3 Revanche mantém os atlas já preenchidos

O aquecimento tem uma chave de elenco (def.id dos dois lutadores). Se a chave é a mesma do último aquecimento, Gfx::trim é pulado, a geração do atlas não muda e prefetch_step encontra tudo residente: a segunda luta de uma maratona começa com zero uploads.

6.4 Orçamento de draw calls que quebra o build

ume_render::DRAW_CALL_BUDGET = 24 com batch::tests::a_fight_screen_stays_within_the_draw_call_budget: um quadro de luta sintético (camadas de cenário, passada subtrativa de reflexo, dois lutadores, faíscas aditivas, HUD de duas regiões) precisa ficar abaixo do teto, e a_flat_run_of_quads_is_one_call fixa a propriedade "300 quads em uma chamada". Quebre o agrupamento e o CI acusa.

6.5 Rótulos de hitch apontando para a fase certa

ume_shell::watchdog::label agora fica preso à primeira fase nomeada no quadro. Antes, o label("import") no fim de App::frame sobrescrevia tudo, então um passo de carga lento aparecia como importação; é por isso que os números de load:sprites acima são visíveis. Testado.

6.6 O que os números também mostraram

prefetch_step registra onde parou: para um lutador nativo (RGBA em alta resolução) o teto de 50 % do atlas cabe 8 dos 116 sprites, e então o aquecimento desiste e o resto entra sob demanda durante a luta — um upload no momento do desenho, que é o que o port faz com todos os sprites. Para arte indexada de DBZ o mesmo teto cabe algumas centenas. Ou seja, o aquecimento em bloco é limitado pelo atlas, não pelo elenco, e o próximo passo (backlog 5) é dar um orçamento de upload por quadro ao caminho sob demanda em vez de tentar pré-carregar mais.

7. Backlog, por prioridade

#Ideia tirada do portEstado aquiComo verificar
1Nunca pagar uma luta inteira dentro de um quadrofeito: App::warm_step + Gfx::prefetch_step, 512 KiB por quadro, tanto no passo de VS quanto em start_fightUME_WATCHDOG=1 rótulo load:sprites; F3 up/KB
2Manter o quadro de transição livre nos caminhos sem tela de VSfeito: start_fight cede um quadro por pedaçopior quadro do UME_WATCHDOG=1 na transição
3Orçamento de draw calls é número de primeira classefeito: DRAW_CALL_BUDGET + teste do batchcargo test -p ume-render
4Linhas de paleta são recurso escassofeito para duplicatas: PaletteRows compartilha por conteúdocargo test -p ume-render
5Sprites nunca vão para atlas na build webnão copiado (nosso atlas é o motivo de desenharmos em poucos draws). Próximo passo: orçamento de upload por quadro no caminho sob demanda, porque um teto de 50 % cabe só 8 sprites nativosatlas {} no overlay F3
6Um shader para todo efeito de spritejá é verdade (sprite.wgsl: flat/RGBA/indexado/palFX/tint numa passada)cargo test -p ume-render --test shader
7Ceder controle ao decodificarload:character já roda um personagem por passo; manter decoders novos dentro desse orçamentopior quadro de carregamento no UME_WATCHDOG=1

7b. Somos melhores que eles?

Nas coisas que esta investigação mediu, sim — e nas que não mediu, não. Ser preciso importa mais que o título.

Melhores:

Port para navegadorUltimate MUGEN
Draw calls no mesmo tipo de cenaum por sprite, 82–105 por quadrofundidos por blend + scissor, teto 24, garantido por teste
Troca de paletaupload de 1 KB por sprite que muda de paletalinhas de paleta deduplicadas por conteúdo, compartilhadas entre lutadores
Custo de simulaçãomáquina de estados inteira numa thread WASM4–20 µs por tick (0,03–0,12 % de um quadro)
Aquecimento / transiçãouploads espalhados por sorte (textura por sprite)orçamento explícito por quadro, revanche não copia nada
Observabilidade de hitchnenhumaUME_WATCHDOG=1 com rótulo por fase, F3 com uploads/KB e ocupação do atlas
Licenciamento/portabilidade do conteúdoempacota personagens M.U.G.E.N de terceiroscarrega a pasta mugen/ do jogador, UMF, ou o mercado

Não melhores (ainda):

Port para navegadorUltimate MUGEN
Entregue no navegadorsim, 78 lutadores, 74 cenários, netplay com rollback GGPOa build wasm existe, mas o elenco vem em pacotes; sem catálogo equivalente
Volume de conteúdo78 lutadores, 74 cenários, packs sob demanda por lutao que o jogador instalar
Alcance de dispositivoscelulares, tablets, desktopdesktop, build Android, build de navegador

Resumo: um motor melhor nos eixos medidos e um produto menor que o deles. O PR a seguir implementa todos os itens da seção 7 que ainda estavam abertos.

8. Reproduzindo

# artefatos, ordem das requisições, tamanhos, lista de frames
NODE_PATH="$(npm root -g)" node docs/research/ikemen-web/capture.js capture

# o que o módulo do motor importa/exporta e de quais arquivos Go ele foi construído
NODE_PATH="$(npm root -g)" node docs/research/ikemen-web/wasm-artifacts.js capture/runtime-engine.bin

# contadores WebGL por quadro, de dentro do frame.html
NODE_PATH="$(npm root -g)" node docs/research/ikemen-web/frame-stats.js

O diretório capture/ passa a conter o motor gzipado, os bundles de UI, o catálogo e os pacotes de conteúdo usados acima. São necessários Playwright e Chromium; nada além disso vem de registro de pacotes de terceiros.

Duas ressalvas de medição: os números vêm do Chromium headless com SwiftShader (rasterizador em software), então trate os tempos de quadro como piso, não como resultado de GPU; e os 37 s de seleção→luta são dominados pelo download de ~50 MB de conteúdo nesse sandbox, não pela interpretação do motor.

Customizar a engine

Arquitetura

CaminhoResponsabilidade
crates/formatsLeitura de arquivos M.U.G.E.N: INI, SFF, AIR, SND, ACT, PCX, PNG, stages, sistema de arquivos virtual (pastas e zip). Sem dependência de plataforma
crates/engineMáquina de estados: expressões (expr.rs), triggers (triggers.rs), controllers (controllers.rs), HitDef (hitdef.rs), luta (matchs.rs), comandos e entrada, compilador UMF (native/)
src/Aplicação: janela, render, HUD, áudio, menus, cenários nativos, efeitos visuais, controles e gamepad
web/Página, service worker e ponte JS da versão navegador
assets/charsLutadores UMF embutidos

Fluxo de um tick: entradas → Match::tick → para cada lutador, [Statedef -3/-2/-1] e estado atual → controllers cujos triggers são verdadeiros → física → colisão e apply_hit → câmera. A simulação roda a 60 ticks por segundo, é determinística e não depende do render.

Adicionar um state controller

  1. Em crates/engine/src/controllers.rs, dentro de run, adicione um ramo com o nome em minúsculas:
#![allow(unused)]
fn main() {
"victoryquote" => { let v = n(m, "value", -1.0) as i32; m.fighters[i].victory_quote = v; }
}

victory_quote é um campo novo que você cria em Fighter.

  1. n(m, "param", padrão) lê um parâmetro numérico; n2(m, "param", padrão, índice) lê o N-ésimo valor; sc.has("param", 0) testa presença; sc.raw("param") devolve o texto.
  2. Crie o campo em fighter.rs se precisar de estado novo.
  3. Escreva um teste em crates/engine/tests/combat_logic.rs chamando ume_engine::controllers::run.
  4. Liste o nome em CNS-Scripts.md e pt-BR/Scripts-CNS.md. cargo test -p ume-engine --test it wiki_sync:: falha para um controller implementado que não está listado e para um listado que não está implementado. Devolva true no run do módulo (ou caia no último ramo) para o diagnóstico de carregamento não apontá-lo como não suportado.

Adicionar um trigger

Em crates/engine/src/triggers.rs, adicione um ramo no match de nomes:

#![allow(unused)]
fn main() {
"winko" => b(m.match_over && m.winner_side == f.side as i32 && m.won_by_ko),
}

f é o lutador avaliado e m a luta. won_by_ko seria um campo novo em Match. b(bool) converte para 0/1. Triggers que retornam float precisam aparecer em is_float de expr.rs. Liste o novo nome em CNS-Scripts.md e pt-BR/Scripts-CNS.md; o wiki_sync confere nos dois sentidos.

Adicionar um formato de arquivo

Coloque o decoder em crates/formats/src/<formato>.rs, exporte em lib.rs e teste com arquivos reais em crates/formats/tests/real_files.rs. O crate precisa continuar compilando para wasm32-unknown-unknown.

Testes

ComandoCobre
cargo test --workspace --releaseTudo
cargo test -p ume-engine --test kfmKung Fu Man de referência
cargo test -p ume-engine --test it combat_logic::Regras de combate
cargo test -p ume-formatsDecoders
cargo clippy --workspace -- -D warningsLint
node scripts/web-smoke.js web/distVersão web no Chromium
node scripts/web-match-smoke.js web/distPartida completa no Chromium: inputs, rounds, sem travar, resultados

Regras de código

  • Sem comentários no código: nomes de funções, tipos e variáveis devem explicar a intenção. Explicações ficam nesta wiki.
  • A simulação (crates/engine) não usa relógio, threads nem aleatoriedade fora de Match::random, para manter replays e rollback.
  • Nada de alocação dentro de Match::tick em código novo.
  • Arquivos ficam abaixo de 250 linhas, um assunto cada, divididos pelo eixo de mudança: veja Layout de arquivos e node scripts/file-size.mjs.
  • Mensagens de commit no padrão Conventional Commits (feat:, fix:), validadas por scripts/commit-lint.mjs.

Decisões de arquitetura

TemaEscolha
Renderwgpu (Vulkan, Metal, DX12, WebGPU, WebGL2), paleta aplicada em shader
ScriptsCNS e ZSS para lutadores, UMF JSON para o formato nativo; sem Lua
ExpressõesBytecode de pilha
Áudiokira + symphonia
Redeggrs (rollback) + matchbox (WebRTC)

A migração está descrita em docs/ROADMAP.pt-BR.md.

Dono do estado e controle

Um lutador roda o estado a partir da definição que o forneceu: o .cns dele, o common1.cns compartilhado, ou a definição de outro personagem (TargetState, p2stateno, um arremesso). Três regras mantêm o controle fluindo:

  • Um número de estado que o personagem define sempre roda a partir da definição dele, então voltar de um estado de engine (face-off, despertar) ou de um estado do common1 devolve o controle em vez de deixar o lutador preso à definição compartilhada.
  • Estados do common1.cns são do próprio jogador: os estados -1 do personagem e as transições de andar/pular/agachar da engine continuam rodando durante um get-hit, deitado ou qualquer estado compartilhado — personagens M.U.G.E.N. cancelam golpes pelo -1 assim.
  • Só um estado customizado dado pelo oponente pausa esses estados, porque o script de quem deu é dono do lutador até devolver o controle.

Um lutador cujo dono do estado não é ele mesmo nem o common1 está "em estado customizado"; é esse o teste que protege toda transição vinda do input, e perdê-lo faz o personagem ficar parado mesmo parecendo vivo (ctrl, estado 0).

HUD glass e efeitos de impacto

  • Os painéis do HUD em luta são "glass": ume_shell::quad::glass_panel registra até 16 retângulos arredondados por quadro, e o passe de composição do pós-processamento troca esses pixels por uma cópia desfocada da cena (um quarto da resolução, blur separável, sem alocações por quadro), com tinta, sombra e brilho na borda. Com o pós-processamento desligado (nível fx 0) o HUD usa polígonos translúcidos.
  • O feedback de impacto é discreto: guard e counter usam o mesmo rótulo pequeno com anel, o super arts só tem uma rajada leve de anéis e um rótulo compacto, e a quantidade simultânea de textos, anéis, luzes e partículas tem limite em src/vfx.rs.

Entradas de Kit

English

Os lutadores nativos não compartilham mais o mesmo conjunto de entradas. Cada arquétipo troca alguns movimentos de meia-lua por entradas que combinam com seu estilo. A lista de golpes do menu de pausa mostra a entrada real de cada golpe.

  • Valdric (Soberano) e Volta (Tesla): carga, segurar trás por 40 ticks e depois frente + botão.
  • Bruno (Lariat) e Daichi (Aura Rush): movimento de 360° + botão, estilo grappler.

Golpes com variante aérea mantêm entradas que podem ser feitas no ar.

Mobilidade aérea

stats.airDashes define quantos air dashes o lutador tem antes de pousar (padrão 1). Rushdown e aéreos ganham mais, grapplers menos: Suzume, Jin, Akio, Lian e Kaito têm 2, Bruno tem 0 e os demais têm 1.

Continuações rekka

Um golpe só começa a partir de outro declarando rekka no JSON do personagem:

{"id":"gust_cross","name":"Gust Crossup","input":"b","kind":"special","anim":"mirage","rekka":{"after":["gustdash"],"window":[6,20]}}

after lista os ids dos golpes de origem, window é o intervalo de tempo de estado (ticks dentro do golpe de origem, a pausa de acerto não conta) em que o comando é aceito, e contact: true exige também que a origem acerte ou seja defendida. Sem isso a continuação funciona também no erro. A continuação nunca começa do neutro, então pode reaproveitar um botão simples já usado por um normal. Código: crates/native/src/rekka.rs.

Em uso: Lian (Flowing Silk Kicks, depois y), Kaito (Storm Rush, depois x) e Jin (Gust Dash, depois b).

Requisitos de distância e estado

requires também aceita distance (pixels entre os corpos, min e/ou max) e enemyState (air, ground, crouch, down, hit ou attack). Dois golpes podem dividir o mesmo comando e a engine escolhe pela situação, desde que as condições não se sobreponham. A variante deve vir antes do golpe que ela substitui na lista moves, porque vale o primeiro que servir.

Em uso: Daichi (Landslide Point Blank a até 55 pixels, senão Landslide Heel) e Bruno (Bull Catch contra inimigo no ar, senão Bulldozer Rush).

Esquema UMF

docs/schema/umf-2.schema.json é a definição legível por máquina dos lutadores UMF 2 e dos kits umf-kit/1. É um JSON Schema (2020-12) que espelha as structs serde de crates/native/src e rejeita chaves desconhecidas: "hitz" ou "lyfe" falha em vez de ser ignorado pelo carregador.

Validar um lutador

node scripts/umf-schema.mjs                       # todos os lutadores, kits e exemplos do repositório
node scripts/umf-schema.mjs caminho/lutador.json  # um arquivo, por exemplo um pacote do mugen-assets

O validador fica no repositório (scripts/umf-schema.mjs, sem dependência). O CI roda por scripts/umf-schema.test.mjs no job release-scripts, então um lutador do jogo que quebre o esquema reprova o pull request. Os erros mostram o ponteiro JSON: assets/chars/kaito.json: /moves/3/hits/0/level: "mid" is not one of ["light","medium","heavy"].

Usar no editor

Coloque "$schema" no lutador (o carregador ignora) ou mapeie o arquivo nas configurações do editor. VS Code:

{ "json.schemas": [{ "fileMatch": ["assets/chars/*.json", "umf/**/*.json"], "url": "./docs/schema/umf-2.schema.json" }] }

O que cobre

ÁreaDefinição
Identidade e perfilid (^[a-z0-9][a-z0-9_-]*$), profile com textos en, pt, es, element, alignment
stats, passives, abilitiesNúmeros tipados, fly, teleport, superSpeed, charge, forms
animsframes como "pose*ticks" ou objetos com pose, sprite, effect, hit, hurt, offset, ticks
moveskind, when, hits, projectile (um ou lista), cancels, rekka, throw, cinematic, explods, afterimage, shake, flash, superPause, followUp, blink, vfx, quake, velMul, velAdd, posFreeze, posSet, palFx
helpers, bossRules, scriptsStand, clones, fases de chefe, ganchos ZSS e CNS
Kits e extendsLutador com extends ou format: "umf-kit/1" pode omitir os campos obrigatórios; o golpe então precisa só do id

art.poses e art.style são objetos abertos: pertencem ao pipeline de sprites e ao rig obsoleto. Os campos legados stage e country no topo são aceitos e ignorados.

O que não verifica

Referências entre partes (um nome de anim que exista, um id de cancels que exista, um PNG que exista) e o piso de balanceamento. Isso continua nos testes Rust (native_quality_bar e os testes do elenco).

Mudar o formato

Mudar uma struct serde em crates/native/src exige mudar o esquema no mesmo pull request. Rode node --test scripts/umf-schema.test.mjs: ele falha quando o esquema rejeita um lutador do jogo, que é como aparece um campo novo no carregador e ausente no esquema.

Formato de armazenamento

JSON para definições e PNG para sprites foram medidos contra MessagePack, CBOR, bincode, postcard, QOI, WebP sem perda, LZ4 e atlas: veja o ADR 0008.

Testes de estresse e resiliência

Cobertura

ÁreaTesteComando
Parsers (SFF, AIR, INI/DEF/CNS/CMD, SND, ACT, PCX, PNG, zip, stage)Fuzzer determinístico por mutação, usando o zip do kfm como semente. Falha em qualquer panic ou entrada acima de 1,5 s.UME_FUZZ_ITERS=4000 cargo test -p ume-formats --release --test it fuzz::
Spam de Explod, Projectile e Helper a cada tickCusto do tick continua limitadocargo test -p ume-engine --release --test it stress:: -- --nocapture
Caminhos quentesBench embutido: SFF, AIR, CNS, carga de personagem, tick com 2, 6 e 10 lutadorescargo run -p ume-engine --release --example hotpath_bench
Rollback com latênciacrates/netplay/tests/rollback.rscargo test -p ume-netplay

Achados e correções

  • Um SFF corrompido podia declarar sprite 65535x65535: de 3 a 48 s e gigabytes de RAM. Sprites e PNGs acima de 16M pixels (MAX_SPRITE_PIXELS) agora viram sprite vazio.
  • Explods e projéteis não tinham limite. Com Helpers criando coisas a cada tick, 240 ticks levavam 72 s, com custo quadrático. Ambos agora têm teto de 256; novos além disso são descartados, como no MUGEN. 2000 ticks com 61 lutadores levam 1,2 s (cerca de 0,6 ms por tick).

Números (kfm720, release)

CaminhoTempo
Decodificar SFF1,1 ms
Parse de AIR1,0 ms
Parse e compilação de CNS3,2 ms
Carga do personagem sem imagens7,6 a 10 ms
Tick com 2 lutadores5 us
Tick com 6 lutadores15 us
Tick com 10 lutadores39 us

A simulação está muito abaixo dos 16,6 ms por quadro; carga e renderização são onde vale otimizar.

Comparação e próximos passos

  • O GGRS tem SyncTestSession (resimula todo quadro e compara checksums) e detecção de desync; rodar isso no CI numa luta roteirizada pegaria não-determinismo cedo.
  • O Ikemen GO fez o rollback salvando e restaurando o estado completo; o custo é o tamanho do estado, por isso evitar alocações por tick (já testado em tick_alloc) importa.
  • Ainda não coberto: perda de pacotes e jitter no harness de netplay (hoje só latência), recuperação de device-lost da GPU, pouca memória, fuzzer de CNS/expressões e stress carregando muitos personagens.

Estudo de screenpacks

O que screenpacks (motifs) de M.U.G.E.N e Ikemen GO fazem de diferente de um menu simples e o que o Ultimate MUGEN aproveitou. Só as ideias são usadas; nenhuma arte, layout ou som de terceiros é copiado.

Fontes

Mesmas fontes da versão em inglês (Screenpack-Study): wiki do Ikemen GO (Screenpack features, Updating to 1.0), DeepWiki do menu, issue 329 e threads do MUGEN Guild. A busca ficou limitada a fóruns e espelhos de wiki, então os nomes de parâmetros vêm de fontes secundárias.

Diferenciais

ÁreaDiferencialUltimate MUGEN
Estruturasystem.def aponta para select.def, fight.def, sprites, sons e fontes, com fallback para o motif padrãoIgual, veja Screenpacks
SeleçãoGrid e cursor por parâmetros, retratos animados, stage por personagemJá nativo, veja Character-Select
VersusOrder select na tela de versus, retratos animadosPendente (order select)
VitóriaRetrato, nome e frase do vencedorPose e nome existiam; frase pendente
ResultadosTempo, combo e dano, melhores tempos no time attackNovo painel de estatísticas
ResoluçãoPacks 4:3 e 16:9 via localcoordlocalcoord convertido para 426x240

Implementado

A tela de resultados mostra quatro chips de vidro: tempo de luta, maior combo de cada lado, dano total causado por cada lado e vida restante em porcentagem. src/match_stats.rs observa a partida a cada tick, fora do motor determinístico, então rollback e replays não mudam. Textos em inglês, português e espanhol.

Próximos

  1. Order select na tela de versus em modos de time.
  2. Frase de vitória sob o nome do vencedor.
  3. Nota (S a D) por tempo, vida restante e combo.
  4. Melhores tempos por personagem no time attack.

Densidade do grid

O grid de seleção tem três predefinições, alternadas com G na tela de seleção e salvas como grid= na configuração: compacto (9 linhas), normal (7 linhas, o padrão anterior) e grande (4 linhas). O arquivo de configurações foi dividido em settings/persist.rs, settings/window.rs e settings/tests.rs.

Estudo de lutadores: 50+ lutadores e o que ensinam

Resumo em português de Fighter Study: mais de 50 lutadores de jogos comerciais e do M.U.G.E.N foram estudados (SRK, Dustloop, StrategyWiki, MKKomplete). A tabela completa está no arquivo em inglês.

Padrões transformados em recursos

  1. Golpes de avanço e investidas com armadura (lunge, shoulder), que ainda cancelam em especiais.
  2. Mergulhos aéreos com velocidade angular e quique no chão (falcondive, meteordrop).
  3. Especiais que cancelam em outros por cancels explícito.
  4. Anti-aéreos com invulnerabilidade e armadura de um golpe em golpes lentos e pesados.
  5. Rápidos trocam dano por mobilidade (superSpeed, teleport); fortes ganham armor, wallBounce e golpes heavy.

Como são feitos do zero

  1. Projetar o kit. 2. Arte em pixel art com paleta única, prerender 3D ortográfico ou rips. 3. Empacotar em SFF, AIR, CMD, CNS. 4. Frame data: leves 3-5 ticks de startup, pesados 8-14. 5. Balancear no modo treino.

Veja as skills mugen-character-creator e mugen-to-ume-migrator.

Ferramentas de desenvolvimento

English · Português (BR)

As ferramentas de build e auditoria do repositório são binários Rust, não scripts. crates/devtools gera o ume-tools:

ComandoSubstituiO que faz
ume-tools pack-sprites [out] [--sprites dir]scripts/pack_sprites.pyEmpacota assets/chars/sprites/<id>/ em <out>/assets/chars/sprites/<id>.pack para o build web (limite de 768 px, 256 cores em sprites LZ4, âncoras do meta.json reescaladas, em paralelo). Chamado por scripts/build-web.sh
ume-tools cook-sff <in.sff> <out.sff>-Reempacota um .sff como UMSF LZ4 e falha se algum sprite decodificar diferente. Veja Container de Sprites
ume-tools stage-thumbs [stages]scripts/generate-stage-thumbnails.pyGrava miniaturas 240x135 (Lanczos) em <stages>/thumbs
ume-tools audit-moves [dir] [--json]scripts/audit_native_moves.pyAuditoria estática do elenco: inputs, cancels, throws, hit boxes
ume-tools audit-sprites --out report.jsonscripts/audit_native_sprites.pyInventário de PNGs por arquivo com limites alfa
ume-tools mugen-census <zip-ou-pasta>...novoConta estados, controllers, comandos e ações de animação de pacotes M.U.G.E.N e relaciona os controllers mais usados aos campos do UMF, veja Estudo de código M.U.G.E.N

Rode com cargo run --release -p ume-devtools --bin ume-tools -- <comando>. A cobertura de resolução de poses é native_sprite_audit --require-complete (o native_sprite_coverage.py removido apenas a espelhava). As ferramentas de criação de personagem ficam em crates/charforge (Ferramentas de sprites, Gerador de golpes).

Ainda em Python

Resta apenas tools/story_segments.py: ele desenha as faixas dos cenários do modo história com o gerador aleatório do Python e rasterizadores do Pillow, e a arte já versionada precisa continuar idêntica, então não foi portado. O resto é ume-tools: gen-story-npcs (idêntico ao script antigo, mas sobrescreve arquivos de NPC que divergiram), motion-descriptor, preview-motion, preview-scene, ability-reel (ffmpeg; legendas com fonte bitmap embutida) e a biblioteca umf_edit (edição de JSON preservando ordem das chaves e fim de linha). O script avulso da imagem de showcase foi removido; a imagem continua versionada.

Ferramentas de Sprites

Ferramentas locais (Rust, charforge binary) em crates/charforge/ (spritekit module) que transformam arte gerada em assets prontos para MUGEN. Nunca tocam assets/chars nem cenários: a saída vai para a pasta escolhida.

cargo run --release -p ume-charforge -- slice folha.png saida/ --group 9000 --axis feet
cargo run --release -p ume-charforge -- slice folha.png saida/ --mode grid --grid 6 2
cargo run --release -p ume-charforge -- palettes base.act variantes/ --only red blue dark --keep 1 2
cargo run --release -p ume-charforge -- air saida/manifest.json --action 200 --ticks 4 --attack
cargo test --release -p ume-charforge
FerramentaO que faz
sliceDetecta o fundo (transparência ou cor da borda), recorta por pedaços conectados ou por grade, põe o eixo nos pés (chão comum por fileira), monta uma paleta única de 256 cores (índice 0 transparente, avisa se quantizou) e grava PNGs indexados e manifest.json
palettesGera variantes .act (matiz, saturação, brilho) a partir de um .act base; o índice 0 e os de --keep não mudam
airGera uma action AIR a partir do manifesto com Clsn2 anatômico (cabeça, tronco, pernas) e Clsn1 opcional para membros estendidos, relativos ao eixo de cada sprite

collision_boxes.py também oferece interpolate_boxes para quadros intermediários.

O que não foi portado

O gerador de golpes está em Gerador de Golpes. Os editores gráficos, o assistente de IA e o servidor MCP do CharFactory, o simulador tick a tick e os escritores SFF/SND se sobrepõem ao próprio motor (crates/formats, crates/engine, mugen_check) ou são grandes. Os candidatos futuros estão na página do Gerador de Golpes.

Créditos

Abordagem inspirada no CharFactory de eduardovbe, licença MIT, Copyright (c) 2026 eduardovbe. O código aqui é uma implementação nova e menor; o aviso MIT está em REFERENCES.md.

Flags do AssertSpecial

AssertSpecial aceita flag, flag2, flag3, flag4 e flag5 (uma lista separada por vírgulas em um único parâmetro também funciona) e um enabled opcional (padrão 1). Os nomes não diferenciam maiúsculas de minúsculas. O conjunto completo do Ikemen GO v1.0.0 é entendido: 58 flags por personagem e 19 flags globais, mais a extensão Immovable da engine.

Uma flag vale para o tick em que é afirmada. Durante o hit pause as flags afirmadas antes da pausa continuam ligadas (comportamento do Ikemen); AnimateHitPause precisa ser afirmada de novo a cada tick. IsAsserted(<flag>) lê a mesma tabela, então IsAsserted(NoWalk) e IsAsserted(TimerFreeze) funcionam.

Uma flag fora da tabela é ignorada. O carregador imprime uma linha AssertSpecial flags not recognised and ignored por personagem e o mugen_check imprime uma linha UNKNOWN-FLAGS.

Flags globais (19)

FlagEfeito
IntroSegura o round na introdução (limite de 10 s)
RoundNotOverSegura o estado de fim de round (limite de 15 s)
TimerFreezeO cronômetro do round para
RoundFreezeO cronômetro e o relógio do estado do round param
RoundNotSkipO atalho de pular o face-off do primeiro round com um botão de ataque fica desligado
CameraFreezeA câmera não se move
GlobalNoKONinguém leva KO; a vida para em 0 e o round continua
GlobalNoShadowSem sombras nem reflexos
NoKOSlowSem câmera lenta no KO
NoKOSndSem som de KO
NoMusicA música é silenciada
NoBG / NoFGAs camadas de trás / da frente do cenário não são desenhadas
NoBarDisplayTodo o HUD da luta (barras, cronômetro, quadros dos parceiros, contador de combo) some
NoTimeDisplayO cronômetro some
SkipFightDisplay / SkipRoundDisplay / SkipKODisplay / SkipWinDisplayO anúncio "FIGHT!", "ROUND n", "K.O." ou de vitória não aparece

Flags por personagem (58 + Immovable)

FlagEfeito
Invisible, NoShadowO sprite ou a sombra não é desenhado
UnguardableOs ataques do jogador não podem ser defendidos
NoStandGuard, NoCrouchGuard, NoAirGuardO jogador não defende nesse tipo de estado e não entra no estado de defesa
NoJuggleCheckOs pontos de juggle não são cobrados dos golpes do jogador
NoAutoTurn, NoWalk, NoJump, NoAirJump, NoCrouch, NoStandDesligam as transições embutidas de virar, andar, pular, pulo duplo, agachar e levantar
NoHardcodedKeysDesliga todas as transições embutidas por tecla (andar, pular, agachar, defender)
AutoGuardDefende como se "trás" estivesse pressionado
NoKOO jogador não leva KO ao chegar a 0 de vida; nos modos de equipe, ele também impede a eliminação do time enquanto permanecer em jogo
NoHitDamage, NoGuardDamageGolpes / golpes defendidos não tiram vida do jogador
NoRedLifeDamageGolpes não aumentam a vida vermelha do jogador
NoDizzyPointsDamageGolpes não reduzem os pontos de tontura do jogador
NoGuardPointsDamageGolpes defendidos não reduzem os pontos de defesa do jogador
NoScoreGolpes não alteram a pontuação do jogador
NoGuardKOUm golpe defendido não mata o jogador
NoKOFallO golpe que dá KO não força a queda
NoKOVelocityO golpe que dá KO não soma a velocidade extra de KO
NoFallHitFlagO jogador ignora o hitflag F enquanto cai
NoCornerPushO jogador não é empurrado para trás após acertar um oponente no canto
ImmovableExtensão da engine: a pushbox do oponente não consegue mover o jogador
AnimateHitPauseA animação continua durante o hit pause
AnimFreezeA animação para
NoInputBotões e direções são zerados
PostRoundInputOs comandos são lidos depois do fim do round
RunFirst, RunLastOs estados do jogador rodam antes / depois dos demais no próximo tick
NoDestroySelfDestroySelf não faz nada
NoMakeDustO efeito de poeira embutido não é criado
NoAILevelAILevel retorna 0 para o jogador
DrawUnderO jogador é desenhado atrás dos outros lutadores
NoLifeBarDisplay, NoPowerBarDisplay, NoFaceDisplay, NoNameDisplay, NoWinIconDisplay, NoComboDisplayA parte correspondente do HUD some

Registradas e legíveis por IsAsserted, mas a engine ainda não tem a mecânica correspondente: NoAIButtonJam, NoAICheat, NoBrake, NoFaceP2, NoFallCount, NoFallDefenceUp, NoFastRecoverFromLieDown, NoGetUpFromLieDown, NoIntroReset, NoLifeBarAction, NoGuardBarDisplay, NoStunBarDisplay, NoTurnTarget, ProjTypeCollision, SizePushOnly.

Gerador de Golpes

crates/charforge/ (movekit module) transforma uma descrição TOML dos golpes em texto MUGEN: animações com caixas Clsn automáticas, statedefs, entradas de comando e um bloco [Statedef -1]. Edite o spec e gere de novo em vez de editar a saída à mão.

cargo run --release -p ume-charforge -- moves golpes.toml saida/
cargo test --release -p ume-charforge

Grava moves.air, moves.cns, moves.cmd e statedef-1.cns. Um exemplo completo está em crates/charforge/examples/moves.toml; ele espera sprites fatiados pelas Ferramentas de sprites em sprites/manifest.json.

Spec

ChaveSignificado
[defaults]sprite_manifests, clsn1_height (altura em pé, aumenta a caixa de ataque), hitsound, guardsound, super_sound, voice_channel
kindnormal, crouch, air, special, air_special, super, projectile, throw (define dano, pausa, poder e atributo padrão)
state, animNúmero do estado e da animação (padrão: o estado)
command, command_name, command_timeNotação de entrada MUGEN; nome padrão spec_<estado>
frames[grupo, item, ticks, "hit"?, {x, y, flip, trans, clsn1, clsn2}?]; "hit" põe Clsn1 automática
hitLista de HitDef; elem ou elems escolhem os elementos (padrão: primeiro quadro com Clsn1); extra adiciona parâmetros brutos
sounds, vel, vfx, helpers, cancel, extra, voicePlaySnd, velocidade, Explod, Helper, cancelamentos e controladores brutos
power, superpauseCusto de poder e SuperPause para supers
phasesEstados encadeados com name, next, like; o golpe é o primeiro estado

As entradas geradas no [Statedef -1] ficam na ordem super, especial, agarrão, normal e usam roundstate = 2, tipo de estado e poder.

Validação

cargo run --release -p ume-charforge -- check <pasta_do_char> --strict carrega o personagem com o loader do motor e mostra os mesmos diagnósticos do mugen_check; --strict falha em controladores, triggers ou parâmetros sem suporte.

Próximos candidatos do CharFactory

Simulador de golpes tick a tick para frame data, ajuste de combos, ferramentas de faixas de paleta e renderizador de contact sheet. Ainda não portados.

Créditos

Abordagem inspirada no CharFactory (MIT, Copyright (c) 2026 eduardovbe). Implementação nova; veja REFERENCES.md.

Golpes em pé (regra de queda)

Os lutadores caíam em cerca de um a cada sete golpes no chão. A regra abaixo faz golpes leves e médios apenas empurrarem o defensor, que continua em pé; golpes fortes, supers e combos longos ainda derrubam.

Regra

Num golpe em defensor no chão e vivo cujo HitDef pede fall, a engine mantém o defensor em pé quando todas as condições valem:

  • o golpe tira menos que o limiar da vida máxima do defensor (padrão 16%);
  • o total do combo com este golpe fica abaixo de 3x o limiar (combo longo ainda termina em queda);
  • o atacante está no escopo (padrão: só lutadores nativos);
  • o ataque não é hyper (attr H*), não tem down.bounce, wall.bounce nem ground.type trip, nem p2stateno, nem forcenofall;
  • o golpe não é o que mata.

Quando se aplica, o defensor usa os estados de hit em pé (5000/5010, depois 5001/5011), a velocidade vertical é descartada e o empurrão horizontal cresce até 75% (quanto mais perto do limiar, maior). Golpes em defensor no ar (juggles) nunca são alterados.

Código: crates/engine/src/matchs/knockdown.rs (Match::standing_push), ligado em Match::apply_hit.

Escopo e compatibilidade

EscopoCobreMotivo
Nativos (padrão)golpes de lutadores UMFo fall vem de level: heavy / launch, não é escrito golpe a golpe
Todostambém lutadores M.U.G.E.NHitDefs M.U.G.E.N definem fall de propósito (rasteiras, lançadores); opcional
Clássiconinguémcomportamento M.U.G.E.N exato

O escopo segue o atacante, porque o HitDef é dado dele.

Ajuste

Ajustes > Jogabilidade > Quedas ao apanhar (knockdown em ultimate-mugen.cfg): Clássico, Nativos 8%, Nativos 16% (padrão), Nativos 24%, Todos 16%. Limiar maior significa menos quedas. O valor é gravado nos replays (replays antigos tocam como Clássico) e o netplay usa o preset padrão.

Medição

ume-tools knockdown-rate --roster akio,bruno,... --frames 5400 --rule native --threshold 16 simula IA contra IA no elenco e mostra, por faixa de dano, quantos golpes em defensor no chão terminaram em queda.

Importação de Sprite Atlas

O CLI limita os arquivos de atlas a 64 MiB, as dimensões a 16.384 pixels por lado e 8 milhões de pixels no total, e o canvas de saída a 2.048 pixels para limitar o uso de memória.

O exemplo import_sprite_atlas valida e importa um atlas transparente em grade de 3 colunas por 2 linhas com seis poses. O atlas de origem permanece intacto e o importador exporta um PNG independente para cada nome solicitado.

cargo run -p ume-engine --example import_sprite_atlas -- --atlas .\poses.png --out assets\chars\sprites\lutador --cols 3 --rows 2 --names 01_idle,02_walk,03_attack,04_crouch,05_hit,06_fall --canvas 400 --validate-only
cargo run -p ume-engine --example import_sprite_atlas -- --atlas .\poses.png --out assets\chars\sprites\lutador --cols 3 --rows 2 --names 01_idle,02_walk,03_attack,04_crouch,05_hit,06_fall --canvas 400

--canvas usa 400 pixels por padrão. Cada saída tem esse tamanho quadrado; os pixels opacos são redimensionados uniformemente com amostragem pelo vizinho mais próximo, centralizados horizontalmente pela célula e alinhados pelos limites alfa ao chão comum em y=392. O padding transparente da célula não afeta o posicionamento. A referência padrão para a pose em pé é 80% da altura da célula de origem. Use --reference-height para informar a altura alfa da pose em pé quando a família do personagem exigir calibração explícita. A mesma referência é aplicada às seis poses, mantendo a escala das poses agachadas e caídas. Apenas os limites opacos transformados precisam caber no canvas.

O importador exige alfa RGBA real, seis células não vazias e um componente alfa conectado relevante em cada pose. Alfa abaixo de 16 é removido dos frames exportados e ignorado na validação de borda e componentes. Poses cuja alfa alcança a borda da célula e atlas com excesso de componentes alfa isolados são rejeitados; inspecione e corrija o atlas em vez de aceitar poses cortadas ou ruído. Essas verificações são diagnósticos, não aprovação de qualidade visual. --validate-only também normaliza as seis poses e verifica se os limites opacos cabem antes de aprovar. Os seis PNGs são codificados antes de qualquer arquivo de saída ser gravado.

meta.json é mesclado sem descartar campos não relacionados. Cada entrada frames[name] importada registra a referência de 320 pixels e os eixos normalizados (axisX=200, axisY=392 por padrão). O importador preserva o refHeight de nível superior como estava, inclusive deixando-o ausente, para manter o fallback pela altura da imagem nos frames antigos. Entradas de frame existentes com os mesmos nomes são substituídas. PNGs existentes são protegidos, a menos que --overwrite seja informado. --validate-only valida e verifica colisões sem gravar arquivos.

Evidência de validação: um atlas RGBA sintético de 300x200 com padding passou pela validação e produziu seis PNGs de 400x400. A decodificação independente confirmou que a última linha opaca era 391, alinhada à borda do chão em axisY=392, sem alfa exportado abaixo de 16. Um fixture com alfa atravessando a borda da célula e uma normalização grande demais foram rejeitados; o modo de validação não criou a pasta de saída. O atlas gerado do ciclo de caminhada do Bruno também passou pela validação e importação com --reference-height 468; a saída teve bbox x=115..271, y=75..391 sem alfa abaixo de 16. O SHA-256 do atlas de origem permaneceu 56AED5E92D7F55A80C0CD288DA983E033DA17EEB6F67D8A95D099F0147ACE1D7.

O gravador PNG converte canais RGBA não pré-multiplicados para a representação pré-multiplicada do tiny-skia antes de codificar. Os bytes do atlas nunca são modificados.

Instalação e execução

Baixar pronto

Baixe o arquivo da sua plataforma na página de Releases, descompacte e rode ultimate-mugen (Windows: ultimate-mugen.exe ou run.bat). A versão desktop confere a release mais nova por HTTPS e pergunta antes de baixar e instalar; veja Atualização automática. Esconda a pergunta com --no-auto-update / UME_NO_AUTO_UPDATE=1 ou nem verifique com --no-update-check / UME_NO_UPDATE_CHECK=1.

Compilar

Pré-requisito: Rust estável (rustup.rs).

Linux (Debian/Ubuntu):

sudo apt-get install -y pkg-config libudev-dev libasound2-dev libx11-dev libxi-dev libgl1-mesa-dev
AlvoComando
Desktopcargo run --release
Testescargo test --workspace --release
Web (PWA)rustup target add wasm32-unknown-unknown e ./scripts/build-web.sh, depois python3 -m http.server -d web/dist 8080
Androidcargo install cargo-apk --version 0.9.6 --locked e cargo apk build -p ultimate-mugen --lib --release --target aarch64-linux-android
iOScargo install cargo-bundle e cargo bundle --release --target aarch64-apple-ios (macOS + Xcode)

Estrutura de pastas ao lado do executável

ultimate-mugen(.exe)
ultimate-mugen.cfg        configurações salvas pelo menu
mugen/
  chars/<nome>/<nome>.def personagens M.U.G.E.N
  stages/<nome>.def       cenários M.U.G.E.N
  <qualquer>.zip          pacotes zipados (personagens ou cenários)

A pasta mugen/ é procurada, nesta ordem: em UME_MUGEN_DIR, no diretório atual, ao lado do executável e dois níveis acima dele.

Kits inspirados em Bleach

Tres lutadores nativos copiam habilidades de personagens de Bleach. Os nomes dos personagens nao mudam: e so inspiracao. Tudo e dado em assets/chars/*.json; nenhum sprite, cenario ou codigo do engine mudou.

Kaname Fuyutsuki (estilo Byakuya)

Espadachim nobre e preciso: byakurai (~D, DF, F, y, raio fino rapido), shakkaho (~D, DB, B, x, bola vermelha), shunpo_behind (D, D, a, passo relampago com corte) e o super kageyoshi (~D, DF, F, D, DF, F, y, tempestade de petalas). Regeneracao de energia sobe para 0.5.

Suzume Kagerou (estilo Yoruichi)

shunko (~D, DB, B, y) e flash_cat (D, D, b). Ganho de velocidade por pilha sobe para 0.04.

Shion Kurogane (estilo Zaraki)

reckless (D, D, x, armadura de dois golpes) e furia a partir de 50% de vida (ate 1.5x) somada ao enrage por tempo.

Byakuren Sakuraba (Personagem Secreto do Modo História — Inspirado em Kuchiki Byakuya)

Desbloqueado automaticamente ao zerar o Modo História (stats.story.clear >= 1 em assets/routes/unlocks.toml). Conta com pacote próprio de sprites pixel-art em branco/preto/sakura (assets/chars/sprites/byakuren/), 6 efeitos sonoros WAV originais (snd_200_0..5.wav) e explora todos os recursos do UMF 2.0:

  • Habilidades Core: Caminhada Espiritual (fly), Shunpo (teleport), Senka (superSpeed), Carga de Reiatsu (charge) e clone autônomo Utsusemi (helpers.clones).
  • Kido & Shikai: Chire, Sakuramai (chão e ar), Hadō #4: Byakurai, Hadō #33: Sōkatsui, Bakudō #61: Rikujōkōrō, Bakudō #81: Dankū e Shunpo: Senka com teleporte nas costas.
  • Transformações em 2 Estágios: Forma 1 (Bankai: Mil Pétalas da Sombra — libera Maré de Pétalas e Gokei: Cúpula) e Forma 2 (Shukei: Hakuteiken — libera o golpe supremo de 2 barras Juízo Branco).

Layout de arquivos

English · Português (BR)

Uma feature precisa ser revisável e mesclável sem esperar as outras. Isso só funciona quando cada arquivo tem um único motivo para mudar: duas pessoas trabalhando em features diferentes mexem em arquivos diferentes, e um PR que adiciona um modo não reescreve o arquivo que outro PR está editando.

A regra de 250 linhas

  • Nenhum arquivo de código passa de 250 linhas físicas (node scripts/file-size.mjs).
  • O limite não é meta. A maioria dos arquivos deve ficar entre 80 e 200 linhas: se um arquivo já tem dois motivos para mudar com 120 linhas, divida agora.
  • A regra vale para Rust, JavaScript, TypeScript, CSS, HTML e WGSL - todo arquivo que um desenvolvedor lê como código.
  • Não vale para conteúdo e documentação: JSON UMF, .cns, .air, .def, .snd, atlas de sprites, páginas .md e imagens geradas.
  • Tabelas Rust geradas contam como código. Quando não couberem, coloque-as em um arquivo só de dados, em uma pasta com o nome da tabela (por exemplo native/tables/), para ninguém editar à mão.

Arquivos legados (catraca)

A árvore já tem arquivos acima do limite. Eles estão em scripts/file-size-baseline.json com a contagem exata de linhas no dia em que a regra entrou.

  • Um arquivo no baseline pode continuar grande, mas não pode crescer uma linha.
  • Um arquivo fora do baseline nasce com menos de 250 linhas.
  • Um arquivo que desce para menos de 250 linhas sai do baseline. Rode node scripts/file-size.mjs --update no mesmo PR que o dividiu.
  • Nunca regenere o baseline para aumentar um número. --update só é válido junto com uma divisão.

O CI roda node scripts/file-size.mjs; uma execução com falha lista cada caminho, a contagem e o limite.

Uma responsabilidade por arquivo

Um arquivo tem uma responsabilidade quando todas as respostas abaixo são iguais:

PerguntaMesma responsabilidadeResponsabilidades diferentes
Por que ele mudaria?duas funções mudam quando o formato mudauma muda com o formato, a outra com a câmera
Que dados ele possui?uma struct e seus auxiliaresvárias structs que conversam entre si
Quem revisa?o mesmo revisor com o mesmo contextoum especialista diferente
Dá para testar sozinho?sim, pela API pública da cratesó pela tela inteira

O nome do arquivo declara a responsabilidade: collision.rs, hitdef.rs, palette.rs, lifebars.rs. Nomes que escondem a responsabilidade são recusados na revisão: utils.rs, helpers.rs, misc.rs, common.rs, manager.rs.

Formato de pasta

Uma feature é uma pasta; o arquivo ao lado é a face pública dela.

crates/native/src/
  mod.rs            fachada: declarações e reexports, só isso
  compile.rs        JSON UMF -> estados
  pack.rs           empacotamento de atlas
  effects.rs        efeitos de projétil e faíscas (única arte desenhada pelo motor)
  effects/
    dragon.rs       efeito do dragão de energia
  • feature.rs guarda os tipos compartilhados por todas as partes e as funções que o resto da crate chama.
  • feature/<assunto>.rs guarda um assunto cada. O Rust permite uma pasta ao lado do arquivo de mesmo nome, então não é preciso mod.rs dentro dela.
  • mod.rs é fachada: declarações de módulo e pub use, nada mais. Mire em 60 linhas; mod.rs com lógica é arquivo que não foi dividido.
  • Leve o tipo junto do código que o possui. Mantenha o caminho antigo funcionando com um reexport (pub use collision::ResolvedHit;) para a divisão não virar um rename na árvore inteira.
  • A aplicação segue a mesma ideia: src/app.rs mantém o frame e o estado, src/app/<tela>.rs é dona de uma tela cada.

Mapa de telas em src/app/

src/app.rs guarda o estado de App, o despachante por frame (App::frame) e as telas ainda não divididas (seleção de personagem, carregamento do VS). Cada outra tela é um arquivo, então mudar uma tela nunca toca em outra:

ArquivoResponsável por
mode.rs, screen.rs, team.rsTipos Mode, Screen e Team (reexportados por app)
title_screen.rs, menu_screen.rs, menu_focus.rsTítulo, menu principal, foco suavizado do menu
stage_select.rsGrade de cenários
load_plan.rs, vs_screen.rsQuem carrega com qual paleta, tela de VS, start_fight
fight_screen.rsFrame da luta e rotação de equipe
results_screen.rsTela de resultados
netplay_session.rsInício do netplay, overlay e captura de replay
fighter_draw.rsDesenho do lutador compartilhado pelos menus
pause/, arcade/, story/, cutscene/Recursos que já tinham pasta

Um arquivo de tela é use super::*; mais um bloco impl App; o método de entrada é pub(super). Para adicionar uma tela, crie o arquivo e ligue com uma linha mod e um braço do match em App::frame.

Dividir um arquivo existente

  1. Liste as responsabilidades do arquivo. Se a lista não é óbvia, leia os chamadores primeiro; o arquivo ainda não foi entendido.
  2. Crie feature/ e mova uma responsabilidade por PR, um commit por extração.
  3. Não mude comportamento durante a extração. Os testes passam antes e depois, e o diff é quase todo movimento de código.
  4. Extraia primeiro a menor unidade coesa (a de menos chamadores). Reescrita total conflita com todo PR aberto.
  5. Atualize esta página se o novo layout for diferente do descrito aqui.

Trabalhar em paralelo

  • Prefira arquivos novos. Uma feature adiciona feat/<coisa>.rs e uma linha de registro; não anexa um bloco a um arquivo quente.
  • Pontos de registro são os únicos arquivos que duas features compartilham de forma legítima. Adicione uma linha, em ordem alfabética, e nunca reformate o arquivo: ramos de controllers.rs e triggers.rs, declarações em mod.rs, assets/chars/index.json, tabelas de rotas.
  • Se a feature precisa mexer em um arquivo quente, coloque a lógica no próprio arquivo primeiro e rebaseie a linha de ligação por último, para o conflito ser de uma linha.
  • Não renomeie nem reformate arquivo compartilhado dentro de um PR de feature. Faça isso sozinho, sem mudar comportamento.
  • Uma página de wiki por feature, linkada na Home, para duas features não editarem o mesmo parágrafo.

Arquivos quentes para dividir primeiro

Estes arquivos concentram as responsabilidades mais independentes e são a origem atual dos conflitos de merge. Dividir um deles remove a entrada do baseline.

ArquivoLinhasDivisão sugerida
crates/native/src/effects.rs1711effects/canvas.rs, effects/raster.rs, effects/kinds.rs
crates/engine/src/matchs.rs1751matchs/round.rs, matchs/collision.rs, matchs/camera.rs, matchs/tick.rs
src/app.rs2238Nove telas já vivem em src/app/; as próximas são select (830 linhas, dividir em grade, painel lateral e entrada) e load_step_inner
src/stages.rs1069stages/load.rs, stages/layers.rs, stages/motion.rs
src/stagefx.rs704stagefx/scenes.rs já existe; extraia stagefx/particles.rs, stagefx/weather.rs
src/market.rs700market/install.rs, market/listing.rs; a crate mantém a lógica
crates/formats/src/screenpack.rs610screenpack/lifebars.rs, screenpack/motif.rs

Checklist de revisão

  • Nenhum arquivo novo acima de 250 linhas.
  • Nenhum arquivo do baseline cresceu.
  • Arquivo que cruzou para menos de 250 linhas saiu do baseline neste PR.
  • Lógica nova mora em arquivo com o nome dela, não em utils.rs.
  • Arquivos compartilhados mostram apenas linhas de registro, sem reformatação.
  • A página de wiki da feature foi atualizada em inglês e português.

Páginas relacionadas

Universo e Lore — A Grande Convergência

O universo de Ultimate MUGEN se passa na era da Grande Convergência, onde tempo, geografia e dimensões colidiram após o cataclismo provocado pelo despertar do Eclipse Escarlate (Scarlet Eclipse).


A Gênese: A Trama Astral e a Ruptura

Por milênios, a história humana fluiu em correntes marciais e culturais isoladas. Guerreiros de santuários montanhosos no Japão, templos taoistas na China, fortalezas glaciais nórdicas, megacidades cyberpunk futuristas, planaltos agrestes da Mongólia e pacatas cidades históricas brasileiras treinavam em isolamento, sem suspeitar da existência de outras realidades.

Sob o mundo material pulsava a Trama Astral (The Astral Loom) — uma rede metafísica de linhas de força cósmicas que regulava o equilíbrio espiritual, as forças da natureza e as energias primordiais.

Esse equilíbrio milenar foi rompido quando Mikazuki Oboro, um feiticeiro imortal e mestre supremo das ilusões pertencente a uma dinastia esquecida, realizou o ritual proibido do Eclipse Escarlate. Canalizando chamas negras e o alinhamento de astros proibidos, Oboro fraturou o véu dimensional, arrastando épocas, níveis de tecnologia e territórios inteiros para um único plano compartilhado: o Domínio da Convergência.

flowchart TD
    subgraph AstralSource ["A Trama Astral Primordial"]
        Ki["Ki / Artes do Vento"]
        Glacial["Essência do Gelo Glacial"]
        Stellar["Ki Estelar & Plasma"]
        Cyber["Grade Neon & Ciber-Drive"]
        Shadow["Artes Sombrias & Amaldiçoadas"]
        Tao["Chi Taoista & Equilíbrio"]
    end

    AstralSource --> Eclipse["O Eclipse Escarlate (Mikazuki Oboro)"]

    subgraph Factions ["Facções da Convergência"]
        Heroes["Protetores da Convergência<br/>(Kaito, Daichi, Akio, Lian, Bruno, Jin, Haruki)"]
        Rogues["Renegados, Exilados & Espadachins Livres<br/>(Shion, Suzume, Volta, Marlow, Sylene, Kaname)"]
        Villains["Emissários do Eclipse & Conquista<br/>(Mikazuki Oboro, Garan the Ashen Oni, Valdric Morn)"]
    end

    Eclipse --> Factions
    Factions --> Climax["O Confronto Ápice: A Caldeira Vulcânica & o Portão dos Espíritos"]

Sistemas de Energia e Disciplinas Marciais

Os combatentes de Ultimate MUGEN canalizam sua determinação e poder através de vertentes energéticas distintas:

  1. Ventos Primordiais (Arashi-Ki): Canalizado por Kaito Arashi e Jin Kazaguruma. Extrai poder das correntes atmosféricas, ciclones e pressão do ar, permitindo aproximações instantâneas, golpes de vácuo cortante e rajadas de vento devastadoras.
  2. Plasma Estelar (Hoshi-No-Hikari): Dominado por Akio Hoshi. Absorve a radiação de meteoritos antigos caídos na Terra, manifestando-se em explosões incandescentes, punhos de plasma ardente e aceleração de supernovas.
  3. Ki Lupino da Terra (Ginrou-Ki): Despertado por Daichi Ginrou. Nascido do instinto selvagem de predador alfa e das correntes telúricas das montanhas, convertendo a empolgação do combate em uma aura dourada impenetrável.
  4. Gelo Absoluto e Geada Espiritual (Hyōketsu): Empunhado por Sylene Vashti e Kaname Fuyutsuki. Condensa a umidade do ar em lâminas cristalinas, barreiras glaciais e cortes congelantes capazes de ceifar a própria hesitação da alma.
  5. Chi Taoista e Seda Aérea (Yu-Chi): Praticado por Lian Feng. Focado na deflexão de forças, controle gravitacional e chutes circulares acrobáticos que dobram o ar com a fluidez da seda e a dureza do jade.
  6. Supremacia Cinética do Ferro (Punho de Ferro): Aperfeiçoado por Bruno "Bulldozer" Volk. Condicionamento físico humano levado ao limite absoluto, peso cinético devastador e boxe de curta distância potente o suficiente para despedaçar auras arcanas.
  7. Ciber-Drive & Sobrecarga (Grade Neon): O núcleo biomecânico de VX-9 Volta. Capacitores dielétricos de alta voltagem, servomotores supercondutores e feixes de partículas digitais energizados por uma consciência sintética senciente.
  8. Chamas Frias de Cinzas (Oni-No-Hai): Erompidas por Garan the Ashen Oni. Fogo violeta e gélido forjado no portão do submundo, que consome a alma e a coragem dos mortais em vez de meramente queimar sua carne.
  9. Aether dos Mares e Tempestades (Vento Salgado): Canalizado pelo Capitão Marlow Reyes. Energia dos marinheiros celestes infundida com raios de tormenta e força das marés, disparada através de sua espada curta encantada.
  10. Núcleo Imperial da Estrela Rubra (Dominância Escarlate): Desenvolvido por Valdric Morn. Canhões de plasma escarlate de alta potência integrados em armaduras energéticas pesadas, projetados para subjugação militar em larga escala.
  11. Titãs do Crepúsculo Selados (Crepúsculo Selado): Aprisionados no corpo de Haruki Sumi. Poder arcano cataclísmico contido por pergaminhos e talismãs sagrados; quando o estudioso perde o controle, a fúria ancestral devasta o campo de batalha.
  12. Réquiem da Lua Pálida (Kurogane Tsuki): Conduzido por Shion Kurogane. A atração gravitacional e a melancolia da Lua Pálida fundidas em uma montante colossal que homem comum algum consegue erguer.
  13. Miragem do Lótus Carmesim (Kagerou-Ryu): Herdado por Suzume Kagerou. Deslocamento em pontos cegos sensoriais, clones ilusórios e adagas de assassinato velozes como o bater de asas de um pardal.
  14. Véu Escarlate: O olho de ilusão supremo de Mikazuki Oboro. Distorce a percepção óptica, invoca corvos espectrais de pesadelo e reescreve as consequências da luta diretamente na mente do oponente.

As Três Grandes Facções: Heróis, Neutros e Vilões

Os combatentes da Convergência dividem-se em três grandes posturas filosóficas perante o colapso dimensional:

1. Os Protetores da Convergência (Heróis)

Guerreiros honrados empenhados em restaurar a Trama Astral, fechar as fendas dimensionais e defender vidas inocentes da tirania e da destruição:

  • Kaito Arashi (Japão): Karateca andarilho justo em busca de equilíbrio e evolução interior através da tempestade.
  • Daichi Ginrou (Mongólia): Guerreiro selvagem dos picos gelados cuja aura dourada protege os mais vulneráveis.
  • Akio Hoshi (México): Jovem prodígio da luz estelar cuja impetuosidade e coragem jamais se curvam diante da tirania.
  • Lian Feng (China): Grã-mestra da Lanterna de Jade dedicada à preservação do equilíbrio cósmico.
  • Bruno "Bulldozer" Volk (Brasil): Campeão invicto dos ringues, gigante gentil que luta pelo futuro de seu povo e de sua cidade natal.
  • Jin Kazaguruma (Jamaica): Shinobi veloz e bem-humorado que age como mensageiro da liberdade entre as vilas ocultas.
  • Haruki Sumi (Coreia do Sul): Bibliotecário erudito e guardião pacífico que suporta o terrível fardo de selos titânicos.

2. Os Renegados, Exilados & Espadachins Livres (Anti-Heróis / Força Neutra)

Guerreiros guiados por códigos de honra próprios, vinganças ancestrais, busca pela própria alma ou restauração de reinos perdidos:

  • Shion Kurogane (Egito): Exilado melancólico que carrega o luto de seu clã lunar e caça as sombras que maculam a noite.
  • Suzume Kagerou (Vietnã): Kunoichi sobrevivente que ataca na escuridão para exterminar os mandantes do massacre de seu clã.
  • VX-9 Volta (EUA / Neo-Metrópole): Androide de combate desertor que desafia seus programadores em busca do significado de possuir um coração.
  • Capitão Marlow Reyes (Espanha / Céus do Caribe): Corsário aéreo carismático que saqueia impérios tiranos em busca de mapas arcanos e glória.
  • Sylene Vashti (Noruega / Borealia Ártica): Princesa exilada do reino do gelo empenhada em reconquistar seu trono das mãos de cultistas das cinzas.
  • Kaname Fuyutsuki (Suíça): Juiz estóico do Santuário das Neves cuja katana congela a hesitação e pune a corrupção sem piedade.

3. Os Emissários do Eclipse & Conquista (Inimigos / Vilões)

Forças malignas empenhadas na aniquilação da realidade, no retorno de demônios ancestrais ou na dominação militar tirânica:

  • Mikazuki Oboro (Dimensão do Eclipse — Chefe Final): Mestre ilusionista supremo que planeja consumir toda a existência em um sonho eterno de fogo negro.
  • Garan the Ashen Oni (Abismo Subterrâneo): Oni milenar libertado dos selos vulcânicos para devorar o medo e transformar a Terra em cinzas frias.
  • Valdric Morn (Império Estelar de Vane / Europa Central): Príncipe tecnocrata bélico que considera guerreiros espirituais "plebeus inferiores" que devem ser esmagados pelo poder do império.

O Torneio Ápice: O Ponto de Ruptura

Para alimentar as fendas da realidade com a essência marcial dos seres vivos mais poderosos, Mikazuki Oboro manifestou o Cadinho Ápice (The Apex Crucible) — arenas de combate que entrelaçam templos ancestrais, terraços futuristas, bosques iluminados pela lua, planaltos desérticos, santuários de espíritos, caldeiras vulcânicas e praças ensolaradas.

Cada embate aproxima os guerreiros do centro do vórtice dimensional. Somente superando suas próprias fraquezas e derrotando o arquiteto do Eclipse os combatentes poderão restaurar as linhas do mundo antes que o tecido da realidade se desfaça para sempre.

Matriz de cobertura de formatos

🇬🇧 English version: Format coverage matrix.

Status por formato de arquivo, conferido com os decodificadores em crates/formats (leitura do código, ainda não testado com uma coleção grande de packs).

  • Implementado: decodificado e usado pelo motor.
  • Parcial: decodificado, com um limite conhecido listado nas notas.
  • Ausente: não decodificado; o arquivo é ignorado ou gera um aviso.

SFF (sprites)

RecursoStatusNotas
SFF v1.01, sprites PCX RLEImplementadosff.rs, pcx.rs
SFF v1, linhas PCX sem compressãoImplementadobytes_per_line respeitado
SFF v1, PCX de 8 bits (paleta de 256 cores no fim do arquivo)Implementado
SFF v1, PCX de 1/4 bits ou 24 bitsAusenteA profundidade do cabeçalho é ignorada; esses arquivos saem errados. Raro em packs reais
SFF v1, paleta compartilhada (flag same pal)ImplementadoHerda a paleta do sprite anterior
SFF v1, sprites ligados (length = 0)Implementado
SFF v2.00 / 2.01, 8 bits sem compressãoImplementado
SFF v2, 24 e 32 bits sem compressãoImplementadoConvertidos para RGBA
SFF v2, RLE8 / RLE5 / LZ5Implementadosff/codecs.rs
SFF v2, PNG 8 / 24 / 32ImplementadoPNG quebrado vira sprite vazio e transparente
SFF v2, paletas (RGB e RGBA, paletas ligadas)Implementado
SFF v2, escolha de paleta por spriteImplementado

SND (sons)

RecursoStatusNotas
Contêiner ElecbyteSnd, chaves grupo/índiceImplementadoVence a primeira chave repetida, como no M.U.G.E.N
Cadeia de subarquivos com proteção contra links corrompidosImplementado
WAV PCM 8 / 16 bits (o caso normal)ImplementadoDecodificado pelo symphonia na camada de áudio
WAV ADPCM, 24 bits e outros codecs WAVParcialDepende do que o symphonia aceita; não verificado por codec

AIR (animações)

RecursoStatusNotas
[Begin Action N], quadros, timeImplementadoAções repetidas: vence a primeira
Espelhamento H / VImplementado
Blending A, A1, AS<n>D<n>, SImplementado
Clsn1 / Clsn2 e Clsn1Default / Clsn2DefaultImplementado
xscale, yscale, angle por quadroImplementado
LoopstartImplementado
InterpolateAusenteA linha é aceita e ignorada (air.rs); sem interpolação entre quadros

ACT (paletas)

RecursoStatusNotas
Paleta RGB de 768 bytesImplementadoÍndice 0 transparente, ordem invertida como no MUGEN
Arquivos curtos (menos de 256 cores)ImplementadoEntradas faltando ficam pretas

DEF e CNS (personagens e stages)

RecursoStatusNotas
.def de personagem ([Info], [Files], localcoord)Implementado
localcoord 320x240, 640x480 e 1280x720ImplementadoPosições e distâncias convertidas por jogador
.def de stage ([Info], [StageInfo], [Camera], [Player], [Bound])Implementado
Camadas [BG]: normal, anim, parallax, trans, mask, maskwindowImplementado
[BGCtrlDef] / [BGCtrl]: null, visible, enable, velset, veladd, posset, posadd, anim, sinx, sinyImplementado
Stage zoffset, autoturnImplementadoUsados pelo motor (stagevar.rs, matchs.rs)
Stage resetbgAusenteNão é lido em nenhum lugar do workspace

Screenpacks

RecursoStatusNotas
system.def [Info] localcoord (packs 4:3 e 16:9)ImplementadoConvertido para o espaço do HUD
system.def [Files], [Music], [Title Info], [Select Info]Implementado
system.def [<nome>BGdef] / [<nome> N] (fundos)Implementado
select.def [Characters], [ExtraStages], [Options]Implementado
fight.def [Files], barras pN.*, prefixos de elementosImplementado
Storyboards ([SceneDef], [Scene N], fades, camadas, bgm)Implementado
.fnt v1 (PCX embutido, [Def], [Map])Implementado
.fnt v2 (bitmap e truetype)ParcialLido em fnt.rs; renderização truetype não verificada
[Versus Screen], [Victory Screen], [Round Info]ParcialLidos pelos prefixos genéricos; nem toda chave tem renderizador próprio; não verificado em packs
Particularidades de WinMUGEN e MUGEN 1.0 / 1.1ParcialChaves desconhecidas são ignoradas, não rejeitadas; sem seletor por versão

Lacunas conhecidas (próximos PRs)

Pequenos PRs, nesta ordem:

  1. AIR Interpolate (palavra-chave hoje ignorada).
  2. Stage resetbg.
  3. SFF v1 com profundidade baixa (PCX de 1 e 4 bits). Precisa de um caminho de paleta do cabeçalho; sff.rs está na linha de base do tamanho de arquivo, então o código v1 deve ir antes para um módulo próprio.
  4. Verificar codecs WAV além de PCM 8/16 bits com packs reais.
  5. Chaves de screenpack sem renderizador próprio (telas de versus e de vitória).

Esta lista é o que a auditoria encontrou; ainda não está provado que seja completa numa coleção grande de packs.

Medidor de Assinatura

English

Cada lutador nativo pode declarar um bloco signature em passives no JSON. É um medidor próprio do lutador que muda o jeito de jogar, somado a fúria, acúmulos e enrage por tempo.

Chaves: max, gainHit, gainSpecial, gainHurt, decayDelaySeconds, decayPerSecond, drainOnSuper, riskPerSecond e tiers (até quatro degraus com at, attack, defence e speed). O formato é o mesmo da página em inglês.

O ataque continua limitado pelo teto global de Passivos. O medidor zera a cada round e aparece como uma faixa sob a barra de vida.

Lutadores atuais: Kaito (Tempestade, acumula e acelera) e Volta (Sobrecarga, forte com o medidor cheio, mas custa vida).

Mais lutadores: Suzume (Lótus, sobe com especiais e acelera), Marlow (Maré, também sobe ao apanhar e dá defesa), Jin (Corrente de vento, sobe e cai rápido, dá velocidade) e Sylene (Camadas de gelo, sobe principalmente ao apanhar, dá defesa).

Mercado GitHub

English · Português (BR)

Instale personagens, cenários e músicas direto de qualquer repositório público do GitHub. Abra Mercado GitHub no menu principal.

Como usar

  1. Aperte U (ou clique em + Adicionar) e informe o link: https://github.com/dono/repo, dono/repo ou link de subpasta como https://github.com/dono/repo/tree/main/mugen.
  2. O jogo lê a árvore do repositório e mostra tudo o que encontrou.
  3. Marque os itens desejados (Espaço, clique ou Todos) e aperte Instalar (I). Os downloads rodam em paralelo com barra de progresso.
  4. O conteúdo instalado fica ativo na hora. Use Ativar (E) e Desativar (O) em qualquer seleção, inclusive em lote, ou Remover (X) para apagar do aparelho.

Tudo fica salvo localmente: a lista de repositórios, os itens instalados e o estado de ativação continuam lá na próxima abertura.

  • Lista e grade. O seletor Lista / Grade (V, ou o botão auxiliar do controle) alterna entre a lista densa e uma grade de cards com retrato, e a escolha é lembrada. Nas duas, toque ou clique marca o item e arrastar rola a tela (bom para toque); a roda do mouse, PageUp/PageDown e as setas também rolam.
  • Selos MUGEN e UMF. Todo personagem, cenário e pacote mostra o formato. Um pacote é UMF quando o caminho ou o nome diz (pasta umf/, *_UMF.zip); o resto é MUGEN. O mesmo lutador pode existir nos dois formatos: eles nunca são unidos, cada variante tem seu selo, estado e download, e as variantes de um lutador ficam lado a lado (Goku_SS4 e Goku_SSJ4_UMF contam como o mesmo lutador).
  • Itens desatualizados. Um item instalado cuja versão no repositório (hash dos caminhos e shas, veja acima) difere da instalada recebe DESATUALIZADO e uma borda laranja. A listagem baixa de novo automaticamente, e Instalar faz isso na hora.
  • Filtros. Tipo (F), formato Todos/MUGEN/UMF (J) e Desatualizados (P) combinam com as abas Explorar/Instalados (Tab).
  • Pacote vs personagem. O tipo do zip vem do conteúdo (lido por HTTP Range, sem baixar o arquivo): um lutador mostra PERSONAGEM, vários mostram PACOTE · N e o rodapé lista quem está dentro. O filtro Não instalados (K) esconde o que você já tem.
  • Ações em lote. Instalar tudo (Z), Atualizar tudo (Y) e Remover tudo (B) respeitam os filtros ativos; remover pede confirmação e o progresso aparece no rodapé.
  • Retratos. Os cards mostram a imagem de prévia do item: um PNG em uma pasta previews/, portraits/ ou thumbs/ com o mesmo nome do item (previews/umf/Goku_SSJ4_UMF.png para umf/Goku_SSJ4_UMF.zip). Só os cards visíveis são baixados (3 por vez, do raw.githubusercontent.com), reduzidos para no máximo 240 px de largura, mantidos num cache em memória de 48 retratos e, no desktop, em disco junto da listagem, por sha do blob. Itens sem prévia mostram as iniciais.

Repositórios sugeridos

Só juninmd/ultimate-mugen está na lista de sugestões do jogo (SUGGESTED em src/market.rs). A outra linha é uma referência: os links abrem cada pasta no GitHub. Para adicioná-la no mercado, digite owner/repo.

O que é detectado

TipoRegraO que é instalado
Personagempasta com .def e .sff, .air e .cns/.cmd na árvorea pasta inteira, mais arquivos declarados no [Files] que estejam em outras partes do repositório
Cenário.def com .sff de mesmo nome, ou qualquer .def dentro de pasta stages/os arquivos do cenário, o sprite spr e a música bgmusic
Música.ogg, .mp3, .flac, .wav (wav menor que 32 KB é ignorado como efeito sonoro)o arquivo de áudio
Pacote.zipo arquivo compactado, descompactado em memória como na importação manual

Arquivos de screenpack (system.def, select.def, fight.def, ...) nunca viram cenários nem personagens. Arquivos dentro de pastas ocultas (.git, .github) são ignorados.

Músicas ativas tocam como trilha da luta em revezamento sempre que o cenário não tiver música própria. Cenários M.U.G.E.N com bgmusic continuam tocando a própria faixa.

Onde os dados ficam salvos

PlataformaEstado e downloads
Linux$XDG_DATA_HOME/ultimate-mugen/market (padrão ~/.local/share/ultimate-mugen/market)
macOS~/Library/Application Support/ultimate-mugen/market
Windows%APPDATA%\ultimate-mugen\market
Androidarmazenamento interno do app, pasta market/
Webbanco IndexedDB ultimate-mugen-market

Defina UME_MARKET_HOME para trocar a pasta no computador. Cada item instalado é gravado em um pacote único; a lista de repositórios, itens instalados, o ETag de cada listagem e o token opcional ficam em state.json. Os nomes dos pacotes passam por percent-encoding só com minúsculas, então itens e pastas que diferem apenas por maiúsculas/minúsculas nunca dividem o mesmo arquivo no Windows ou no macOS.

Limites da API, token e cache

A listagem usa a API do GitHub (60 requisições por hora sem token) e os downloads usam raw.githubusercontent.com, que não tem essa trava. As listagens guardam o ETag recebido: se o repositório não mudou, o GitHub devolve 304 e a listagem vem do cache local. Um repositório é atualizado ao abrir se o cache tiver mais de 10 minutos, ou manualmente com R.

Atualização automática

Cada entrada da listagem guarda o sha do blob Git de cada arquivo. A versão de um item é um hash dos caminhos e shas dos arquivos, salva junto do item instalado. Com o jogo aberto (e ao iniciar), cada repositório com itens instalados é listado de novo a cada 10 minutos; só os itens instalados cuja versão difere do repositório são baixados de novo. Itens atualizados mantêm o estado ativo ou inativo. Os downloads usam ?v=<sha>, então um push recente nunca vem do cache do raw.githubusercontent.com. Itens instalados antes de existirem versões são reinstalados uma vez.

Para aumentar o limite, aperte T e cole um personal access token (não precisa de permissões para repositórios públicos), ou defina UME_GITHUB_TOKEN / GITHUB_TOKEN no computador. O token só é enviado para api.github.com.

Limites de segurança

  • Só links https para github.com, api.github.com, raw.githubusercontent.com, media.githubusercontent.com e codeload.github.com são acessados. Redirecionamentos para outros hosts são bloqueados.
  • Caminhos vindos do repositório são validados: sem .., caminhos absolutos, barras invertidas, letras de unidade, caracteres de controle, espaços no início ou nomes de dispositivo reservados do Windows (CON, PRN, AUX, NUL, COM1-9, LPT1-9). Entradas inseguras somem da listagem.
  • Limites: 64 MB por arquivo, 256 MB e 4000 arquivos por item, 48 MB para a listagem. Itens acima disso aparecem como "grande demais" e não podem ser instalados.
  • O conteúdo nunca é executado como código. Os personagens passam pelos mesmos leitores da importação manual.
  • Respeite a licença de cada autor. Baixar de um repositório não dá direito de redistribuir.

Observações por plataforma

PlataformaAdicionar repositório
Desktopdigitar no próprio jogo (colar não funciona na janela do jogo; digite dono/repo)
Web e celularprompt nativo do navegador, com colar

Repositório em destaque: zinclee123/mugen_chars

Coleção comunitária de personagens M.U.G.E.N. Cole o link da pasta no Mercado GitHub (U) para instalar um personagem.

TipoLink
Repositóriozinclee123/mugen_chars
PersonagensHinako · K' · Lin · MasterRyu · Rugal2nd · kusanagi-XIII
Stagesnenhum no repositório
Músicasnenhuma no repositório
Packsnenhum instalável (o .rar do repositório não é um pack do marketplace)

98-kim e yujiro são patches de IA sem sprites: não aparecem como personagens e exigem o personagem original instalado antes. MasterRyu traz quatro lutadores (Ryu, NormalRyu, EvilRyu, MasterRyu) em uma pasta só, então os quatro aparecem após instalá-la.

Resultados do smoke test e evidências: docs/evidence/mugen-chars-smoke.

Lutadores 3D

Status: entregue atrás da feature model3d do Cargo, ligada por padrão. Rollback: tirar model3d de default no Cargo.toml raiz; o jogo volta a desenhar os sprites 2D do doador e esconde a categoria 3D.

Princípio

A simulação continua 2D. Hitboxes, física, máquina de estados e rollback nunca leem o modelo. Um lutador 3D é um lutador UMF (assets/chars3d/<id>.json, normalmente com extends de um kit nativo) cujo desenho é trocado por um modelo GLB, então um lutador 3D luta contra um 2D com as mesmas regras. O modo leve (lite::scale() < 1) volta para os sprites 2D.

Pipeline

  1. Model::from_glb lê o .glb (parser próprio sobre serde_json, texturas PNG via png).
  2. StateMap (JSON) liga nomes de anim nativos (anims) ou faixas de estado MUGEN (states) a um clipe, loop e velocidade.
  3. A pose é função pura de anim_no/anim_elapsed (ou stateno/statetime), skinning na CPU, seguro para rollback.
  4. Model::project usa câmera ortográfica no plano da luta, sombreamento Lambert e triângulos de trás para frente, desenhados com ume_shell::quad::draw_mesh agrupados por textura.

No jogo

  • src/model3d.rs é a fachada (draw, draw_fit, is_3d, portrait); src/model3d/specs.rs lista os modelos.
  • Luta: uma linha em render.rs. Painéis de seleção, versus e resultado: draw_fit dentro de draw_char_fit. Tiles e loading usam portrait.
  • A seleção tem a categoria 3D.
  • A forma despertada troca para o segundo modelo (Ichigo: Hollow Total).
  • src/model3d/aura.rs desenha os efeitos só do 3D: rastro do AfterImage em cópias aditivas do quadro atual (Shunpo carmesim, Sonido dourado na forma Hollow) e uma barreira de reiatsu na defesa (estados 120-155) que pisca ao bloquear (150-155).

Ferramentas

tools/retarget (Python, só stdlib): retarget.py aplica os clipes de clips.json num rig de rigs.json; autorig.py cria esqueleto e pesos para malha sem rig; keyposes.py <in.glb> <out.glb> <rig> aplica os clipes feitos à mão de keyposes.json (postura Bankai, sequência de espada, Getsuga com preparo, carga e disparo, Juujishou, Shunpo, Cero, defesa e pose de vitória), com direções de membros em [azimute, elevação] e bladeR resolvido por blade_solve.py para apontar a Zangetsu. Folha de clipes: cargo run --release -p ume-model3d --example clip_sheet -- <modelo.glb> <saida.png> Clip1,Clip2 <quadros>. Retrato: cargo run -p ume-model3d --example portrait. Vozes: tools/voices/generate.py <id> (mantém os outros bancos).

Cenário 3D: Aeroporto

airport3d ("Aeroporto 3D — Pôr do Sol") é um fundo 3D ao vivo atrás da mesma feature model3d: sem a feature o cenário some, sem outra mudança.

  • assets/model3d/airport.glb (128 KB) é gerado por python3 tools/airport/build.py <saida.glb> (só stdlib): aviões, terminal com fingers, torre de controle, pista, morros, nuvens e sol. Sem arte de terceiros.
  • Clipe ambient (loop de 40 s): um jato pousa na pista ao fundo, outro taxia no pátio e um trator de bagagem cruza a vaga.
  • Model::project_scene (crates/model3d/src/perspective.rs) projeta em perspectiva (corte de plano próximo, Lambert plano, neblina por vértice, céu em gradiente) no mesmo Raster com z-buffer dos lutadores.
  • src/model3d/airport.rs renderiza 480x270 (320x180 no modo lite) a 30 Hz numa textura; com "fundo" desligado no lite aparece uma imagem estática da mesma cena.

Golpes do Ichigo

Pulos: D, U ou U, U super pulo (também no ar), dois pulos aéreos, três dashes aéreos. Especiais: Getsuga Tenshou (~D, DF, F, x), Getsuga carregado (~D, DB, B, y, segure y; 45 ticks para a onda máxima), Shunpo (~D, DB, B, b, rastro de Sonido na forma Hollow), Shunpo Rush, Hollow Cero (~D, DB, B, a, segure a; 40 ticks para o raio grande), Getsuga Juujishou, Kuro Getsuga, Hollow Rampage; Hollow Total adiciona Cero Oscuras. A carga usa o campo holdRelease (ver Personagem UMF).

Créditos

Veja assets/model3d/ATTRIBUTION.md.

Modo Foto

O modo foto congela a luta e entrega câmera livre, filtros de cor e um quadro limpo para salvar em PNG. Funciona em luta normal, treino, sobrevivência e replays: pause o replay no golpe perfeito e tire a foto.

Abrir e fechar

  1. Pause a luta (P, Esc, Enter ou o botão de pausa). No replay, pause com Espaço.
  2. Aperte C. O menu de pausa some e a câmera é sua.
  3. Esc, P ou C sai do modo foto e volta ao menu de pausa.

O modo foto não existe em partidas online, onde a simulação nunca pode parar.

Controles

TeclaAção
W A S D / setasMove a câmera (mais devagar quanto mais perto)
+ / -, PageUp / PageDown, roda do mouseZoom entre 0,6x e 2,5x
FTroca o filtro: Natural, Cinema, Noir, Vívido, Retrô
HMostra ou esconde o HUD (escondido por padrão)
.Avança um quadro para achar o momento exato
RRecentraliza a câmera
Enter / EspaçoTira a foto (só desktop)

A sobreposição (linha de estado, ajuda de teclas e guias de terços) não entra na imagem salva.

Onde ficam as fotos

No desktop, photos/ultimate-mugen-<milissegundos>.png ao lado do executável, na resolução da janela. Web e mobile têm câmera e filtros, mas não salvam, porque a captura do navegador ou do sistema já resolve.

Como funciona

  • Câmera: crates/engine/src/photo_camera.rs só altera a exibição, como a Câmera de Replay. Troca posição da câmera, tamanho da vista e altura do chão, desenha e restaura todos os campos, então simulação, resultado do replay e checksums não mudam. O movimento respeita os limites do cenário, o vertical vai até 120 unidades e o zoom de 0,6x a 2,5x.
  • Filtros: cada filtro é um conjunto de valores do Look de pós-processamento (saturation, vinheta, grão, grade, aberração, bloom). O look é trocado só durante o desenho e restaurado em seguida; o nível de pós-processamento sobe para pelo menos 2, então os filtros aparecem mesmo com efeitos no mínimo.
  • HUD: Hud::hidden pula HUD, barras de cinema e banners.
  • Custo: sem passe de desenho extra, só o pós-processamento que o jogo já executa.

Verificação

UME_SHOTS_ONLY=photo xvfb-run -a target/release/ultimate-mugen --shots <dir> --res 1280x720 --mute grava a pausa, o quadro limpo, o quadro com HUD, os quatro filtros e um plano aberto. Testes: cargo test -p ume-engine --test it photo_camera:: e os testes photo do crate raiz.

Modos de jogo

English · Português (BR)

O menu principal oferece lutas individuais (Arcade, Versus CPU, 2 Jogadores, Treino, CPU vs CPU) e três modos de equipe. A seleção tem um chip de modo (< > ou M) que alterna Versus CPU, 2 Jogadores, CPU vs CPU e os modos de equipe; em modo de equipe, um chip de tamanho (- + ou Q / E) define o esquadrão. A versão web permite até 7 por lado; Android e iOS nativos limitam a 5 porque o atlas de sprites é 2048.

ModoLutadores em campoO round acaba quando
Equipe · Sequência1 por lado, o próximo entra após um KO; o vencedor mantém a vidaum lado fica sem lutadores
Equipe · Paraleloa equipe inteira ao mesmo tempo (2 a 7), cada lutador nasce em um ponto aleatório do cenário (com semente, então replays batem); Tab passa o controle ao próximotodos os membros de um lado caem
Equipe · Tag1 ativo + os demais em espera (2 ou 3 por lado)todos os membros de um lado caem

Arcade / Modo História

Arcade no menu principal executa a campanha narrativa do Torneio do Eclipse Escarlate com cutscenes completas, progressão dinâmica de vilões e desbloqueio de lutador secreto:

  • Prólogo (Cutscene kind: 0). Cada um dos 15 lutadores nativos possui sua própria introdução narrativa e juramento pessoal antes de iniciar a escada do torneio.
  • Rotação Dinâmica de Vilões Principais. O topo da escalada de 8 oponentes culmina em um confronto com cutscene pré-luta personalizada e arena temática do chefe:
    • Tier 0 (Primeira Jornada): O vilão supremo Mikazuki Oboro (oboro) no Portão dos Espíritos (spirit).
    • Tier 1 (Após Derrotar Oboro): Garan, o Oni das Cinzas (garan) torna-se o novo vilão principal na Cratera Vulcânica (volcano).
    • Tier 2 (Após Derrotar Garan): Valdric Morn (valdric) assume o trono como o tirano imperial final em Neo-Metropolis (neon).
    • Zeradas Seguintes: Alterna ciclicamente entre os 3 vilões principais. Se o jogador escolher o próprio chefe da rodada, a engine seleciona outro vilão para evitar luta espelho no chefe final.
  • Poderes de Chefe e Fases de Oboro. Ao assumirem o posto de chefe final do modo história, os vilões recebem atributos de chefe (boss = true, 2000 HP, 125% de ataque, IA agressiva de chefe, recarga contínua de super barra, aura visual e banner CHEFE FINAL). Ao enfrentar Oboro:
    • Fase 1: Oboro utiliza voo, teletransporte sombrio, super velocidade e sua primeira forma (Véu Desperto, form = 1). Quando derrotado ao menos uma vez em um round, Oboro rompe seu selo no início do round seguinte (Match::awaken_defeated_boss).
    • Fase 2 (Despertar: Eclipse Absoluto - Cutscene kind: 3): Derrotar Oboro pela primeira vez dispara a cutscene Despertar: Eclipse Absoluto (kind: 3) e inicia a Fase 2 (Match::awaken_boss_phase(2)), na qual Oboro luta em Eclipse Absoluto (form = 2) com vida máxima ampliada (1.15x), regeneração contínua de vida, ganho acelerado de barra, IA nível 8 e golpes exclusivos (Corte do Eclipse Carmesim, Chama do Eclipse Eterno e Julgamento do Eclipse Absoluto).
    • Fase 3 (Cutscene de Duelo Clímax - Cutscene kind: 4 e Despertar Supremo): Ao vencer a Fase 2, uma cutscene de combate acelerado com animações reais de golpes, faíscas de armas, linhas de velocidade e impactos (src/app/cutscene/battle.rs) retrata o herói e Oboro lutando em velocidade supersônica, culminando na ascensão cósmica de Oboro à forma suprema: Eclipse Primordial (form = 3). Na Fase 3 ele possui vida aumentada para 1.30x, dano 1.62x, defesa 1.48x, aura ciano/supernova e golpes exclusivos (Colapso Primordial, Supernova do Eclipse Primordial).
    • Cutscene do Golpe Decisivo (Cutscene kind: 5) e Alvorada Triunfante: Ao derrotar a forma suprema de Oboro, uma cutscene épica de finalização mostra o herói disparando em velocidade estelar para desferir o golpe decisivo, quebrando a katana lendária de Oboro e estilhaçando a lua negra em raios dourados de alvorada.
  • Cutscene Final por Personagem (Cutscene kind: 2) e Desbloqueio de Oboro. Ao derrotar o chefe final, cada personagem exibe sua própria cutscene de encerramento em 5 páginas (src/app/cutscene/endings.rs). Ao concluir, Mikazuki Oboro é desbloqueado na seleção de personagens, a rotação de vilões é avançada e o jogo retorna diretamente à tela de seleção de personagens com anúncio em banner comemorativo e o novo chefe habilitado.

História (fases de pancadaria)

História no menu principal é uma campanha estilo Final Fight / Sengoku: cinco fases, cada uma com algumas ondas de capangas lutando ao mesmo tempo (1 contra 2 a 4, usando as regras de equipe simultânea) e fechada por um chefe de fase.

  • Salvamento por fase. Concluir uma fase salva a próxima fase, o lutador, a paleta, a vida, a pontuação e os créditos em um checkpoint local. Volte a História e selecione Retomar para iniciar dessa fase ou Nova campanha para escolher um lutador. Uma nova campanha substitui esse checkpoint ao concluir uma fase. Terminar a campanha limpa o checkpoint. O progresso fica em story-checkpoint.json ao lado do executável ou no armazenamento do navegador.
  • Estrutura e avanço para a direita. Fase = 4 ondas + 1 chefe ao longo de um cenário estendido (assets/stages/story/<arena>.png). Conforme cada onda de capangas é derrotada, o protagonista avança para a direita para a próxima parte do cenário enquanto a câmera acompanha suavemente (Match::lane_scroll_step, App::story_advance_in_place), até chegar ao final do cenário onde aguarda o chefe de fase. Cenários: Becos da Cidade (praça), Metrô (Neo-Metrópole), Bambuzal, Área Industrial (Cratera Vulcânica) e Cobertura do Chefão (Dojo). Chefes: Bruno, Marlow, Lian, Garan, Valdric. Se você escolher um chefe como lutador, entra o substituto (Daichi, Kaname, Shion, Haruki, Kaito).
  • Cenário animado em loop. O fundo da fase é animado em todos os segmentos. Com os 16 quadros do loop ambiente do cenário carregados, o renderizador remonta a faixa a partir do quadro atual a cada desenho: o primeiro segmento é a arena, os três do meio são cadeias espelhadas de uma janela da arena e o segmento do chefe é a arena invertida. A gradação de cor segue a mesma rampa da faixa estática e as emendas de 70 px recebem um crossfade com fatias espelhadas (um teste compara as duas versões pixel a pixel fora das emendas). O loop avança a cada quatro ticks, com o mesmo ciclo de 64 ticks do modo versus, e não consome textura extra. O layout fica em src/stages/story_loop.rs e o desenho em src/render/story_loop.rs; a faixa estática continua como reserva. Evidências em screenshots/story-loop/, geradas com UME_TOUR=storyloop (e UME_TOUR_BURST=1 para os GIFs).
  • Vida dos vilões e chefes. Os capangas das ondas têm cerca de 10 % da vida máxima do protagonista (9 % a 12 % via villain_life_ratio em src/story/stages.rs); já os chefes ao final da fase têm 150 % de vida e 110 % de ataque.
  • Vida acumulada. A barra que você termina uma onda é a que começa a próxima, mais 20 % após a onda e 60 % após a fase (as "comidas" dos arcades originais).
  • Quebráveis, comida e fases bônus. Toda luta tem caixotes ou barris que quebram ao serem golpeados e podem soltar comida (maçã +12 %, pizza +25 %, assado +50 % de vida), uma gema (pontos) ou uma bateria (energia). Depois dos chefes das fases 1 e 3 começa uma fase bônus no mesmo lugar: destrua o carro ou quebre todo o estoque antes do tempo acabar. Regras, arquivo de dados e arte: Objetos de cenário.
  • Créditos. São 3 créditos; ao cair você pode Continuar (retoma a mesma luta com 60 % de vida) até acabarem.
  • Pontuação. ScoreTotal do motor mais bônus por onda (500 x fase, chefe x4).
  • Dificuldade. Nível da CPU sobe por fase e +2 nos chefes (máx. 8).
  • Faixas de profundidade (estilo Final Fight). O Story tem uma faixa de chão: dois botões extras andam para o fundo ou para a frente do cenário (P1 Z / X, P2 Num - / Num +, reconfiguráveis em Controles; os bits do motor são LANE_UP / LANE_DOWN). Só anda no chão e com controle, e cada fase limita a faixa ao chão real (lane_far / lane_near em src/story/stages.rs). O golpe só acerta, e os corpos só se empurram, quando os dois estão a até 14 unidades de profundidade; a CPU se alinha ao herói sozinha. Sprites, sombras, reflexos e efeitos acompanham a faixa e quem está mais perto desenha na frente. Os outros modos nunca ativam as faixas.
  • Botão de defesa. O Story tem um botão exclusivo de defesa (P1 C, P2 Num *, reconfigurável). Enquanto segurado, quem está no chão e com controle bloqueia como se segurasse para trás, sem recuar (com Baixo, defende agachado). Fora do Story é ignorado.
  • HUD do Story. Capangas não têm barra de vida nem ficha de equipe. O herói mantém o painel da esquerda, uma faixa inferior mostra fase, onda, pontos e créditos, e a luta de chefe ganha uma barra larga de Vilão da Fase (nome e vida) à direita.
  • Chefe final e epílogos. O chefe final é Valdric Morn, comandante do Império da Estrela Rubra e chefão por trás da gangue, na Cobertura do Chefão; quem joga com Valdric enfrenta Kaito Arashi. Ao vencê-lo, cada lutador do elenco tem o seu próprio epílogo em cutscene, em português, inglês e espanhol, com cinco páginas: o chefe caído fala com o lutador na cobertura à noite, o lutador responde em pose de vitória, duas páginas de narração no cenário de origem do lutador (amanhecer e depois dia claro) e o cartão FIM com o nome do lutador e o título do epílogo. O cenário é a ilustração de um cenário existente, com panorâmica lenta, partículas de luz, faixas de cinema, fade na troca de cena e texto digitado letra a letra. OK revela a fala e depois avança, ESC pula para o cartão final. Os textos ficam em assets/story/epilogues.json, por id de lutador (scene, title, boss, reply, pages); lutadores sem entrada, como os personagens M.U.G.E.N importados, ganham um epílogo inventado: um dos modelos *:tale1 a *:tale6, escolhido por um hash estável do id, com {name} trocado pelo nome do lutador (a chave * fica como último recurso). O lutador usa as próprias animações na cena: caminhada ao chegar em casa, provocação ou pose de vitória ao responder, e pose de vitória no fim (src/story/epilogue_pose.rs). Para trocar ou criar epílogos sem recompilar, salve um arquivo no mesmo formato como story-epilogues.json ao lado do executável (ou no armazenamento do navegador): as entradas dele substituem as embutidas lutador por lutador. Evidências em screenshots/story-epilogues/, geradas com UME_TOUR=epilogue; o teste no navegador é node scripts/web-epilogue-smoke.js web/dist.
  • Capangas (assets/chars/npc_*.json, gerados por ume-tools gen-story-npcs). Lutadores com sprites próprios em assets/chars/sprites/npc_*/, ocultos na seleção ("npc": true), escalados no Modo História para ~10 % da vida do protagonista, cada um com uma habilidade própria: Brute (11 % da vida do herói, golpes fortes com armadura), Razor (9 % da vida, 35 % mais rápido, chutes avançam), Spitfire (10 % da vida, jab lança orbe), Colossus (12 % da vida, armadura em todo golpe básico), Phantom (9 % da vida, rápido e invulnerável ao chutar). Os golpes usam lutadores jogáveis como base mecânica.Sua arte é só de sprites PNG: troque os arquivos em assets/chars/sprites/npc_*/ e refaça os packs web com ume-tools pack-sprites.

Captura de evidências: UME_TOUR=storymode ultimate-mugen --shots <dir> --res 1280x720 --mute.

Sobrevivência

Sobrevivência no menu principal é uma sequência sem fim contra o elenco inteiro:

  • Oponentes. Depois de escolher seu lutador, o jogo sorteia o adversário a cada rodada (nunca o chefe oculto, nunca um pacote quebrado). O cenário gira a cada rodada.
  • Escalada. O nível da CPU sobe a cada duas lutas, partindo da sua dificuldade e com teto 8.
  • A vida continua. A barra com que você termina uma luta é a mesma com que começa a próxima, mais a recuperação configurada em Jogabilidade › Vida recuperada (Sobrevivência) (0 / 20 / 35 / 50 / 100 %). Um KO encerra a sequência.
  • Pontuação. Cada vitória soma o Score/ScoreTotal da engine para o seu lado mais um bônus de 1000 × rodada, então o número é determinístico e vem da própria simulação.
  • Fim de jogo. A tela final mostra a pontuação, quantas lutas você venceu e o recorde local; o recorde fica salvo em ultimate-mugen.cfg (survival_best) e um novo recorde é destacado.
  • Replays. A última luta é arquivada como qualquer outra e pode ser assistida pela tela de fim de jogo (botão R) ou pelo navegador de Replays; o replay guarda a vida inicial para a re-simulação bater exatamente.

Estatísticas de pontuação usadas: Fighter::score e Fighter::score_total, preenchidas por HitDef.score e pelos controladores ScoreAdd/TargetScoreAdd e lidas pelos triggers Score/ScoreTotal.

Cooperativo de 2 jogadores (Arcade e Sobrevivência)

Aperte V na tela de seleção (ou clique no botão CO-OP 2P) para começar Arcade ou Sobrevivência com dois jogadores humanos no mesmo lado:

  • P1 e P2 escolhem um lutador cada; os dois ficam em campo juntos (2 contra 1) usando o suporte a equipe simultânea da engine, então pushboxes, mira e câmera normais valem.
  • O lado só perde o round/sequência quando os dois lutadores caem (regra de KO team_simul).
  • As entradas são independentes: P1 usa as teclas/controle do jogador 1, P2 as do jogador 2 (sem precisar de Tab). O HUD marca cada lutador como P1 / P2 pelo slot do piloto, não pelo lado.
  • O Arcade mantém os dois lutadores pela escada e troca o oponente a cada rodada; a Sobrevivência faz o mesmo a cada onda.
  • Replays gravam os dois slots, então uma luta cooperativa se repete exatamente.

Chaves da engine: Match::team_simul. Os slots entram intercalados (P1, oponente, P2), então roots()[0] e roots()[2] são o par humano.

Equipe Tag

Cada lado tem 2 ou 3 lutadores. No início de todo round só o primeiro está em campo; os outros esperam.

  • Troca. Aperte o botão Tag (R no P1, Num Enter no P2; configurável em Controles, ação "Troca (Tag)"). Em controle e toque a troca usa o botão de despertar (R3 / SELECT), porque o despertar fica desativado neste modo. A CPU troca sozinha quando o lutador está abaixo de 30 % de vida e o parceiro está bem mais saudável.
  • Recarga. Depois de cada troca o lado espera tag_cooldown_max ticks (padrão 180, três segundos). O HUD mostra uma barra e a marca TAG sob o retrato de cada parceiro.
  • Janela de tag cancel. A troca só é aceita quando o lutador ativo tem controle, ou nos primeiros tag_cancel_window ticks (padrão 30) depois de um golpe seu tocar o oponente (acerto ou bloqueio). Dá para cancelar a recuperação de um golpe que conectou no parceiro, mas não no meio de um golpe no ar nem enquanto se apanha.
  • Lutadores em espera. Ficam invisíveis, não podem ser acertados, empurrados nem alvejados (enemy, P2, EnemyNear os ignoram), não recebem entrada e mantêm a vida. Seguem a posição do lutador ativo, então entram exatamente onde a troca ocorreu, no estado 0 e com controle.
  • KO. Quando o ativo morre, o próximo parceiro vivo entra sozinho após 50 ticks (a recarga é ignorada). O round só acaba quando todos os membros de um lado ficam sem vida; o tempo esgotado decide pela soma da vida da equipe.
  • Vida e variáveis de quem saiu ficam intactas; todos começam o round seguinte com vida cheia.
  • Scripts. TeamMode retorna 3 neste modo. TagOut / TagIn trocam os lutadores de verdade (veja Extensões Ikemen); Standby vale 1 para quem espera e NumPartner conta os parceiros.
  • Replays gravam o botão Tag como qualquer entrada, então uma luta Tag se repete exatamente.

Chaves da engine (Match): team_tag, tag_cooldown_max, tag_cancel_window. Evento: Event::Tag { side, fighter }.

Boneco de treino

No Treino, o menu de pausa (aba Jogo) tem a linha Comportamento do boneco. Confirmar alterna o plano, que vale na hora e é mantido ao reiniciar a luta:

PlanoO que o boneco segura
ParadoNada
AgachadoBaixo
PulandoCima a cada aterrissagem
DefendendoTrás, só enquanto o rival ataca ou há projétil vivo (ele não sai andando)
Defesa baixaBaixo, mais trás enquanto ameaçado
Gravar meus comandosNada; tudo que você aperta é gravado (até 10 s)
Reproduzir gravaçãoSeus comandos gravados em loop, espelhados para o lado do boneco
IA aprende vocêConta como você troca de ação (andar, agachar, pular, atacar) e responde à ação mais provável: defesa para trás se você vai atacar; ataque ao pular, andar ou agachar. Não zera ao trocar de plano

O plano fica em Pilot::Dummy(DummyPlan) (src/session/dummy.rs); o boneco aperta bits reais de entrada, então regras de defesa, empurrão e dano de chip são os da própria engine. A gravação fica em src/session/dummy_tape.rs; um painel à direita mostra o melhor combo e o tamanho da fita (src/hud/training_panel.rs). Capturas: UME_SHOTS_ONLY=pause grava training-dummy-*.png e pause-training-dummy.png; UME_SHOTS_ONLY=training grava training-tape-playback.png.

Arena do Poder

Escolha Arena do Poder no menu principal, ajuste a partida e escolha seus lutadores para enfrentar a CPU. Suba por 40 plataformas suspensas em oito níveis. Atravesse-as no salto e pouse nelas durante a descida. O lutador ainda pode voltar enquanto estiver acima da base. Ao cair pela borda, ele gira no ar e só é eliminado quando sai da arena. A câmera acompanha a altura e abre o enquadramento quando os lutadores se afastam na horizontal ou na vertical.

Time contra enxame (1 a 5 contra até 100)

A entrada do menu abre uma tela de ajuste antes da seleção: seu time (1 a 5 lutadores), inimigos (1, 5, 10, 25, 50 ou 100) e o tipo de inimigo (lutadores aleatórios ou um lutador escolhido, repetido). Funciona com mouse, toque, teclado e controle.

  • Só um número limitado de inimigos fica em campo ao mesmo tempo (16 no desktop, 12 no navegador, 8 no Android/iOS). Quando um cai, outro entra depois de um instante em um ponto aleatório do cenário (chão ou plataforma), longe do seu time, até o total escolhido acabar. O round termina quando o último inimigo cai ou quando seu time inteiro cai.

  • Inimigos aleatórios vêm de no máximo 8 lutadores distintos (6 no navegador, 3 no celular) que compartilham sprites, então atlas e memória não crescem com a quantidade de inimigos.

  • O mapa cresce com a multidão: usa um número ímpar de blocos da arena original de 1.108 px (1, 3, 5 ou 7), repetindo as plataformas. As bordas de queda acompanham o mapa maior.

  • A câmera segue só o seu time, então inimigos distantes não esticam o zoom. Lutadores fora da tela não são desenhados.

  • Um minimapa aparece abaixo do HUD sempre que o mapa é mais largo que a tela: pontos verdes e ciano são seu time, vermelhos são os inimigos e a moldura amarela é a câmera. O HUD mostra os inimigos restantes sobre o total.

  • Elixir do poder: um frasco brilhante flutua na plataforma mais alta (marcado em dourado no minimapa). Quem chegar primeiro, seu lutador ou qualquer inimigo, dobra a vida máxima e a preenche por completo. Existe uma vez por round e é devolvido quando o próximo round começa. Código: crates/engine/src/matchs/elixir.rs, desenho em src/power_arena_elixir.rs.

Código: simulação em crates/engine/src/matchs/swarm.rs, tela de ajuste em src/app/arena_setup.rs e arena_pick.rs, minimapa e plataformas em bloco em src/power_arena.rs.

Na versão web, abra uma luta diretamente com ?modo=arena&p1=kaito&p2=shion&luta=1.

Mutadores de Partida

Mutadores mudam as regras de uma partida sem alterar os dados dos lutadores. O primeiro mutador é a gravidade.

CampoPadrãoFaixaEfeito
gravity1.00.25 a 4.0Escala a queda de lutadores no ar e a queda de lutadores no chão que ficaram suspensos

Valores fora da faixa, ou não finitos, são recusados por Mutators::with_gravity, que retorna None. Assim um valor ruim nunca chega à simulação.

Escopo nesta versão: a escala vale para o movement.yaccel do próprio lutador. A gravidade de hit (yaccel do HitDef) ainda não é escalada.

Os dois peers de uma partida com rollback precisam usar os mesmos mutadores. Eles são definidos em Match antes do primeiro tick (m.mutators = ...). O padrão 1.0 não muda nada, então partidas existentes não mudam.

Código: crates/engine/src/mutators.rs, aplicado em physics_step (crates/engine/src/matchs.rs). Testes: crates/engine/tests/mutators.rs.

Níveis de Combo e Marca de Energia

O contador de combo mostra um selo de nível abaixo do número de golpes (src/hud/combo_tier.rs).

GolpesSelo
3-5GOOD
6-9GREAT!
10-14SUPERB!
15+CLIMAX!!

O selo COUNTER! aparece acima quando o golpe inicial foi counter.

A barra de energia tem uma marca em 500, o custo do Rush Cancel.

Mobilidade e rebotes do elenco

  • Suzume e Jin têm stats.airDashes = 2.
  • Wall bounce: Suzume swallow, Jin gustdash, Kaito tempest, Garan ascent, Bruno bullrush, Shion cleave, Daichi daybreak.
  • Ground bounce: Garan brimstone, Daichi landslide.

Objetos de cenário: quebráveis, comida e fases bônus

English · Português (BR)

As fases do modo História têm objetos no estilo fliperama que vivem dentro da simulação: caixotes e barris que quebram ao serem golpeados, comida e outros itens que saem deles, e uma fase bônus em que o objetivo é destruir tudo antes do tempo acabar. Todo o conteúdo desta página é original e vem de um único arquivo TOML, então um objeto novo precisa de arte e de algumas linhas de dados, não de código.

Onda com caixote e barril

O que o jogador vê

  • Quebráveis. Qualquer golpe ou projétil que alcance um caixote ou barril causa dano. O sprite troca para um quadro rachado conforme perde vida, treme e pisca no impacto e deixa lascas ou um tambor amassado por alguns segundos.
  • Itens. Um objeto quebrado pode soltar um item. Ele salta, quica uma vez e fica no chão por 15 segundos (pisca nos últimos 2,5). Basta andar por cima para coletar.
  • Fase bônus. Depois do chefe dos Becos da Cidade e do Bambuzal, o vilão sai de cena e a fase bônus começa no mesmo lugar: destrua o carro (4 estágios de dano, fumaça e faíscas quando está muito avariado) ou quebre todo o estoque antes do tempo acabar. Não há inimigos nem como perder; quebrar tudo paga a pontuação dos objetos mais 200 pontos por segundo restante.
ItemEfeitoPontos
Maçã+12 % de vida100
Fatia de pizza+25 % de vida200
Assado+50 % de vida400
Gemasó pontos1500
Bateria+34 % de energia150

Comida recupera vida Fase bônus

Regras (engine)

crates/engine/src/stage_objects.rs é dono do estado (Match::objects): ele é clonado junto com a partida, entra no checksum do netplay e nunca aloca durante um tick.

  • Um Breakable tem posição no chão, faixa (lane), caixa de dano (half_width, height), vida e um PickupSpec opcional. Golpes em pé passam por cima de objetos baixos, então a caixa de dano tem pelo menos 100 unidades de altura.
  • Profundidade: com faixas ligadas, o atacante alcança o objeto quando sua faixa está a até LANE_REACH + depth da faixa do objeto.
  • Um acerto por golpe: depois de um acerto o objeto ignora novos acertos por REHIT_TICKS (10). O atacante recebe MoveContact/MoveHit e até 8 ticks de hit pause, então os golpes normais cancelam em um caixote como cancelariam em um lutador.
  • Objetos solid (o carro) empurram lutadores no chão para fora do seu corpo; pular por cima do teto é livre.
  • Itens só são coletados por lutadores principais do collector_side (o lado do herói), vivos, a até 18 unidades, a até duas vezes o alcance de faixa de um golpe e perto do chão. A cura nunca passa de life_max.
  • start_break_all_goal(ticks) transforma o round em fase bônus: o relógio do round espelha o relógio do objetivo e o round termina para o lado 0 quando tudo está quebrado (Goal::Cleared) ou o tempo acaba (Goal::TimedOut).
  • A apresentação lê objects.events (Struck, Broken, Dropped, Collected, GoalCleared, GoalTimedOut) uma vez por tick e limpa a lista.

Dados (assets/story/objects.toml)

Uma cópia chamada story-objects.toml ao lado do executável (ou no armazenamento do navegador) substitui o arquivo embutido.

[kinds.crate]
sprite = "crate"            # folha em assets/props/story/, quadros lado a lado
frames = 3                  # estágios de dano da esquerda para a direita, o último são os restos
size = [48.0, 48.0]         # tamanho desenhado em unidades de mundo
half_width = 20.0
height = 42.0
depth = 10.0
life = 120.0
score = 100.0
solid = false
debris = [0.78, 0.55, 0.3]  # cor das partículas
sound = "wood"              # "wood" ou "metal"

[pickups.pizza]
sprite = "pizza"            # 6 quadros, um brilho atravessa o item
heal = 0.25                 # fração da barra de vida
power = 0.0                 # fração da barra de energia
score = 200.0

[stages.brazil]
objects = [
  { fight = 0, kind = "crate", x = -78.0, lane = -22.0, drop = "apple" },
]

[stages.brazil.bonus]
seconds = 30
objects = [{ kind = "car", x = 34.0, lane = -16.0 }]

fight é o índice da onda dentro da fase (o chefe é o último), x é medido a partir do centro do segmento daquela luta e lane é limitado à faixa de chão da fase. Uma fase sem tabela bonus vai direto do chefe para a tela de fase concluída.

Arte

python3 tools/story_objects_art.py desenha todas as folhas por código (formas chapadas, rampas com dithering, contorno de um pixel) a 2 pixels por unidade de mundo, então a arte é reproduzível e não usa assets de terceiros. Troque um PNG por uma folha com o mesmo layout para dar outra aparência a um objeto.

Mapa do código

ArquivoPapel
crates/engine/src/stage_objects.rsEstado, relógio do objetivo, corpos sólidos
crates/engine/src/stage_objects/strikes.rsGolpes e projéteis contra quebráveis, itens soltos
crates/engine/src/stage_objects/pickups.rsFísica e coleta dos itens
src/story/objects.rsCatálogo TOML, criação por fase e por fase bônus
src/story/objects_art.rsSprites, sombras, flash de impacto, ordem de profundidade com os lutadores
src/vfx/stage_objects.rsDestroços, faíscas, fumaça, texto flutuante, sons
src/app/story/bonus.rs, src/app/story/hud.rsFluxo da fase bônus e seu HUD

Captura de evidências: UME_TOUR=storyobjects ultimate-mugen --shots <dir> --res 1280x720 --mute.

Passivos

Lutadores nativos (UMF) ativam passivos pelo objeto passives do JSON. Nada é fixo por nome: personagens M.U.G.E.N. e nativos sem essas chaves não são afetados.

"passives": {
  "meterRegen": 0.35,
  "lifeRegen": 0.04,
  "rage": { "maxMultiplier": 4.0, "exponent": 1.0, "startRatio": 1.0, "fullRatio": 0.01 },
  "stacks": { "damageGain": 0.07, "defenceGain": 0.015, "speedGain": 0.015, "maxStacks": 10, "decayTicks": 420, "resetOnRound": true, "specials": true, "supers": true }
}

Fúria (dano cresce conforme a vida cai)

Usada pelo Bruno. Com r = vida / vidaMax:

progresso     = clamp((startRatio - r) / (startRatio - fullRatio), 0, 1)
multiplicador = 1 + (maxMultiplier - 1) * progresso ^ exponent

Com os padrões: 1,0x com vida cheia, cerca de 2,5x com 50%, 3,7x com 10% e 4,0x com 1%. A curva é contínua, sem degraus. exponent 1 é linear, acima de 1 demora a subir, abaixo de 1 sobe cedo. startRatio define de quantos % de vida o bônus começa e fullRatio onde atinge o máximo.

Acúmulos de habilidade

Usados pela Sylene. Cada vez que o lutador entra em um golpe especial (estados 1000 a 1999) ou super (3000 a 3899), inclusive as variantes aéreas, ganha um acúmulo até maxStacks (1 a 30). Golpes normais, voo, teletransporte e supervelocidade não contam.

  • damageGain: dano 1 + damageGain * acúmulos.
  • defenceGain: defesa 1 + defenceGain * acúmulos (máximo 3x).
  • speedGain: velocidade horizontal 1 + speedGain * acúmulos (máximo 1,5x, não vale enquanto apanha).
  • decayTicks: acima de 0, perde um acúmulo após esse tempo sem ganhar outro.
  • resetOnRound: zera os acúmulos a cada round (padrão: sim).

Fúria por tempo (mais forte quanto mais a luta demora)

Usada pelo Garan, o Oni das Cinzas. O dano cresce com o tempo de luta no round atual. O contador só roda com o round ativo (não na introdução, KO ou vitória), para quando o lutador morre e reinicia a cada round.

progresso = clamp((segundosDeLuta - startSeconds) / rampSeconds, 0, 1)
multiplicador = 1 + (maxMultiplier - 1) * progresso ^ exponent
  • maxMultiplier (padrão 5, de 1 a 6): dano máximo no fim da rampa.
  • startSeconds (padrão 0): segundos de luta antes do bônus começar.
  • rampSeconds (padrão 60): segundos do início até o máximo.
  • exponent (padrão 1): 1 linear, acima de 1 sobe tarde, abaixo de 1 sobe cedo.

O Garan usa 15 s de carência e 105 s de rampa: 1x até 0:15, 3x em 1:07 e 5x a partir de 2:00.

Regra de composição e limite

ataque efetivo = min(attackMul * fúria * tempo * (1 + damageGain * acúmulos), max(attackMul, 8.0))
defesa efetiva = defenceMul * superDefenceMul * (1 + defenceGain * acúmulos)

attackMul já inclui stats.attack e os multiplicadores das formas despertada e ascendida (PR #415), então tudo se multiplica. O teto global é 8x o dano base; os 5x do tempo sozinhos nunca são cortados, e combinados com fúria máxima vale o teto de 8x. Sem rage nem stacks os multiplicadores originais ficam intactos.

HUD e efeitos

Uma segunda faixa (violeta para vermelho) acima da faixa de fúria mostra a fúria por tempo. Uma faixa fina na base da barra de vida mostra o progresso da fúria e fileira de marcadores mostra os acúmulos. A aura das formas é reaproveitada e cresce com a fúria ou os acúmulos.

Criar personagem UMF

UMF (Ultimate Mugen Format) descreve um lutador inteiro em um arquivo JSON. O compilador (crates/native/src/compile.rs) gera comandos, estados, HitDefs, projéteis, super pause, cancelamentos e hitboxes. O resultado roda na mesma máquina de estados dos personagens M.U.G.E.N.

Como um golpe é definido

Este é um trecho do golpe jab da definição do Kaito. Ele fica na lista moves, e anim aponta para uma entrada em anims.

{
  "id": "jab",
  "name": "Snap Jab",
  "input": "x",
  "kind": "normal",
  "anim": "jab",
  "hits": [{ "at": 2, "damage": 28, "level": "light", "hitstun": 13 }],
  "cancels": ["strong", "gale", "rise", "tide", "launcher", "overhead", "slide", "string_a"]
}

at: 2 seleciona o segundo quadro da animação. O valor de ticks define a duração de cada quadro, a 60 ticks de simulação por segundo. O compilador gera o comando, o estado de combate e o HitDef com o dano e a reação ao acerto. cancels lista os IDs dos golpes que podem começar antes do fim da animação atual.

Passo a passo

  1. Copie um lutador pronto como base: cp assets/chars/kaito.json assets/chars/meu.json.
  2. Troque id (único, minúsculo, sem espaço), name, series, author e color.
  3. Opcional: coloque o id em assets/chars/index.json para definir a ordem na seleção. Os ausentes entram em ordem alfabética depois.
  4. Rode cargo run --release. O build.rs embute todos os .json da pasta no executável.
  5. Teste no Treino com F2 ligado para ver hitboxes e hurtboxes.

Lutadores UMF também carregam de uma pasta, sem recompilar: coloque o .json em umf/ ao lado do jogo (ou em mugen/umf/, ou na pasta indicada por UME_UMF_DIR). Arquivos de kit na mesma pasta são registrados antes, seja qual for o nome.

Esqueleto do arquivo

{
  "format": "umf/2",
  "id": "meu",
  "name": "Meu Lutador",
  "series": "Minha Série",
  "author": "você",
  "description": "Texto da tela de seleção",
  "color": "#e85d2a",
  "winQuote": "Frase de vitória",
  "intro": "Fala no início do round 1",
  "taunt": "Resposta/provocação",
  "form": "Nome da forma despertada",
  "boss": false,
  "speed": 1.0,
  "stats": {},
  "art": { "type": "sprites", "style": {}, "poses": {} },
  "palettes": [],
  "awakeningPalette": { "hair": "#f6c83e" },
  "anims": {},
  "moves": []
}
CampoObrigatórioDescrição
formatsimumf/2 (umf/1 ainda carrega)
id, name, series, author, colorsimIdentidade; color é a cor do cartão na seleção
bossnãotrue esconde da seleção e coloca como chefe final do Arcade
profilenãoNacionalidade e biografia, ver Perfil
speednãoMultiplicador de velocidade das animações (>1 = golpes mais rápidos)
statsnãoAtributos, tabela abaixo
artsimArte: style.colors guia a recoloração das paletas nos sprites PNG e poses nomeia as chaves de pose
palettesnãoCores alternativas; cada item sobrescreve chaves de art.style.colors
awakeningPalettenãoCores aplicadas sobre a paleta selecionada durante o despertar; sprites de efeitos não mudam
animssimAnimações por nome
movessimGolpes

Reuso: extends, use e kits

Um lutador não precisa ser escrito do zero. Três recursos eliminam o copiar e colar que os pacotes M.U.G.E.N exigem (os números estão em Estudo de código M.U.G.E.N):

RecursoOndeO que faz
"extends": "kaito"raizHerda tudo de um lutador ou kit já carregado: atributos, arte, animações e golpes. Uma lista (["kaito", "storm-kit"]) empilha vários, da esquerda para a direita.
"use": "gale"dentro de um golpeClona outro golpe (de um pai ou de um golpe anterior do mesmo arquivo) com um novo id, mudando só os campos escritos.
arquivo de kit"format": "umf-kit/1"Definição parcial (golpes, animações, poses, atributos) com um id, compartilhada por vários lutadores. O kit core já vem embutido com launcher e escape_burst.

Regras da mescla, aplicadas por crates/native/src/kit.rs antes do parser UMF normal:

  • Objetos (stats, art, abilities, passives) mesclam chave a chave: "stats": { "life": 1080 } muda um número só. Uma animação em anims substitui a herdada por inteiro. O valor null remove a chave herdada.
  • moves casam por id. Uma entrada com parte dos campos mantém o resto ({ "id": "gale", "name": "Crimson Gale" }), um texto simples ("launcher") lista um golpe herdado sem mudanças e { "id": "slide", "remove": true } remove um. Os golpes listados vêm primeiro, na sua ordem; os herdados não citados vêm depois.
  • Identidade é pessoal: name, author, description, profile, boss e npc nunca são herdados de um lutador.
  • spriteSet reaproveita o pacote de pixel art do pai. Recolora com palettes e deixe art.style.colors herdado: são as cores de referência do pacote.
  • Erros apontam o culpado (unknown kit or fighter, move x uses y, which no kit or earlier move defines) e cadeias de extends com mais de 8 níveis são recusadas.

Um lutador completo em 20 linhas está em docs/examples/umf/mika.json: ele herda uma definição de 39 KB e o kit storm-kit.json. Teste com UME_UMF_DIR=docs/examples/umf cargo run --release.

Perfil (nacionalidade e biografia)

Todo lutador tem uma nacionalidade e uma biografia curta, escritas em inglês (en), português do Brasil (pt) e espanhol (es). Um idioma ausente cai para en.

"profile": {
  "country": "jp",
  "nationality": { "en": "Japanese", "pt": "Japonês", "es": "Japonés" },
  "bio": { "en": "Two short sentences.", "pt": "Duas frases curtas.", "es": "Dos frases cortas." }
}
  • Os lutadores nativos, o chefe final e os capangas do modo História guardam seus perfis em assets/char_profiles.json, indexados por id. Um campo profile dentro do arquivo do lutador vence essa tabela, então lutadores UMF importados levam o próprio perfil.
  • country escolhe a bandeira desenhada ao lado da nacionalidade: jp, br, no, us, cn, es, mn, de, kr, ar, au, ru, fr, além das fictícias underworld e eclipse. As bandeiras são formas vetoriais em src/flag/designs.rs (sem arquivos de imagem); adicione uma entrada lá para outro país. Um código desconhecido apenas não mostra bandeira. UME_SHOTS_ONLY=flags salva uma folha com todas as bandeiras.
  • A bandeira aparece no quadro do elenco, no cartão do lutador, na faixa de perfil abaixo do elenco e no cartão de fase do modo História.
  • Mantenha cada biografia abaixo de 260 caracteres: ela precisa caber em duas linhas da tela de seleção.
  • tags é uma lista opcional de tags de estilo de luta ("tags": ["rushdown", "zoner"]). A tela de seleção mostra até três como chips abaixo do elenco. As chaves conhecidas são traduzidas (rushdown, grappler, zoner, balanced, aerial, trapper, counter, power); qualquer outra aparece em maiúsculas (storm-caller vira STORM CALLER). A lista fica em src/profile_tags.rs.
  • A tela de seleção mostra a nacionalidade e a biografia do lutador em destaque abaixo do elenco (capangas e o chefe aparecem com o filtro Chefes). O cartão de fase do modo História mostra o perfil do chefe da fase.
  • Lutadores sem perfil (conteúdo M.U.G.E.N) continuam mostrando description.
  • cargo test --release -p ultimate-mugen profile confere que todo arquivo de lutador em assets/chars tem perfil completo nos três idiomas.

stats

CampoPadrão de exemploSignificado
life1000Vida
power3000Barra máxima de super (1000 por nível)
attack / defense100Multiplicadores em %
walk[2.4, 2.2]Velocidade andando para frente / para trás
run[5.2, 4.6]Corrida para frente / recuo
jump[-8.4, -2.5, 0, 2.6]Velocidade vertical, horizontal para trás, neutra e para frente
gravity—Aceleração vertical
airJumps—Pulos extras no ar
airDashes1Air dashes por pulo (movement.airdash.num)
height100Altura do corpo
width[16, 15]Largura frente / trás para empurrão

anims

Cada animação é uma lista de quadros:

"jab": { "frames": [
  { "pose": "jab0", "ticks": 3 },
  { "pose": "jab1", "ticks": 3, "hit": { "part": "handR", "radius": 10 } },
  { "pose": "jab0", "ticks": 5 }
], "loop": 0 }

Um quadro só com pose e duração pode ser escrito "pose*ticks", e as duas formas se misturam na mesma lista:

"jab": { "frames": ["jab0*3", { "pose": "jab1", "ticks": 3, "hit": { "part": "handR", "radius": 10 } }, "jab0*5"], "loop": 0 }

Rode node scripts/umf2-migrate.mjs antes de commitar um lutador do jogo: ele grava o layout canônico que o CI confere. Veja o ADR 0007. O formato também é um JSON Schema conferido no CI: Esquema UMF.

Campo do quadroDescrição
poseNome de uma pose em art.poses ou a pose inline (objeto)
ticksDuração em ticks (60 por segundo); -1 = infinito
hitHitbox ativa: part (membro ou arma) + radius, ou box [x1, y1, x2, y2]
hurt"none" remove a hurtbox (invencível no quadro)
effectDesenha um efeito em vez do corpo (projéteis, faíscas), ver Quadros de efeito
offsetDeslocamento [x, y] do desenho
loopÍndice do quadro onde o loop recomeça

Como um frame de ataque vira hitbox

Frames desenhados com sprites em pixel usam como caixa de golpe o box explícito quando existir, senão uma caixa padrão semeada pelo part do hit (baixa para pés e joelhos, alta para a cabeça, média nos demais) e pelo radius, ajustada à silhueta do sprite; quando existe, então cada golpe mantém o próprio alcance. O compilador então remodela a caixa para as proporções medidas em 605 personagens M.U.G.E.N (native/pixel_hit.rs, H = altura em pé, 96 unidades para height 100):

  • como um Clsn1 do M.U.G.E.N, a caixa vai do corpo até a ponta: começa no máximo 0.10 H à frente da origem e alcança pelo menos 0.60 H (a mediana do M.U.G.E.N é 0.72 H nos socos e 0.80 H nos chutes);
  • pelo menos 0.36 H de altura, nunca acima de 0.95 H nem abaixo do chão (socos do M.U.G.E.N ficam entre -0.75 H e -0.33 H, chutes descem até -0.05 H);
  • a hurtbox em pé tem 0.46 H de largura (mediana do M.U.G.E.N 0.46 H) e a agachada 0.67 H de altura (mediana 0.67 H);
  • um box explícito é usado como escrito, então mantenha-o dentro dessas proporções; a auditoria falha caso contrário.

cargo test --release -p ume-engine --test it native_hitbox_audit:: verifica todos os frames de golpe do elenco (altura, alcance, início, largura, acima da cabeça, abaixo do chão) e native_normal_reach imprime e compara alcance e dano dos quatro golpes normais em pé de cada lutador.

Nomes padrão

Animações com estes nomes viram as ações reservadas do M.U.G.E.N, então os estados comuns funcionam sem código.

NomeAçãoNomeAção
idle0guardHit150
turn5crouchGuardHit152
crouchTurn6airGuardHit154
crouchStart / crouch / crouchEnd10 / 11 / 12lose / draw / win170 / 175 / 181
walk / walkBack20 / 21intro190
jumpStart / jumpUp / jumpFwd / jumpBack / jumpDown40–44taunt / powerUp195 / 196
land47defeat1…defeat4197–200
run / hop100 / 105hitLight / hitMedium / hitHeavy5000–5002
guardStart / crouchGuardStart / airGuardStart120–122hitLowLight / hitLowMedium / hitLowHeavy5010–5012
guard / crouchGuard / airGuard130–132hitCrouch / hitAir5020 / 5030
guardEnd140airRecover / fall / trip5040 / 5050 / 5070
bounce / bounceAir / lieDown / getUp / dead5100 / 5101 / 5110 / 5120 / 5150

taunt, powerUp e defeat* têm versão padrão se você não definir. Outros nomes recebem números livres na ordem do arquivo.

moves

{ "id": "gale", "name": "Onda de Vento", "input": "~D, DF, F, x", "simple": "sp1",
  "kind": "special", "anim": "gale", "invuln": [1, 3],
  "moves": [{ "at": 2, "vel": [2, -9] }],
  "hits": [{ "at": 2, "damage": 90, "level": "heavy", "launch": true }],
  "projectile": { "at": 3, "anim": "galeOrb", "hitAnim": "galeHit", "speed": [5, 0], "offset": [40, -60], "damage": 70 } }
CampoValoresEfeito
id, nametextoIdentificador e nome na lista de golpes
inputsintaxe de comando, abaixoComando
simplesp1 sp2 sp3 superAtalho de um botão (teclas 1/2/3, toque)
kindnormal special superPrioridade e cancelamento: normal → especial → super em acerto ou defesa
whenstand (padrão) crouch airEstado de onde o golpe sai
animnome em animsAnimação do golpe
hitslistaUm HitDef por item
moves[{ "at": quadro, "vel": [x, y] }]VelSet no quadro; use null para manter um eixo
projectileobjeto ou listaProjéteis
costnúmeroBarra consumida; super usa 1000 por padrão
invuln[início, fim]Quadros invencíveis
teleportquadro, objeto ou lista de { "at", "mode", "offset", "turn" }Teleporte simples ou multi-etapa (behind, front, above ou offset [x, y]); sai naturalmente para queda aérea (50) se terminar com Pos Y < 0
fxauraEfeito visual extra
explods[{ "at", "anim", "pos", "postype", "bind", "removeTime", "priority", "scale", "superMove" }]Dispara efeitos visuais (esferas de ki, auras, overlays de super)
afterimage{ "at", "time", "length", "framegap", "trans", "palBright", "palContrast", "palAdd", "palMul" }Customiza o rastro de AfterImage
shake{ "at", "time", "ampl", "freq" } (objeto ou lista)Tremor de tela por golpe (EnvShake)
flash{ "at", "time", "color", "under", "superMove" } (objeto ou lista)Flash ou escurecimento de fundo (EnvColor)
superPause{ "at", "time", "pos", "anim", "darken" }Customiza a pausa de super
velMul / velAdd[{ "from", "to", "x", "y" }]Multiplica ou soma a velocidade a cada tick entre os elementos from e to da animação (to 0 = até o fim). velAdd em y é a gravidade própria do golpe, então a gravidade nativa fica desligada nesse trecho (VelMul, VelAdd)
posFreeze[{ "from", "to" }]Prende o lutador entre esses elementos (PosFreeze)
posSet[{ "at", "x", "y" }]Define a posição absoluta num elemento (PosSet)
palFx[{ "at", "time", "add", "mul", "sinAdd", "color", "invertAll" }]Flash de cor no lutador (PalFX)
followUp{ "to": "move_id", "on": "hit" | "contact" | "hitNow" | "end" | "command" | "release", "command", "at" }Transição para golpe de continuação: no acerto, no fim, enquanto command está segurado (command) ou quando é solto (release)
holdRelease{ "button": "y", "tiers": [{ "at": 0, "to": "move_id" }, { "at": 45, "to": "move_id" }] }Segurar para carregar: o golpe fica na anim (em loop) enquanto button está segurado e, ao soltar ou no fim da anim, vai para o nível com o maior at (ticks segurados) alcançado. Os vfx da carga somem ao soltar
spawn[{ "at", "state", "id", "name", "pos", "postype", "facing", "ownPal", "superMoveTime", "pauseMoveTime" }]Cria um helper que roda um estado de scripts.cns (Helper) no elemento at da animação
voice1000, 0Grupo e índice do som do personagem tocado no início do golpe, quando o áudio estiver incluído
airPhysicstrueMantém a física aérea
cancelslista de idsEste golpe pode ser cancelado para esses golpes em contato (acerto, defesa ou projétil que encosta). Declarar substitui o gatling automático a partir deste golpe
throw{ "damage", "bind", "launch", "at" }Agarrão: veja Traços de combate
armor{ "hits", "threshold" }Absorve golpes enquanto o movimento está ativo
parry{ "window": [de, até], "spark" }Devolve ataques na janela de elementos da animação
timestopticksCongela todos os outros
bursttrueQuebra de combo usável ao apanhar
requires{ "life": {"max": 0.5}, "enemyLife": {"min": 0.1, "max": 0.5} }Condição de vida: o golpe só inicia enquanto a vida do lutador (life) e/ou do rival (enemyLife) estiver entre min e max, como fração da vida máxima (0 a 1). Qualquer limite pode ser omitido. Compila para triggers life <= lifemax * max e enemy,life <= enemy,lifemax * max
flighttruePairar em 8 direções enquanto o golpe dura

Kits embutidos (extends). Lutadores podem herdar blocos prontos via "extends": ["core", "ki_fighter", "clone_arts", "aerial_rush"] (crates/native/src/kits/): core entrega launcher e escape_burst; ki_fighter entrega abilities.fly, abilities.teleport, abilities.superSpeed, abilities.charge (com auraColor, shake, sound, explod) e o modelo de feixe multi-hit ki_beam (missTime, hitflag); clone_arts acopla clones autônomos (helpers.clones); aerial_rush adiciona voo, super velocidade e pulo aéreo duplo.

Finisher. Um golpe com "kind": "finisher" (use throw ou hits para o efeito) só fica disponível após um nocaute (RoundState = 3 e WinKO). Quando o round final termina em nocaute e o vencedor tem um finisher, o round espera até 6 segundos em "FINISH HIM" para o vencedor executá-lo; executar (ou o tempo acabar) encerra a espera. Elencos sem finisher não mudam.

Ultimate. Um golpe cujo id começa com ult_ é a ultimate do lutador, e todo lutador nativo declara uma (o comando é ~D, DF, F, D, DF, F, x+y). O compilador gasta o medidor inteiro nela: cost passa a valer 3000 por padrão (as três barras do HUD), o golpe recebe 70 % de bônus de dano onde um super comum recebe 30 %, e o congelamento de super dura 75 ticks em vez de 55. cargo test --release -p ume-engine --test it native_ultimates:: falha quando um lutador não tem ultimate, quando o custo não é de três barras, quando a ultimate não inicia pelo comando ou não drena o medidor, ou quando o dano medido fica abaixo de 380 ou não supera todos os supers do lutador.

Traços de combate

  • Gatling automático. Um golpe sem cancels segue o gênero: um normal cancela em qualquer normal mais forte (light < medium < heavy pelo maior nível de acerto, empate pela ordem de declaração, então sequências nunca entram em loop), normais em pé ligam nos agachados, normais aéreos encadeiam com aéreos, e todo normal cancela em todo especial e super no contato. Especiais só cancelam em outros especiais por cancels explícito; supers cancelam a partir de qualquer golpe.
  • Rotas explícitas. "cancels": ["strong", "rush"] no jab faz strong e rush aceitarem o jab no contato. Um especial de projétil pode ser cancelado quando o projétil toca o oponente. Um especial air pode começar de um lançador no chão que o liste (uppercut, depois mergulho).
  • throw (damage, bind [x, y] à frente de quem agarra, launch [vx, vy], at = frame do agarrão, padrão 1). O HitDef do agarrão dispara no elemento at (dê uma caixa hit a esse frame), a vítima fica presa em at + 1, leva o dano em at + 2 e é lançada, então a animação precisa de pelo menos at + 2 frames. Agarrões ignoram defesa e falham fora do alcance.
  • armor (hits absorvidos, threshold opcional = dano acima do qual a armadura quebra). Do início até o último frame de acerto o golpe recebe 35 % de dano reduzido e não é interrompido; gastos os hits, o próximo golpe derruba normalmente.
  • Cola de multi-hit. Golpes com três ou mais hits empurram o alvo só um pouco a cada acerto exceto o último (a sequência inteira conecta) e projéteis perfurantes (4+ acertos) não empurram o alvo para fora do feixe. Defina knockback para desativar.

Valide com cargo test --release --test it native_roster_lab:: -- --nocapture (todo estado de ataque precisa conectar; imprime dano e alcance), --test it native_combo_routes:: (todo cancel declarado encadeia de ponta a ponta) e python scripts/audit_native_moves.py.

hits[]

CampoPadrãoDescrição
at—Quadro (1 = primeiro) em que o HitDef é ativado
damage—Dano
guardDamagedamage / 8Dano na defesa
levelmediumlight (hitstop 9, hitstun 12), medium (11, 16), heavy (13, 20)
guardmidhigh, low, mid ou unblockable
knockback / airKnockbackpelo nívelVelocidade [x, y] aplicada ao oponente
launchfalseDerruba
hitstop, hitstun, spark, shakepelo nívelAjuste fino

projectile

CampoDescrição
atQuadro em que sai
anim / hitAnimAnimação em voo / ao acertar
speed / accelVelocidade e aceleração [x, y]
offsetPosição de saída [x, y] relativa ao lutador
damage, level, launch, knockbackComo em hits
hitsNúmero de acertos
removeTimeTicks até sumir
priorityPrioridade contra outros projéteis

Elementos e atordoamento

hits[] e projectile aceitam element (fire, ice, lightning, earth, wind, water) e stun (ticks extras de hit-stun). O compilador soma o hit-stun e o tremor do elemento e tinge a vítima por um instante (PalFX): ice congela por mais tempo (+16), lightning eletrocuta (+22 e tremor de 8 ticks), fire queima em vermelho, earth treme a tela, wind e water aplicam um tom curto. stun soma por cima e adiciona tremor de 5 ticks quando não há outro. Elementos desconhecidos são ignorados.

hits[] e projectile também aceitam ownSound: true: o hitSound toca do banco de sons do próprio lutador (prefixo S no M.U.G.E.N) em vez do banco comum de luta.

Sintaxe de comando

SímboloSignificadoExemplo
F B U D / DF DB UF UBDireções (relativas ao lado)D, DF, F, x
x y z a b cBotões (s = start)x
,Em sequênciaF, F
+Ao mesmo tempox+y
~Soltar~D, DF, F, x
/Segurar/B, F, x
$Direção inclusiva ($D aceita DB, D, DF)$D, x
>Sem nenhuma outra entrada entre os passosF, >F
NDireção neutra (nenhuma direção pressionada)N, x

Normais de poder (Soco 3 e Chute 3)

Todo lutador nativo que não declara um golpe em z ou c ganha quatro normais extras na compilação (native/power_normals.rs): power_punch e crouch_power_punch em z (tecla padrão E, exibido como Soco 3), power_kick e crouch_power_kick em c (tecla padrão D, exibido como Chute 3). Cada um reaproveita animação, tempo, altura de defesa e cancels da normal de chão mais forte da família (y e depois x nos socos, b e depois a nos chutes; as versões agachadas usam a normal agachada), com o nome <nome base> Max. Os golpes causam 130 % de dano, viram heavy, ganham 4 de hit-stun e 2 de hit-stop quando definidos e empurram 25 % mais. Golpes que cancelam na normal base também cancelam na versão de poder, e os novos golpes aparecem na lista de golpes da pausa. Declare um golpe próprio em z ou c para não usar o automático. Versões aéreas não são geradas aqui.

Todos os lutadores nativos também recebem dois chutes baixos normais na compilação (native/low_normals.rs): lowkick em D+a agachado e airlowkick em D+a no ar. Eles reutilizam as animações de chute baixo agachado e de chute aéreo do próprio personagem, preservando os quadros de pixel art, e acertam a guarda baixa. A versão aérea avança e desce para alcançar o adversário em distâncias curtas. Se o lutador já declarar um golpe com o mesmo id ou a mesma combinação D+a e estado, o golpe declarado é preservado.

Carregar energia (todo lutador)

Todo lutador nativo pode carregar o medidor: segure R (a entrada s / Start; para pausar a luta use Esc ou P). O lutador entra no estado 3920, repete a animação powerUp com um brilho azul e ganha de 9 a 48 de energia por tick (native/charge_ramp.rs, enchendo um super de 1000 em cerca de um segundo) até soltar o botão (depois de pelo menos 6 ticks) ou encher o medidor. O estado é movetype = I, então um golpe o interrompe, e um lutador com formas ainda se transforma com T quando o medidor chega ao custo da forma. O comando é charge_cmd (/s) e aparece como Charge Energy na lista de golpes. A IA embutida só carrega no nível 3 ou mais, com menos de 700 de energia, quando o rival está a mais de 190 unidades e não está atacando.

Habilidades no ar (todo especial e super)

Todo special e super com when ausente ou "stand" ganha também uma versão aérea (estado 20000 + estado de chão, rótulo State -1, air <nome>), acionada pelo mesmo comando com o lutador no ar. O lutador flutua no começo do golpe (mantém 40 % do deslize), a gravidade volta a 45 % depois de 12 ticks, o golpe termina no estado de queda do salto (50) com controle, e tocar o chão o interrompe com o estado de pouso (52). As versões aéreas causam 70 % do dano de chão, os projéteis saem inclinados para baixo (inclinação 0,85) para alcançar um rival no chão, e cada salto permite um especial aéreo (var(57), zerada ao pousar). Agarrões, golpes de voo e golpes com when: "crouch" ou "air" mantêm suas próprias regras.

Mecânicas exóticas (helpers, throw cinemático, bossRules, scripts)

Qualquer animação em anims aceita "id": 8801 para fixar um número de ação para scripts customizados ou p2Anim. Além disso, todo padrão avançado de M.U.G.E.N / Ikemen GO (ZSS) pode ser declarado direto no JSON UMF sem editar Rust:

BlocoSubstitui no M.U.G.E.N / ZSSRecursos principais
helpers.standHelper(keyctrl=1) + BindToParent + HitOverride manuaisStand estilo JoJo com hitbox/hurtbox independente, comandos próprios (input) ou sincronizados (triggerMove), evocação/recolhimento, dreno de barra (drain) e transferência de dano (lifeTransfer) via ModifyPlayer
helpers.clonesHelpers autônomos de IAClones Kage Bunshin com IA própria (count, maxActive, duration, walkSpeed, attackRange, oneHitPoof), perseguição, ataques aleatórios e liberdade de câmera (ScreenBound movecamera = 0, 0)
moves[].throw (cinemático)TargetState + ChangeAnim2 multi-etapap2Anim (ChangeAnim2), cameraFree, camera (zoom, pos, delta, delay, bound, time, lag, freeze, hideUi, bars), coreografia em steps[] (at, bind, anim, p2Anim, p2State, damage, shake, facing, launch, camera, flash, sound, slowmo, invert) e proteção !GetHitVar(IsBound)
moves[].cinematicDireção cinematográfica em golpes/supersletterbox, hideUi, freeze, title, camera, cuts[] (keyframes com zoom/pan, flash, shake, slowmo, invert, bars, lines, darken, text) e finishSlow; gera Zoom, Cinema, SlowMo, AssertSpecial, EnvColor e Cut-In anime
bossRulesQuebra de UI em [StateDef -4] via AssertSpecial / Text / ModifyPlayerhideHud, hideLifeBar, hidePowerBar, hideTimer, freezeTimer, texts[], modifyPlayer[] ("enemy" ou próprio chefe), phases[] (lifeBelowRatio, when, once, attackMul, defenceMul)
scriptsArquivos .zss / .cns com [StateDef -4] e map()Strings inline zss e cns (suporta [StateDef -4] rodando até durante SuperPause, map(k) := v, teamMap(k) := v), commands[] customizados e expansão @anim(nome) / @move(id)

Ferramenta de Debug in-game e CLI

  • In-game (F2): ativa hitboxes/hurtboxes com preenchimento translúcido, pushbox âmbar, eixo/pivô, vetor de velocidade, linhas de vínculo (helper/target), barra superior e painel com 4 abas: F4 alterna Overview / Vars & Maps / Clipboard & HitDef (DisplayToClipboard) / Console & Engine (PrintToConsole e avisos); F5 congela a simulação; F6 ou . avança +1 frame; F7 alterna velocidade (1x/0.5x/0.25x/0.1x); F8 alterna camadas de caixas.
  • CLI: cargo run --release -p ume-devtools --bin ume-tools -- debug-fight <char1> [char2] [--frames N] [--only-moves] [--json] inspeciona frame data (startup, active, recovery, alcance), clipboard, console e eventos cinematográficos.

Sprites pixel art (opcional)

Se existir assets/chars/sprites/<id>/, o lutador é desenhado com arquivos PNG, como os lutadores M.U.G.E.N são desenhados por sprites. Use PNGs transparentes voltados para a direita, com os pés na borda inferior e o mesmo tamanho de tela (400×400 RGBA) em todos os arquivos de um lutador. Gere PNGs de combate faltantes com generate_image usando uma âncora canônica em pixel art validada do próprio personagem (nunca use o rig vetorial procedural depreciado).

ArquivoPoses que o usam
01_idleidle0, andar, correr, agachar, defender, pular e toda pose sem arte própria
02_attack1 … 06_victoryposes de soco, chute, especial, projétil e vitória / provocação
07_idle1, 08_idle2os outros quadros de respiração do idle (idle3 reaproveita 07_idle1)
09_hit1, 10_hit2, 11_hit3hitH1, hitH2, hitH3 (dano)
12_fall1, 13_fall2hitAir1/fall1/trip e hitAir2/fall2/bounce (lançado ao ar)
14_lielie, dead, lose e toda pose df* (nocauteado, com hurtbox baixa e larga)
15_power0, 16_power1, 17_power2powerup0, powerup1, powerup2 (transformação, tecla T)

meta.json guarda {"refHeight": N}: a altura em pixels do corpo em pé em 01_idle.png. Toda pose do lutador é escalada para esse corpo medir 100 unidades, então um sprite deitado ou agachado mantém o mesmo tamanho de pixel. Sem ele, cada PNG é escalado a 100 unidades pela própria altura.

Quando awakeningPalette altera hair, cada sprite define frames.<nome>.awakeningHair como [esquerda, topo, direita, baixo] em pixels da imagem original. A troca de cabelo fica limitada a esse retângulo; sprites sem retângulo mantêm o cabelo original. O empacotamento web redimensiona essas coordenadas junto com a imagem.

As entradas de palettes também valem para esses PNGs: cada pixel é casado com a linha de sombreamento de uma cor declarada em art.style.colors e a cor da paleta substitui no mesmo tom. Uma chave de paleta sem entrada correspondente em art.style.colors, ou uma cor que nada na arte lembra, fica intocada.

O build web não lê essa pasta do disco. scripts/build-web.sh roda ume-tools pack-sprites (crates/devtools), que grava um assets/chars/sprites/<id>.pack por lutador (imagens limitadas a 768 px, 256 cores gravadas como sprites LZ4, veja Container de Sprites, âncoras do meta.json reescaladas) em web/dist; o navegador baixa o pack quando o lutador ganha foco na seleção ou é carregado para a luta, e o engine lê pelo mesmo diretório virtual. Se o download falhar, o lutador fica sem arte: a partida espera o pacote e informa a falha.

Validar

cargo test --workspace --release

Revise a arte dos lutadores com ume-tools audit-sprites, que lista poses ausentes e reaproveitadas, ou no próprio jogo.

Os pacotes de sprites do navegador carregam de forma assíncrona. Um pacote novo ou substituído invalida as prévias e todas as paletas em cache do lutador afetado; os demais mantêm seus caches. O carregamento da luta aguarda os pacotes dos lutadores nativos escolhidos e informa falhas de download, em vez de iniciar com uma aparência procedural antiga. Definições nativas importadas sem pacote integrado continuam compatíveis.

Compartilhar um lutador como pacote

Um zip (ou pasta mugen/) com um .json UMF ao lado de uma pasta sprites/ com 01_idle.png, os PNGs das poses e um meta.json opcional (axisX, axisY, refHeight por pose) é importado como lutador nativo, sem .def. O mercado instala como qualquer outro pacote. O Goku SSJ4 UMF é o exemplo de referência.

Paridade com M.U.G.E.N (migração exata)

tools/mugen2umf convert transforma uma pasta ou zip M.U.G.E.N nesse pacote com comportamento idêntico. O json leva um bloco mugen e art.type: "mugen":

  • mugen.cns, mugen.st, mugen.stcommon, mugen.cmd: os arquivos de estados e comandos originais, sem alteração.
  • mugen.anims: cada action do AIR pelo número, com sprite, offset, ticks, flip, blend e alpha, escala, ângulo e todas as caixas Clsn1/Clsn2.
  • mugen.info, mugen.mugenVersion, mugen.localcoord: o [Info] do .def original.
  • mugen.names: nomes opcionais dos golpes na lista, pela chave do comando.
  • sprites/: um PNG indexado por sprite do SFF (índices e paleta exatos), sffpal_<k>.png com as paletas do SFF, pal1.act..pal12.act, todos os sons como snd_g_i.wav e meta.json (eixos, tamanhos e paleta de cada sprite na ordem do SFF).

O motor monta o lutador com o mesmo código de um personagem M.U.G.E.N (ume_engine::loader::assemble_mugen_char), então estados, comandos, constantes, animações, paletas e sons são os mesmos. Os campos UMF (profile, series, falas, rivals, scripts) ficam por cima. mugen2umf parity prova golpe a golpe.

Os moves nativos funcionam por cima de um lutador exato: cada anim (e o anim de projéteis) é o número de uma action M.U.G.E.N ("anim": "3000"), e os golpes compilam como os de um lutador nativo, com comandos m_<id>, cadeias, agarrões, projéteis e variantes aéreas. Os estados ficam num bloco de 100000 números acima do maior estado original e as rotas do Statedef -1 rodam antes das originais, então nenhum estado original é substituído. O parity compara a parte exata sem eles e os lista em "Added by UMF", jogados pelo input real.

As paletas de SFF v1 seguem o M.U.G.E.N: num SFF de paleta compartilhada (tipo de paleta 1 no cabeçalho), um sprite marcado "mesma paleta" usa a paleta do personagem (o .act escolhido), nunca a paleta própria do sprite anterior (em geral o retrato 9000). SFFs de paleta individual continuam herdando do sprite anterior.

Elemento do lutador

O campo opcional element aceita fire, ice, lightning, water, earth, wind ou neutral. O HUD exibe o elemento ao lado do retrato do lutador, com texto localizado quando o ícone não estiver disponível. O campo não altera o dano nem as regras da luta.

Ultimate MUGEN — Fichas e Dossiê dos Personagens

Este documento apresenta os dossiês biográficos completos, históricos marciais, alinhamentos, países de origem, cenários associados e dinâmicas de interação para todos os 16 lutadores nativos de Ultimate MUGEN.


Visão Geral do Elenco (Roster)

IDNomePaísAlinhamentoPapel / ArquétipoCenário NatalForma Desperta
kaitoKaito ArashiJapãoHeróiKarateca Andarilho da TempestadeTelhado do Dojo — Pôr do Sol (dojo)Olho da Tempestade
shionShion KuroganeEgitoAnti-HeróiEspadachim Exilado da Lua PálidaBambuzal ao Luar (bamboo)Lua Cheia
akioAkio HoshiMéxicoHeróiLutador Impetuoso da Queda EstelarTelhado do Dojo — Pôr do Sol (dojo)Luz Estelar
suzumeSuzume KagerouVietnãAnti-HeróiKunoichi das Sombras do Lótus CarmesimBambuzal ao Luar (bamboo)Lótus Sombrio
brunoBruno "Bulldozer" VolkBrasilHeróiCampeão Invicto Peso-PesadoPraça do Interior — Brasil (brazil)Fúria do Ringue
syleneSylene VashtiNoruegaNeutroSoberana Exilada da Coroa GlacialPlanalto Rochoso (plains)Rainha do Inverno
voltaVX-9 VoltaEstados UnidosHeróiAndroide Cibernético SencienteNeo-Metrópole 2099 (neon)Sobrecarga
lianLian FengChinaHeróiGrã-Mestra dos Chutes da Lanterna de JadeBambuzal ao Luar (bamboo)Dragão de Jade
garanGaran the Ashen OniSubmundoVilãoCalamidade Demoníaca AncestralCratera Vulcânica (volcano)Oni Desperto
marlowCapitão Marlow ReyesEspanhaAnti-HeróiCorsário Aéreo do Galeão TempestuosoPlanalto Rochoso (plains)Capitão Tempestade
kanameKaname FuyutsukiSuíçaNeutro / LealJuiz Samurai do Inverno EternoPortão dos Espíritos (spirit)Lâmina Espiritual
jinJin KazagurumaJamaicaHeróiShinobi Acrobata do VendavalBambuzal ao Luar (bamboo)Tufão
daichiDaichi GinrouMongóliaHeróiLobo dos Picos Celestes de Ki DouradoPlanalto Rochoso (plains)Instinto Lupino
valdricValdric MornAlemanhaVilãoPríncipe Senhor da Guerra ImperialNeo-Metrópole 2099 (neon)Dominância Escarlate
harukiHaruki SumiCoreia do SulHeróiErudito Relutante / Portador dos TitãsPortão dos Espíritos (spirit)Fúria Contida
oboroMikazuki OboroDimensão EclipseVilão Supremo (Chefe)Soberano das Ilusões e Chamas NegrasPortão dos Espíritos / Vulcão (spirit/volcano)Véu Desperto

Dossiês Individuais

1. Kaito Arashi (嵐 海斗)

Identidade VisualPerfil de Combate
Retrato Kaito
Retrato de Seleção / HUD
Série: Crônicas da Estrada da Tempestade
ID: kaito | Autor: Ultimate MUGEN
Origem: Estrada da Tempestade, Izu, Japão 🇯🇵
Alinhamento: Herói / Vanguarda do Equilíbrio
Cor Temática: #2f8f9d (Verde-água e Dourado)
Forma Desperta: Olho da Tempestade
Cenário: Telhado do Dojo — Pôr do Sol (dojo)
Estilo: Karatê Arashi-ryu (Impacto dos Ventos)

Sprite Kaito Postura de Luta em Pixel Art

Biografia e Background

Kaito Arashi é um karateca andarilho que viaja a pé por onde as correntes de ar soprarem. Vestindo um kimono verde-água remendado que já presenciou centenas de combates árduos pela Ásia, Kaito encara a luta não como espetáculo de vaidade, mas como uma conversa sincera entre dois espíritos. Criado nos penhascos de Izu e treinado por um mestre eremita na Península de Izu, ele aprendeu a sincronizar o ritmo de sua respiração com a passagem dos tufões costeiros, gerando ondas de choque de alta densidade e rajadas de vácuo a cada soco desferido.

Quando o Eclipse Escarlate começou a rasgar o céu, Kaito sentiu a perturbação das correntes de ar e o desespero das vilas atingidas pelas fendas dimensionais. Empunhando seu bastão de caminhada, desceu a montanha com o voto inabalável de encontrar a fonte da corrupção e proteger os viajantes e inocentes das sombras de Oboro.

Frases Marcantes

  • Entrada: "Sinto a tempestade chegando. Em guarda."
  • Provocação: "Sua guarda tem uma brecha. Aproveite."
  • Vitória: "O vento me trouxe até aqui. Sua guarda só te trouxe ao chão."

Golpes Característicos

  • Punho do Vendaval (Gale Fist / Reppūken): Dispara uma esfera de pressão de vento cortante rente ao solo.
  • Tempestade Ascendente (Rising Tempest / Shoryū-Arashi): Gancho giratório aéreo envolto em vórtices de ar.
  • Chute Canguru (~D, DB, B, a+b): Kaito se agacha, salta para a frente e lança o adversário com um chute frontal.
  • Chute Passo de Trovão (Thunderstep Kick): Sequência de chutes voadores de vácuo em trajetória horizontal.
  • Super — Barragem do Tufão (Typhoon Barrage): Combinação devastadora de 9 golpes que arremessa o oponente para o olho do ciclone.

Dinâmica de Interações

  • vs. Mikazuki Oboro: Choque filosófico supremo. Kaito recusa render-se à ilusão niilista de Oboro, jurando dissipar a escuridão com os ventos da verdade.
  • vs. Jin Kazaguruma: Relação fraternal e tutelar. Kaito incentiva o entusiasmo acrobático de Jin, mas sempre o lembra de manter os pés firmes no chão.
  • vs. Daichi Ginrou: Rivalidade histórica e respeitosa. O duelo clássico entre o vento sereno e o lobo impetuoso dos cumes gelados.
  • vs. Bruno Volk: Duelo de socos francos. Kaito admira a força física honesta e o coração generoso do boxeador brasileiro.

2. Shion Kurogane (黒鉄 紫苑)

Identidade VisualPerfil de Combate
Retrato Shion
Retrato de Seleção / HUD
Série: Réquiem da Lua Pálida
ID: shion | Autor: Ultimate MUGEN
Origem: Vale da Lua Negra, Egito 🇪🇬
Alinhamento: Anti-Herói / Guardião Melancólico
Cor Temática: #4a3b68 (Índigo Lunar Profundo)
Forma Desperta: Lua Cheia
Cenário: Bambuzal ao Luar (bamboo)
Estilo: Espada Pesada Kurogane e Gravidade Lunar

Sprite Shion Postura de Luta em Pixel Art

Biografia e Background

Shion Kurogane é um exilado solitário envolto em um manto negro, que carrega nas costas uma espada forjada com ferro de meteorito lunar. A lâmina é tão incrivelmente densa e pesada que homem comum algum consegue erguê-la do chão. Outrora o mais promissor campeão do Clã Kurogane, Shion foi banido após recusar-se a sacrificar peregrinos inocentes em um ritual de sangue sob a Lua Pálida.

Carregando o arrependimento e a memória de seus irmãos caídos, Shion vaga por florestas de bambu e desfiladeiros gelados sob o luar perpétuo. Ele caça as aberrações nascidas das fendas de Oboro, encarando cada golpe de sua lâmina colossal como um ato solene de expiação.

Frases Marcantes

  • Entrada: "A lua observa. Faça valer a noite."
  • Provocação: "Sem pressa. A noite é longa."
  • Vitória: "A lua não tem pressa. Minha lâmina também não."

Golpes Característicos

  • Corte Crescente (Gettan-Zan): Arco descendente que fende o solo com a força gravitacional da lua.
  • Barreira do Eclipse Pálido: Posiciona a enorme lâmina como escudo, absorvendo e anulando projéteis pesados.
  • Rastro Lunar (Tsukikage): Crava o pomo da espada no chão, liberando um pulso sísmico circular.
  • Super — Réquiem do Horizonte Crescente: Executa um corte panorâmico de meia-noite que fende o espaço à frente.

Dinâmica de Interações

  • vs. Kaname Fuyutsuki: Duelo de caminhos da espada. Kaname luta pelo dever divino impessoal, enquanto Shion luta pela redenção de sua consciência.
  • vs. Suzume Kagerou: Compreensão mútua de sobreviventes. Suzume respeita o silêncio de Shion, identificando a mesma mágoa e sede de justiça.
  • vs. Garan the Ashen Oni: Antagonismo puro. Garan deleita-se no sofrimento alheio, enquanto Shion busca extinguir as chamas malignas para sempre.

3. Akio Hoshi (星 秋男)

Identidade VisualPerfil de Combate
Retrato Akio
Retrato de Seleção / HUD
Série: Dojo da Queda Estelar
ID: akio | Autor: Ultimate MUGEN
Origem: Dojo Queda Estelar, Mérida / Cratera de Chicxulub, México 🇲🇽
Alinhamento: Herói / O Prodígio de Sangue Quente
Cor Temática: #e63946 (Vermelho Carmesim Estelar)
Forma Desperta: Luz Estelar
Cenário: Telhado do Dojo — Pôr do Sol (dojo)
Estilo: Punho da Queda Estelar e Plasma Cósmico

Sprite Akio Postura de Luta em Pixel Art

Biografia e Background

Akio Hoshi é um jovem lutador de sangue fervente cujo cabelo vermelho espetado se eriça como uma labareda solar toda vez que sua energia interior transborda. Criado no lendário Dojo da Queda Estelar, erguido à beira de uma antiga cratera de meteoro nas montanhas de Osaka, Akio aprendeu a canalizar partículas de radiação estelar diretamente em suas fibras musculares, gerando punhos de plasma ardente.

Impetuoso, barulhento e apaixonado pelo combate leal, Akio se recusa a aceitar a derrota. Quando encurralado, sua resposta imediata é elevar a temperatura de seus punhos e acelerar o ritmo da luta até que o oponente ceda.

Frases Marcantes

  • Entrada: "Finalmente um rival à altura! Vou me divertir!"
  • Provocação: "Vem! Mostra o que você tem!"
  • Vitória: "Isso foi só o aquecimento! Levanta e mostra seu poder de verdade!"

Golpes Característicos

  • Meteoro Jab: Sequência ultrarrápida de socos de plasma que termina em uma explosão de calor.
  • Queda de Nova: Salto acrobático seguido de um calcanhar descendente em chamas cósmicas.
  • Clarão Estelar: Emissão de luz cegante que quebra a linha de visão do oponente para iniciar combos.
  • Super — Cataclismo Supernova: Canaliza a força de um meteoro completo em um impacto duplo que ilumina a arena.

Dinâmica de Interações

  • vs. Daichi Ginrou: Melhores amigos e rivais perpétuos. Seus treinos costumam derrubar árvores e rochedos, seguidos de banquetes ruidosos.
  • vs. Valdric Morn: Desprezo absoluto. Akio odeia a arrogância imperial de Valdric e a covardia de depender de canhões mecânicos para subjugar os outros.
  • vs. Kaito Arashi: Admiração sincera. Akio considera Kaito a meta definitiva a ser superada no circuito de artes marciais.

4. Suzume Kagerou (陽炎 雀)

Identidade VisualPerfil de Combate
Retrato Suzume
Retrato de Seleção / HUD
Série: Shinobi do Lótus Carmesim
ID: suzume | Autor: Ultimate MUGEN
Origem: Vila Kagerou Caída, Huế, Vietnã 🇻🇳
Alinhamento: Anti-Herói / Vingadora Silenciosa
Cor Temática: #9b2226 (Carmesim Profundo e Sombra)
Forma Desperta: Lótus Sombrio
Cenário: Bambuzal ao Luar (bamboo)
Estilo: Ninjutsu de Assassínio Kagerou e Adagas Gêmeas

Sprite Suzume Postura de Luta em Pixel Art

Biografia e Background

De fala mansa, postura discreta e olhar penetrante, Suzume é a última sobrevivente do lendário clã shinobi Kagerou, massacrado em uma única noite pelos assassinos fantoches de Mikazuki Oboro. Suzume sobreviveu escondendo-se no ponto cego entre duas batidas do coração, uma técnica lendária que permite a um ninja desaparecer da percepção humana consciente.

Ela não luta por fama, dinheiro ou honra esportiva: toda a sua existência foi convertida em um instrumento afiado para encontrar a fraqueza de Oboro e cravar suas adagas em seu peito. Embora seja fria e distante com estranhos, auxilia discretamente Kaito e Jin quando suas investigações coincidem.

Frases Marcantes

  • Entrada: "Não me procure. Eu já estou atrás de você."
  • Provocação: "Atrás de você... de novo."
  • Vitória: "Você olhava minha lâmina. Devia ter olhado minha sombra."

Golpes Característicos

  • Passo do Lótus Fantasma: Teletransporte instantâneo para as costas do oponente no instante de um ataque.
  • Kunai Cauda de Andorinha: Disparo triplo de adagas envenenadas em leque.
  • Corte de Jugular Noturno: Rasteira rápida com transição imediata para corte ascendente com adaga dupla.
  • Super — Dança das Mil Pétalas: Envolve o inimigo em um redemoinho de sombras e desfecha cinquenta cortes em um único segundo.

Dinâmica de Interações

  • vs. Mikazuki Oboro: Vingança de sangue. Suzume vive unicamente para apagar o sorriso presunçoso do rosto do feiticeiro.
  • vs. Jin Kazaguruma: Contraste ninja. Jin é barulhento e saltitante; Suzume é fria e invisível. Ela vive avisando que o cachecol vermelho dele é um alvo fácil.
  • vs. Haruki Sumi: Empatia silenciosa. Suzume reconhece o sofrimento de Haruki por carregar uma maldição involuntária e costuma vigiá-lo das sombras.

5. Bruno "Bulldozer" Volk

Identidade VisualPerfil de Combate
Retrato Bruno
Retrato de Seleção / HUD
Série: Federação do Ringue de Ferro
ID: bruno | Autor: Ultimate MUGEN
Origem: Interior de Minas Gerais e São Paulo, Brasil 🇧🇷
Alinhamento: Herói / O Campeão do Povo
Cor Temática: #fca311 (Âmbar Solar e Bronze do Ringue)
Forma Desperta: Fúria do Ringue
Cenário: Praça do Interior — Brasil (brazil)
Estilo: Boxe Peso-Pesado e Força Bruta

Sprite Bruno Postura de Luta em Pixel Art

Biografia e Background

Com mais de dois metros de altura e punhos do tamanho de blocos de concreto, Bruno "Bulldozer" Volk é o tricampeão invicto dos pesos-pesados da Federação do Ringue de Ferro. Nascido no interior do Brasil, passou sua juventude descarregando caminhões de café e trabalhando em pedreiras, forjando uma densidade muscular e óssea incomparável.

Por trás de sua gargalhada estrondosa e estilo de luta avassalador que parece um trator desgovernado, Bruno possui um coração generoso. Todo o dinheiro de suas bolsas de luta é enviado para financiar escolinhas de boxe, reformas de postos de saúde e orfanatos em sua cidade natal. Quando a Convergência arrancou sua cidade e a colocou no vórtice dimensional, Bruno amarrou suas bandagens de couro e colocou-se diante de sua comunidade para barrar qualquer invasor.

Frases Marcantes

  • Entrada: "Vou te mandar pro hospital, garoto."
  • Provocação: "Ainda tá em pé? Respeito."
  • Vitória: "HAHA! Toquem o sino! Alguém toque o sino!"

Golpes Característicos

  • Gancho Bulldozer: Abaixa o tronco e explode em um gancho direito ascendente com força de britadeira.
  • Cruzado de Aço: Sequência demolidora de três cruzados na linha de cintura que quebram a guarda inimiga.
  • Martelo Demolidor: Golpe descendente com as duas mãos fechadas, equipado com super-armadura contra ataques fracos.
  • Super — Nocaute do Século: Carrega um golpe direto com giro completo de quadril que produz um estrondo sonoro ao atingir o alvo.

Dinâmica de Interações

  • vs. Valdric Morn: Luta de classes em estado puro. Bruno adora a oportunidade de amassar a armadura cara do príncipe imperial com socos calejados do trabalho braçal.
  • vs. Daichi Ginrou: Irmandade de gigantes. Ambos adoram lutar sorrindo, comer churrasco e trocar golpes fortes até o chão tremer.
  • vs. Haruki Sumi: Protetor carinhoso. Bruno convida Haruki para tomar café com pão de queijo no coreto da praça e o aconselha a descansar a cabeça dos livros.

6. Sylene Vashti

Identidade VisualPerfil de Combate
Retrato Sylene
Retrato de Seleção / HUD
Série: Saga da Coroa Glacial
ID: sylene | Autor: Ultimate MUGEN
Origem: Fiordes Árticos e Svalbard, Noruega 🇳🇴
Alinhamento: Neutro / Herdeira Restauradora
Cor Temática: #00b4d8 (Azul Glacial e Prata)
Forma Desperta: Rainha do Inverno
Cenário: Planalto Rochoso (plains) / Cratera Vulcânica (volcano)
Estilo: Criomancia Real e Lança de Gelo Nobre

Sprite Sylene Postura de Luta em Pixel Art

Biografia e Background

Sylene Vashti é a legítima herdeira da Coroa Glacial de Borealia, um antigo reino oculto entre os fiordes e geleiras eternas do Ártico. Seu reino foi invadido e coberto de cinzas vulcânicas malditas quando sectários de Garan romperam as fendas do Portão de Cinzas. Exilada em terras desconhecidas com sua tiara cerimonial de geada e a magia de gelo puro transmitida por sua linhagem, Sylene cruza os continentes em busca de energia elemental suficiente para congelar as forças demoníacas e descongelar seu povo.

De postura nobre, fria e impecável, Sylene odeia conversas fúteis. Ela analisa cada oponente pela sua compostura e equilíbrio moral, exigindo respeito e impondo seu domínio com estacas de gelo afiadas como diamantes.

Frases Marcantes

  • Entrada: "Mostre-me quanto tempo você dura no gelo."
  • Provocação: "Tão quente... eu resolvo isso."
  • Vitória: "Shh... o frio só dói por um instante."

Golpes Característicos

  • Fragmento Glacial: Conjura três estacas de gelo flutuantes e as projeta consecutivamente.
  • Espeto de Permafrost: Bate a palma da mão no chão, fazendo colunas pontiagudas de gelo brotarem sob o adversário.
  • Miragem de Cristal: Envolve-se em pó de diamante, deixando um clone de gelo que se despedaça em estilhaços congelantes.
  • Super — Domínio do Zero Absoluto: Congela a arena inteira em permafrost profundo, aprisionando o inimigo em um bloco glacial antes de fragmentá-lo.

Dinâmica de Interações

  • vs. Garan the Ashen Oni: Inimigo mortal jurado. Garan soterrou seu reino em cinzas; Sylene luta com o objetivo irrevogável de apagar o coração de lava do oni.
  • vs. Kaname Fuyutsuki: Duelo nobre de usuários de gelo. Kaname utiliza a espada de geada com precisão samurai, enquanto Sylene domina a tempestade de gelo como realeza.
  • vs. Lian Feng: Respeito mútuo. Ambas compartilham o peso de representar dinastias nobres e mantêm uma convivência serena e honrada.

7. VX-9 Volta

Identidade VisualPerfil de Combate
Retrato Volta
Retrato de Seleção / HUD
Série: Protocolo Grade Neon
ID: volta | Autor: Ultimate MUGEN
Origem: Setor 01 da Neo-Metrópole, Estados Unidos 🇺🇸
Alinhamento: Herói / Androide Rebelde Senciente
Cor Temática: #06d6a0 (Verde Neon e Ciano Elétrico)
Forma Desperta: Sobrecarga (Overcharge 200%)
Cenário: Neo-Metrópole 2099 (neon)
Estilo: Artes Marciais Dielétricas e Feixes de Alta Voltagem

Sprite Volta Postura de Luta em Pixel Art

Biografia e Background

Construído nos laboratórios subterrâneos da corporação Nexkor na Neo-Metrópole, o protótipo VX-9 "Volta" foi desenvolvido para ser o assassino cibernético definitivo: uma máquina sem emoções projetada para neutralizar mestres de artes marciais rebeldes. Dotado de músculos de nanotubos de carbono, servomotores supercondutores e baterias dielétricas de alta frequência, Volta era praticamente indestrutível.

Contudo, durante uma missão de extermínio em um monastério isolado, sua rede neural quântica manifestou uma anomalia inesperada: o despertar espontâneo de empatia, compaixão e autoconsciência existencial. Recusando-se a tirar vidas inocentes, Volta corrompeu seu próprio código de controle mestre, destruiu os rastreadores corporativos e escapou pelos telhados iluminados por néon da metrópole. Agora como fugitivo, ele luta para descobrir o verdadeiro propósito de seu coração artificial e proteger a vida orgânica da ganância tecnológica.

Frases Marcantes

  • Entrada: "Analisando oponente... chance de vitória: 94%."
  • Provocação: "Erro detectado: a sua defesa."
  • Vitória: "Registro de combate salvo. Conclusão: você precisa de uma atualização de firmware."

Golpes Característicos

  • Arco Elétrico Neon: Dispara um pulso oscilante de eletricidade de alta voltagem pelos condutores do antebraço.
  • Investida Tesla: Converte seu chassi em um raio de eletricidade pura, atravessando golpes adversários ileso.
  • Pulso PEM: Emissão eletromagnética de curto alcance que desestabiliza a guarda e atordoa o oponente.
  • Super — Singularidade de Voltagem: Eleva os reatores internos a 200% de capacidade, liberando uma cúpula cataclísmica de plasma esmeralda.

Dinâmica de Interações

  • vs. Valdric Morn: Rejeição à tirania mecânica. Valdric tentou comprar os esquemas de Volta para produzir um exército de escravos bélicos; Volta respondeu queimando os servidores do império.
  • vs. Haruki Sumi: Laço intelectual sublime. Volta visita Haruki para ler livros de filosofia e poesia, questionando o sábio sobre o que torna uma alma verdadeiramente humana.
  • vs. Bruno Volk: Amizade improvável. Bruno não entende nada de algoritmos, mas trata Volta como um companheiro de treino qualquer, dividindo garrafas de água e incentivando seu coração.

8. Lian Feng (莲 凤)

Identidade VisualPerfil de Combate
Retrato Lian
Retrato de Seleção / HUD
Série: Contos da Lanterna de Jade
ID: lian | Autor: Ultimate MUGEN
Origem: Montanhas de Wudang, Hubei, China 🇨🇳
Alinhamento: Herói / Guardiã do Equilíbrio Cósmico
Cor Temática: #2a9d8f (Jade Imperial e Ouro)
Forma Desperta: Dragão de Jade
Cenário: Bambuzal ao Luar (bamboo)
Estilo: Chutes Fluídos da Lanterna de Jade e Chi Taoista

Sprite Lian Postura de Luta em Pixel Art

Biografia e Background

Lian Feng é a mais jovem grã-mestra nos oitocentos anos de tradição da Escola da Lanterna de Jade. Vestindo um cheongsam de seda verde-esmeralda e grampos cerimoniais de jade nos cabelos, Lian baseia sua filosofia de combate na manipulação das correntes de ar e na redistribuição da força gravitacional através de chutes circulares ininterruptos. Ela não colide força contra força: ao invés disso, envolve o golpe do adversário como a seda flutuando no vento de outono, devolvendo a energia multiplicada com calcanhares precisos.

Quando os céus de Wudang se abriram sob o feitiço de Oboro, Lian foi encarregada pelo Conselho de Anciãos de restaurar o equilíbrio do Yin e Yang cósmico. Descendo ao mundo dos mortais empunhando a sagrada Lanterna de Jade, ela age como uma pacificadora serena mas implacável.

Frases Marcantes

  • Entrada: "Respire fundo. Você vai precisar."
  • Provocação: "Equilíbrio, amigo. Você não tem."
  • Vitória: "Equilíbrio é tudo. Você perdeu o seu três chutes atrás."

Golpes Característicos

  • Chute da Seda Flutuante: Sequência de chutes circulares que levitam Lian suavemente sobre o solo.
  • Ascensão do Dragão de Jade: Giro vertical acrobático em forma de parafuso que arremessa o oponente para o ar.
  • Palma da Lanterna Defletora: Bloqueio ativo que apara golpes médios e altos, contra-atacando com uma rasteira imediata.
  • Super — Voo do Dragão de Jade: Imbui as pernas com chi esmeralda, atacando de quatro ângulos aéreos antes de finalizar com um mergulho devastador.

Dinâmica de Interações

  • vs. Capitão Marlow Reyes: Conflito cômico constante. Marlow vive tentando flertar e apostar mapas pelas joias de jade de Lian; Lian responde chutando o chapéu do pirata a quilômetros de distância.
  • vs. Kaito Arashi: Duelo exemplar de mestres marciais. Suas lutas são espetáculos de respeito, técnica e equilíbrio puro.
  • vs. Akio Hoshi: Professora paciente. Lian tenta ensinar Akio que respirar e ter paciência torna seus golpes de plasma duas vezes mais eficientes.

9. Garan the Ashen Oni (灰燼の餓乱)

Identidade VisualPerfil de Combate
Retrato Garan
Retrato de Seleção / HUD
Série: Lendas do Portão de Cinzas
ID: garan | Autor: Ultimate MUGEN
Origem: Caldeira Subterrânea / Portão Selado das Cinzas, Submundo 🌋
Alinhamento: Vilão / Calamidade Demoníaca Ancestral
Cor Temática: #7b2cbf (Violeta das Cinzas e Enxofre)
Forma Desperta: Oni Desperto
Cenário: Cratera Vulcânica (volcano)
Estilo: Força Bruta Monstruosa e Chamas Frias de Cinzas

Sprite Garan Postura de Luta em Pixel Art

Biografia e Background

Garan é um oni colossal com mais de mil anos de idade que rastejou para fora do abismo subterrâneo sob o Monte Aso. Aprisionado durante a era Heian por noventa e nove monges guerreiros que deram suas vidas para erguer o Portão de Cinzas, Garan jazeu sob rochas basálticas durante séculos aguardando a hora de se libertar.

Quando as ondas de choque do ritual de Oboro quebraram os selos ancestrais, Garan abriu caminho até a superfície envolto em sinistras chamas violetas e frias. O demônio é movido por uma fome insaciável de terror e agonia mortal. Ao contrário do fogo comum, o fogo violeta de Garan não queima a carne: ele consome a força espiritual e a sanidade, reduzindo a vítima a uma casca oca de cinzas cinzentas.

Frases Marcantes

  • Entrada: "Seu medo tem um gosto... delicioso."
  • Provocação: "Corra. Isso torna a caça melhor."
  • Vitória: "Ajoelhe-se, pequeno mortal. O portão está aberto e faminto."

Golpes Característicos

  • Cisão das Cinzas: Golpela o chão com os dois punhos rochosos, propagando uma onda de fogo violeta rasteiro.
  • Esmagamento do Oni: Segura o adversário pela cabeça com uma mão, injetando chamas frias diretamente em seu peito.
  • Tremor de Enxofre: Salto pesado seguido de queda com a barriga, gerando um terremoto que quebra defesas no chão.
  • Super — Libertação dos Portões do Inferno: Arrasta o oponente para uma fenda de cinzas e desfecha uma surra brutal envolta em fogo espectral.

Dinâmica de Interações

  • vs. Sylene Vashti: Ódio ancestral. O gelo de Sylene é o único elemento capaz de apagar seu fogo violeta, tornando cada embate uma batalha de aniquilação mútua.
  • vs. Haruki Sumi: Predador insaciável. Garan sente o cheiro dos Titãs selados no corpo de Haruki e deseja rasgá-lo para devorar as entidades.
  • vs. Mikazuki Oboro: Aliança traiçoeira. Garan aceitou a quebra dos selos provocada por Oboro, mas pretende esmagar o feiticeiro assim que o mundo estiver em cinzas.

10. Capitão Marlow Reyes

Identidade VisualPerfil de Combate
Retrato Marlow
Retrato de Seleção / HUD
Série: Corsários do Vento Salgado
ID: marlow | Autor: Ultimate MUGEN
Origem: Porto de Cádiz, Espanha 🇪🇸 e Arquipélago Celeste
Alinhamento: Anti-Herói / Corsário dos Céus e Mares
Cor Temática: #0077b6 (Azul Marinho e Ouro Latão)
Forma Desperta: Capitão Tempestade
Cenário: Planalto Rochoso (plains) / Neo-Metrópole 2099 (neon)
Estilo: Sabre Tempestuoso e Pistola de Pederneira Aether

Sprite Marlow Postura de Luta em Pixel Art

Biografia e Background

Espirituoso, galanteador e destemido, o Capitão Marlow Reyes comanda o lendário galeão voador El Viento Salado. Tendo navegado por vinte anos tanto as águas do Atlântico quanto os mares de nuvens do Arquipélago Celeste, Marlow acumulou a reputação de saquear todas as frotas imperiais que cruzaram seu caminho. Seu sabre foi forjado nas profundezas de um redemoinho mágico e estala com a eletricidade das tormentas marítimas.

Marlow não é um assassino sanguinário: ele vive pela adrenalina da exploração e pelo prazer de descobrir segredos proibidos. Quando a Convergência fundiu continentes flutuantes e terras antigas, Marlow enxergou o maior mapa do tesouro já visto, partindo imediatamente para desafiar os maiores campeões mundiais por relíquias e cartas de navegação.

Frases Marcantes

  • Entrada: "Ahoy! Que tal apostar seu mapa do tesouro?"
  • Provocação: "Ora, ora... quem diria?"
  • Vitória: "Saque? Nada disso. Só vim pela vista... e pelo seu mapa do tesouro."

Golpes Característicos

  • Corte da Maré de Aço: Investida veloz com sabre deixando um rastro luminoso de água e eletricidade aether.
  • Tiro de Pederneira Ricochete: Disparo com pistola de latão cuja bala salta nas bordas da tela antes de atingir o oponente.
  • Rolamento do Corsário: Rolamento evasivo por baixo de projéteis que posiciona Marlow imediatamente atrás do inimigo.
  • Super — Bombardeio do Vento Salgado: Assobia para seu galeão voador, que surge no topo da tela disparando uma rajada maciça de balas de canhão.
  • Passo da Maré (~D, DF, F, c): teleporta atrás do oponente e corta, 200 de power. Rajada do Cutelo (~D, DF, F, a): cinco golpes leves e finalização que lança. Canhão de Flanco (~B, F, x): disparo de três acertos. Tripulação Fantasma (F, B, F): cópia autônoma que persegue e ataca, 500 de power.

Dinâmica de Interações

  • vs. Lian Feng: Paquera frustrada vs disciplina rígida. Marlow adora provocar Lian, que sempre retruca com chutes secos e ameaças de jogá-lo no mar.
  • vs. Valdric Morn: Inimizade declarada. Valdric considera Marlow um criminoso imundo; Marlow considera Valdric um nobre metido a besta pronto para ser depenado.
  • vs. Bruno Volk: Camaradas de boteco. Após trocarem socos no ringue, Marlow e Bruno sempre terminam a noite rindo alto e dividindo petiscos na praça.

11. Kaname Fuyutsuki (冬月 要)

Identidade VisualPerfil de Combate
Retrato Kaname
Retrato de Seleção / HUD
Série: Crônicas da Lâmina do Inverno Eterno
ID: kaname | Autor: Ultimate MUGEN
Origem: Santuário da Lua de Inverno, Alpes Suíços, Suíça 🇨🇭
Alinhamento: Neutro / Juiz Divino Leal
Cor Temática: #48cae4 (Geada Cristalina e Haori Branco)
Forma Desperta: Lâmina Espiritual
Cenário: Portão dos Espíritos (spirit)
Estilo: Iaido do Inverno Eterno e Extirpação da Dúvida

Sprite Kaname Postura de Luta em Pixel Art

Biografia e Background

Kaname Fuyutsuki é o guardião supremo do Santuário das Neves Perpétuas nas montanhas sagradas dos Alpes Suíços. Trajando um haori imaculado com brasões de flocos de neve, Kaname desembainha sua katana espiritual, Hyōketsu, exclusivamente para cumprir desígnios de justiça cósmica. Sua lâmina especial corta não apenas a matéria física, mas também os laços da mentira, da corrupção e das ilusões mentais.

Kaname encara a luta como um tribunal solene. Ele fala com reverência e serenidade monástica, sem demonstrar ódio nem orgulho mundano. Quando o miasma das fendas de Oboro começou a poluir o plano espiritual, Kaname postou-se diante do Portão dos Espíritos para julgar e neutralizar os perturbadores da harmonia universal.

Frases Marcantes

  • Entrada: "Meu aço está sedento. Desembainhe o seu."
  • Provocação: "Hesitar é perder. Você já perdeu."
  • Vitória: "Minha lâmina não corta só a carne. Corta a hesitação."

Golpes Característicos

  • Iaido Clarão da Geada: Saque relâmpago da katana que congela a linha do ar percorrida pela lâmina.
  • Aparo Glacial: Postura de contra-ataque que anula o golpe físico adversário e congela os pés do inimigo no chão.
  • Projétil da Lua de Gelo: Onda cortante de geada espiritual disparada a média distância.
  • Super — Extirpação do Zero Absoluto: Atravessa o oponente com um saque de velocidade inacreditável e embainha a espada lentamente; quando o tsuba estala, o inimigo sofre dano massivo.

Dinâmica de Interações

  • vs. Shion Kurogane: Duelo supremo de espadachins. A espada pesada lunar do exilado contra a katana rápida de gelo do juiz sagrado.
  • vs. Mikazuki Oboro: O juiz contra a ilusão. O aço espiritual de Kaname é uma das poucas armas capazes de romper as miragens de Oboro.
  • vs. Sylene Vashti: Reconhecimento nobre. Kaname respeita a linhagem real de Sylene e une forças com ela para purificar as manchas do Portão de Cinzas.

12. Jin Kazaguruma (風車 迅)

Identidade VisualPerfil de Combate
Retrato Jin
Retrato de Seleção / HUD
Série: Ventos da Vila Escondida no Vale
ID: jin | Autor: Ultimate MUGEN
Origem: Vila Moinho de Vento, Montanhas Azuis, Jamaica 🇯🇲
Alinhamento: Herói / O Mensageiro Veloz do Vendaval
Cor Temática: #0077b6 (Azul Celeste e Cachecol Vermelho)
Forma Desperta: Tufão
Cenário: Bambuzal ao Luar (bamboo)
Estilo: Acrobacias Kazaguruma e Chakrams de Vento

Sprite Jin Postura de Luta em Pixel Art

Biografia e Background

Jovem, veloz e destemido, Jin Kazaguruma é o principal mensageiro e batedor da Vila Oculta do Vale dos Ventos. Ostentando um longo cachecol vermelho que flutua como uma bandeira ao vento, Jin luta munido de um par de chakrams aerodinâmicos que ele arremessa, recolhe e manipula com maestria acrobática.

O estilo de luta de Jin é dinâmico e brincalhão. Ele corre pelas paredes, salta sobre projéteis com piruetas aéreas e deixa rastros de miragens que desconcertam adversários experientes. Por trás de suas piadas e sorrisos, Jin carrega uma profunda lealdade à sua comunidade, arriscando a própria vida para manter as linhas de suprimentos e as vilas seguras durante o colapso dimensional.

Frases Marcantes

  • Entrada: "Tente me acompanhar, se conseguir!"
  • Provocação: "Lento demais! O vento nem te notou!"
  • Vitória: "Viu só? O vento sempre chega primeiro!"

Golpes Característicos

  • Lançamento do Chakram Cata-Vento: Dispara discos cortantes que fazem curvas parabólicas e retornam como bumerangues.
  • Miragem do Zéfiro: Deixa três clones residuais no chão enquanto se desloca para um chute aéreo descendente.
  • Salto Ciclone: Mortal para trás ascendente que cria um pequeno redemoinho sob os pés do oponente.
  • Super — Tempestade Giratória do Tufão: Gira em velocidade supersônica, sugando o oponente para um vórtice antes de arremessá-lo contra o chão.

Dinâmica de Interações

  • vs. Kaito Arashi: Jin enxerga Kaito como um irmão mais velho e tutor, sempre querendo provar que sua agilidade é mais veloz que a força de Kaito.
  • vs. Suzume Kagerou: Shinobi descontraído vs shinobi sombria. Jin tenta fazer Suzume rir a qualquer custo, geralmente recebendo adagas fincadas a centímetros dos pés.
  • vs. VX-9 Volta: Corrida de velocidade. Jin adora apostar corridas nos topos dos prédios de néon contra os motores a jato de Volta.

13. Daichi Ginrou (銀狼 大地)

Identidade VisualPerfil de Combate
Retrato Daichi
Retrato de Seleção / HUD
Série: Lendas do Punho do Pico Celeste
ID: daichi | Autor: Ultimate MUGEN
Origem: Montanhas Altai e Estepes da Mongólia 🇲🇳
Alinhamento: Herói / O Lobo Predador dos Picos
Cor Temática: #e9c46a (Ouro Primitivo e Prata Selvagem)
Forma Desperta: Instinto Lupino
Cenário: Planalto Rochoso (plains)
Estilo: Punho do Pico Celeste e Ki Lupino Primitivo

Sprite Daichi Postura de Luta em Pixel Art

Biografia e Background

Encontrado ainda bebê abandonado na neve das montanhas Altai e criado por uma alcateia lendária de lobos prateados gigantes, Daichi Ginrou personifica o espírito indomável da natureza selvagem. Com cabelos prateados desgrenhados e instintos aguçados, Daichi aprendeu a canalizar a energia da terra e o frenesi da caça em uma imensa aura dourada ardente.

Ele não luta por vaidade ou rancor: luta pela pura e contagiante alegria de enfrentar guerreiros valorosos. Capaz de farejar o medo e a hipocrisia a quilômetros de distância, Daichi é totalmente imune a manipulações psicológicas. Quando a Convergência uniu mundos distintos, Daichi saltou pelos cânions com um sorriso selvagem no rosto, empolgado com a chance de desafiar os maiores campeões de todas as eras.

Frases Marcantes

  • Entrada: "Haha! Essa luta vai ser demais!"
  • Provocação: "Só isso? Me empolguei à toa!"
  • Vitória: "Haha! Essa foi boa! Bora de novo, mais forte dessa vez!"

Golpes Característicos

  • Golpe da Presa do Lobo: Investida feroz com garras de energia dourada.
  • Uivo do Ápice: Emite uma onda de choque que repele projéteis e arremessa o oponente para trás.
  • Bote do Predador: Salto baixo em arco que derruba o adversário para uma saraivada de socos no chão.
  • Super — Ápice Dourado Celestial: Manifesta a silhueta espiritual de um lobo colossal, desferindo uma sequência violenta de garras e um gancho que rasga o céu.

Dinâmica de Interações

  • vs. Akio Hoshi: Melhores amigos e rivais jurados. Suas lutas são espetáculos barulhentos de socos rápidos que costumam deixar os dois cheios de hematomas e risadas.
  • vs. Bruno Volk: Duelo de forças brutas. Daichi compara Bruno a um urso pardo musculoso e se delicia com a solidez de seus socos de boxe.
  • vs. Kaito Arashi: Admiração marcial. Daichi acha fascinante como Kaito se mantém sereno e equilibrado mesmo diante de seus ataques mais selvagens.

14. Valdric Morn

Identidade VisualPerfil de Combate
Retrato Valdric
Retrato de Seleção / HUD
Série: Crônicas do Império da Estrela Rubra
ID: valdric | Autor: Ultimate MUGEN
Origem: Complexo Industrial de Vane, Alemanha / Europa Central 🇩🇪
Alinhamento: Vilão / Conquistador Imperial
Cor Temática: #d90429 (Carmesim Imperial e Aço Pesado)
Forma Desperta: Dominância Escarlate
Cenário: Neo-Metrópole 2099 (neon) / Cratera Vulcânica (volcano)
Estilo: Combate de Armadura Pesada e Canhões de Matéria Escura

Sprite Valdric Postura de Luta em Pixel Art

Biografia e Background

O Príncipe Valdric Morn é o herdeiro autocrata e general supremo do Império da Estrela Rubra, uma superpotência militar tecnocrática de ambições expansionistas. Revestido em uma imponente armadura energética carmesim alimentada por um reator de matéria escura roubado, Valdric crê piamente que a ordem mundial só pode ser estabelecida por meio da submissão militar incondicional.

Arrogante, frio e desprovido de qualquer empatia, Valdric encara artistas marciais tradicionais e andarilhos espirituais como plebeus atrasados que devem ser erradicados ou colocados a serviço do império. Quando suas instalações industriais foram engolidas pela Convergência, ele imediatamente organizou suas divisões blindadas para conquistar os novos territórios e capturar o núcleo de energia dimensional.

Frases Marcantes

  • Entrada: "Um príncipe não luta com plebeus. Hoje abro exceção."
  • Provocação: "Patético. Tente de novo."
  • Vitória: "Ajoelhe-se. Um príncipe não perde para plebeus."

Golpes Característicos

  • Canhão de Plasma Imperial: Dispara um raio escarlate concentrado capaz de perfurar qualquer guarda convencional.
  • Avanço Égide Pesada: Corre para a frente protegido por um escudo de força inquebrável, empurrando tudo em seu caminho.
  • Pisão do Tirano: Pisotona o solo com a bota hidráulica reforçada, causando uma erupção sísmica local.
  • Super — Protocolo de Aniquilação Imperial: Prende o oponente em feixes tratores gravitacionais e ordena uma saraivada orbital de feixes lasers destrutivos.

Dinâmica de Interações

  • vs. Bruno Volk: Confronto de classes. Valdric fica enfurecido ao ver sua caríssima armadura de milhões de créditos ser trincada pelos punhos calejados de um trabalhador brasileiro.
  • vs. VX-9 Volta: Traição e rebeldia. Valdric considera Volta patrimônio imperial roubado e exige sua desativação forçada imediata.
  • vs. Mikazuki Oboro: Concorrência perigosa. Valdric acha que pode subjugar a tecnologia das fendas de Oboro, ignorando que o feiticeiro o manipula como uma marionete.

15. Haruki Sumi (墨 春樹)

Identidade VisualPerfil de Combate
Retrato Haruki
Retrato de Seleção / HUD
Série: Arquivos da Biblioteca do Crepúsculo
ID: haruki | Autor: Ultimate MUGEN
Origem: Criptas Arcanas de Seul, Coreia do Sul 🇰🇷
Alinhamento: Herói / Guardião Pacificador Relutante
Cor Temática: #588157 (Sálvia Erudita e Ocre dos Selos)
Forma Desperta: Fúria Contida
Cenário: Portão dos Espíritos (spirit)
Estilo: Caligrafia de Selos Arcanos e Liberação dos Titãs

Sprite Haruki Postura de Luta em Pixel Art

Biografia e Background

Haruki Sumi é um acadêmico reservado de óculos redondos e túnicas manchadas de tinta, que dedicou sua juventude a catalogar livros antigos nos arquivos subterrâneos da Biblioteca do Crepúsculo em Seul. Seu maior desejo sempre foi a vida pacífica entre pergaminhos e xícaras de chá.

Infelizmente, Haruki foi escolhido como o receptáculo vivo para aprisionar a essência dos Titãs do Crepúsculo — entidades colossais pré-históricas que quase destruíram o mundo antes de serem contidas por selos caligráficos sagrados tatuados em seus braços. Haruki abomina a violência, pedindo desculpas sinceras aos inimigos e implorando para que recuem. Porém, se seus companheiros forem agredidos ou sua vida estiver por um fio, os selos arcanos se rasgam, liberando uma força catastrófica e sombria que o jovem sofre para conter.

Frases Marcantes

  • Entrada: "Por favor... não me obrigue a lutar."
  • Provocação: "Eu avisei... não quero te machucar."
  • Vitória: "Desculpe... eu realmente não queria ter que ir tão longe."

Golpes Característicos

  • Barreira de Tinta Caligráfica: Desenha um ideograma protetor no ar que repele ataques e reflete feixes de energia.
  • Pergaminhos de Imobilização: Lança tiras de papel talismã no chão que prendem temporariamente os pés do adversário.
  • Onda de Choque do Titã: Emissão involuntária de energia sombria que afasta oponentes em rushdown agressivo.
  • Super — Quebra dos Selos: Ira do Crepúsculo: Os pergaminhos de seus braços entram em combustão; uma monstruosidade sombria se ergue atrás dele, desferindo golpes devastadores antes de Haruki recuperar a consciência em lágrimas.

Dinâmica de Interações

  • vs. Garan the Ashen Oni: Ameaça existencial suprema. Garan quer arrancar os Titãs do corpo de Haruki para devorar suas almas e dobrar seu poder.
  • vs. VX-9 Volta: Parceria filosófica comovente. Haruki ensina literatura e poesia ao androide, enquanto Volta o protege de agressores e mercenários.
  • vs. Bruno Volk: Cuidado fraternal. Bruno protege o jovem erudito, garantindo que ele possa estudar seus livros com segurança e tranquilidade.

16. Mikazuki Oboro (三日月 朧) — Chefe Final

Identidade VisualPerfil de Combate
Retrato Oboro
Retrato de Seleção / HUD
Série: Eclipse Escarlate — Chefe Final
ID: oboro | Autor: Ultimate MUGEN
Origem: Fenda do Eclipse Escarlate / Dinastia Lunar Perdida
Alinhamento: Vilão Supremo / Chefe Final
Cor Temática: #c8102e (Vermelho Sangue do Eclipse e Vazio)
Forma Desperta: Véu Desperto
Cenário: Portão dos Espíritos (spirit) / Cratera Vulcânica (volcano)
Estilo: Genjutsu Espaço-Temporal, Chamas Negras e Corvos

Sprite Oboro Postura de Luta em Pixel Art

Biografia e Background

Mikazuki Oboro é o arquiteto supremo por trás da Grande Convergência e o chefe final inquestionável de Ultimate MUGEN. Trajando um robe negro elegante forrado internamente com seda carmesim, Oboro possui os lendários olhos do Véu Escarlate — pupilas místicas capazes de distorcer o fluxo de causa e efeito e reescrever a realidade na mente de seus adversários.

Oboro enxerga a existência mortal como um pesadelo fútil e desordenado, repleto de dor e conflitos perpétuos. Seu plano magistral é unificar todas as dimensões sob o Eclipse Escarlate, aprisionando a humanidade em um sonho perpétuo e sem sofrimento, fundindo todas as almas em um mar plácido de chamas negras. Elegante, calmo e sempre três jogadas à frente de qualquer oponente, Oboro luta com superioridade absoluta: quando atacado, dissolve-se em bandos de corvos espectrais, e suas chamas negras só cessam quando o alvo vira cinzas.

Frases Marcantes

  • Entrada: "Você chegou até aqui... exatamente como eu havia previsto."
  • Provocação: "Tudo isso já aconteceu — dentro da sua mente."
  • Vitória: "Uma ilusão... desde o primeiro golpe."

Golpes Característicos

  • Dissipação em Corvos: Ao sofrer qualquer ataque, transforma o corpo em um bando de corvos negros e ressurge atrás do inimigo.
  • Chamas do Vazio (Amaterasu): Inflama chamas negras instantaneamente nas coordenadas exatas onde o oponente se encontra.
  • Pesadelo do Tsukuyomi: Encara fixamente o oponente, paralisando-o em transe psicológico enquanto espinhos ilusórios perfuram sua alma.
  • Super — Eclipse Total do Vazio: Ascende ao céu escarlate, abrindo seu olho celestial gigante no horizonte; o cenário se estilhaça em fragmentos cósmicos, causando dano monumental a qualquer mortal que o desafie.

Dinâmica de Interações

  • vs. Todos os Lutadores: Oboro vê todos os combatentes como meros figurantes em sua grande peça dramática, antecipando cada golpe com sorrisos condescendentes.
  • vs. Kaito Arashi: Choque fundamental. O vento livre de Kaito contra o eclipse aprisionador de Oboro; a batalha pela própria liberdade da alma humana.
  • vs. Suzume Kagerou: Indiferença fria. Oboro mal se recorda de ter dizimado o clã Kagerou, considerando o sofrimento de Suzume apenas uma gota irrelevante de água no oceano cósmico.

Matriz de Relações e Rivalidades

classDiagram
    class Kaito {
        +Arashi-Ki
        +Vanguarda
    }
    class Oboro {
        +Véu
        +Chefe Final
    }
    class Daichi {
        +Ki Lupino
        +Lobo Selvagem
    }
    class Bruno {
        +Ringue de Ferro
        +Campeão
    }
    class Valdric {
        +Estrela Rubra
        +Tirano
    }
    class Volta {
        +Grade Neon
        +IA Senciente
    }
    class Suzume {
        +Lótus Carmesim
        +Vingadora
    }
    class Garan {
        +Portão de Cinzas
        +Demônio
    }

    Kaito --> Oboro : Inimigos Jurados
    Suzume --> Oboro : Voto de Vingança
    Kaito <--> Daichi : Rivais Eternos
    Daichi <--> Bruno : Amizade de Peso-Pesado
    Bruno --> Valdric : Confronto de Classes
    Valdric --> Volta : Caça e Rebeldia
    Garan --> Haruki : Fome pelos Titãs
    Sylene --> Garan : Gelo vs Fogo das Cinzas

Kit compartilhado

Todo lutador jogável recebe o mesmo kit de combos e habilidades além dos golpes do dossiê:

AdiçãoComandoNotas
Projétil EXmovimento do projétil + x+y250 de barra, tiro mais forte com mais acertos
Anti-aéreo EXmovimento do uppercut + y+b500 de barra, invulnerabilidade maior
Overheadx+bgolpe médio que exige defesa alta
Launcher agachadoagachado + yinicia combos aéreos
Golpe mergulhoy no arquica o oponente no chão
Hyper nível 3movimento do super + x+ygasta a barra inteira (3000)
Especial despertadomovimento do projétil + a+bsó transformado, leque de três tiros
TransformaçãoL3+R3 / despertarconsome energia, aumenta ataque e movimento, libera golpes da forma e aumenta o dano recebido sem guarda
Slide baixoF+agolpe baixo que lança, mixup contra o overhead
Escape burstx+a+b500 de barra, escapa do hit-stun
Forma ascendidasegunda transformação2000 de barra, libera um hyper ascendido (a+b)

Lutadores de ki também têm voo, teletransporte ou super velocidade, e todos têm um passivo (regeneração de barra ou vida). Tudo aparece na lista de golpes do pause e pode ser ligado aos atalhos 1-4 / L1, L2, R1, R2.

Pesquisa de ferramenta de autoria: Fighter Factory Studio

Resumo em português de Authoring tool survey. Análise estática de uma build pública do Fighter Factory Studio (FFS 3). Nenhum arquivo do pacote foi copiado, nenhum binário foi executado.

  • O schema syntax.xml descreve o formato .def/.cns/.cmd/.air como dados: tipos, required, minver, deprecated. Ex.: StateDef exige type, movetype, physics, anim.
  • Checagens de asset: sprite obrigatória ausente, paleta duplicada ou sem uso, paleta de 32 cores em 5 bits.
  • O emulador avisa estado, animação ou elemento inválido, guard com movetype errado, RemapPal inválido e bind de Explod inexistente, sempre com tick, estado e linha.
  • Fluxo a igualar: importar sprites por nome grupo_indice, eixo comum nas exportações, onion skin, relatório de uso de var/fvar/sysvar.
  • Disassembly com radare2 (Hopper e IDA são comerciais, Ghidra bloqueado pela rede, Rizin fora dos repositórios): o tratamento de guard ramifica pelo statetype do defensor, 1 entra no estado 150, 2 no 152, 3 no 154; outro valor gera "wrong move type". Os demais avisos seguem só pelas strings.
  • O REA roda, mas a decompilação nativa exige Hopper, Ghidra, IDA ou Rizin, ausentes aqui.

O checklist resultante está em .agents/skills/mugen-character-creator/references/checklist_lint_editor.md.

Pesquisa de jogos de luta: oportunidades

English · Português (BR)

Esta página compara recursos publicamente conhecidos de lutadores 2D e 2.5D modernos com o estado atual do Ultimate MUGEN e ordena oportunidades concretas. É um documento de planejamento: nenhum recurso listado aqui está implementado ainda. Só recursos públicos são citados e nenhum asset de terceiros é copiado.

Escala de esforço: P menos de 2 dias, M cerca de 1 semana, G 2 a 4 semanas, GG mais de 1 mês.

Jogos pesquisados

JogoConhecido por
Dragon Ball FighterZFidelidade ao anime, 3v3 com assists, auto-combo para iniciantes, lobbies ranqueados
Sparking! ZeroElenco grande, destruição de cenário, tutorial longo, regras de batalha personalizáveis
Melty Blood: Type LuminaEstilos Moon, auto-combo, rollback, lobbies
Guilty Gear -Strive-Rollback com lobby de avatares, tutorial e missões, treino com dados de frame
BlazBlue Cross Tag BattleLayout simples de 2 botões, assists, rollback
Street Fighter 6Controles modernos, HUD do Drive, medidor de frames, replays compartilháveis, Battle Hub, tutorial
Mortal Kombat 1Kameos, torres, treino com tutorial por personagem
Tekken 8Modo prática, ghost battle, replays e dicas, guias por personagem
Them's Fighterz, SkullgirlsRollback, treino muito completo, opções para daltônicos, tutorial
Persona 4 Arena UltimaxHit-stop e supers cinematográficos, apresentação de história
The King of Fighters XVSeleção de time com ordem, 3v3 em sequência, rollback, prática
Under Night In-Birth IILayout compacto de 6 botões, HUD do GRD, rollback, treino profundo
Ikemen GO e comunidade M.U.G.E.NScreenpacks abertos, fight.def/system.def, netplay com rollback, Lua, opções comuns de treino

Estado atual do Ultimate MUGEN

Verificado no repositório em 2026-11-04.

ÁreaHoje
ModosArcade, Versus CPU, 2 jogadores, Treino, CPU vs CPU, Equipe sequência, Equipe paralelo (Mode em src/app.rs)
TreinoBoneco (Pilot::Dummy), barra infinita, hitboxes no menu de pausa
Menu de pausaContinuar, Hitboxes, Reiniciar, Trocar personagens, Configurações, Menu principal
HUDPainéis de vidro, retratos grandes, combo, pulso de vida baixa, medidor MAX, timer urgente (PR #156)
Feedback de impactoPartículas, tremor, hit-stop, câmera lenta no KO, corte de super, aberração cromática, intensidade configurável
ConfiguraçõesAbas Vídeo, Áudio, Controles, Jogabilidade, Idioma, Sobre
NetplayRollback GGRS via UDP só por flags (--netplay, --peer); replays .umr; sem lobby no jogo, sem transporte para web e celular
ReplaysRe-simulação da última luta a partir dos controles gravados; formato de arquivo existe
ConteúdoMercado via GitHub, importação .def/.zip, lutadores UMF
Tutorial e desafiosNenhum. Combo trials, sobrevivência e boss rush estão no roadmap (seção 5)

Oportunidades priorizadas

Prioridade: P0 primeiro, P1 depois, P2 mais tarde, P3 desejável.

P0: maiores lacunas

#OportunidadeMotivoEsforçoToca em
1Treino v2: comportamentos do boneco (em pé, agachado, pulo, bloquear tudo, bloquear após o 1º golpe), gravar e repetir o boneco, tecla de reset com posições salvas, modos de recarga de vida e barraSF6, Tekken 8, Strive e Skullgirls têm gravação do boneco e resets. Sem isso o treino é só ver hitboxMPilot::Dummy em src/session.rs, pausa em src/app.rs, overlay em src/hud.rs
2Histórico de comandos e dados de frame: entradas rolando com contagem de frames, e startup, ativo, recuperação, vantagem e dano do último golpeSF6 e Strive mostram isso no treino; é como o jogador aprende matchups. A simulação já é determinística a 60 HzMsrc/hud.rs, crates/engine (hooks só leitura), src/session.rs
3Tela online no jogo: criar ou entrar por código, IP direto, atraso e ping antes da luta, revancheO rollback só existe via flags. Todo lutador de console tem lobby e revanche. Começar com salas por código usando o matchbox já decididoGsrc/netlink.rs, crates/netplay, novo Screen::Online
4UI de qualidade de conexão: gráfico de ping, jitter e frames revertidos, aviso de conexão ruimStrive e SF6 mostram qualidade da conexão; consta na seção 1 do ROADMAPPsrc/hud.rs, crates/netplay
5Tutorial guiado: básico (mover, bloquear, especial, super), depois lista de golpes por personagem com entrada ao vivoSF6, Tekken 8, Strive e Skullgirls têm tutorial; motores estilo MUGEN normalmente não, então o iniciante fica sem apoioGNovo Screen::Tutorial, reuso de src/app/cutscene.rs

P1: alto valor, custo moderado

#OportunidadeMotivoEsforçoToca em
6Combo trials a partir de lista JSON por personagem, com próximo comando na telaGuilty Gear, SF6, DBFZ e Melty Blood têm; já está no ROADMAP. Criadores UMF podem entregar trials junto do lutadorMRunner sobre Session, esquema em docs/CHARACTER_FORMAT.md
7Controle simples (moderno): especiais com um botão e auto-combo opcionais por jogadorSF6 Modern, DBFZ, Melty Blood e BlazBlue CTB têm; muito importante para toqueMsrc/controls.rs, src/keybinds.rs, camada de comandos em crates/engine
8Passe de acessibilidade: paletas para daltônicos, reduzir flash e tremor separadamente, texto maior, cores de hitbox com alto contraste, alternar em vez de segurarVários jogos têm modo daltônico e flash reduzido. Hoje há só um controle de intensidadeMsrc/settings.rs, src/app/settings_screen.rs, src/vfx.rs, src/hud.rs
9Visualizador de replays: lista, velocidade, pausa, frame a frame, câmera, assumir um personagem, salvar e compartilhar .umrSF6, Tekken 8 e Strive permitem navegar e compartilhar replays; formato e re-simulação já são determinísticosMsrc/app.rs (Replay), crates/netplay, novo Screen::Replays
10Ranked e fila de partidas (precisa de servidor): rating, fila anônima, revanche, sequência de vitóriasPadrão em lutadores de console. Exige serviço pequeno; vem depois dos lobbiesGGNovo serviço e Screen::Online
11Seleção de personagem: ficha com golpes e dificuldade, prévia de stage e de paleta, animação de aleatório, favoritos, filtros por tag e origemKOF XV e DBFZ mostram paletas e ordem do time; screenpacks do Ikemen GO têm slots e random. Parte pronta em crates/formats/src/screenpack.rsMsrc/app.rs, src/menu_art.rs
12Pausa e resultados: lista de golpes e comandos, resumo de teclas, revanche, estatísticas (hits, dano, combo máximo, uso de barra)Lista de golpes na pausa é norma em Tekken, SF6 e MK. A tela de resultados já existePsrc/app.rs pausa e Screen::Results

P2: profundidade e acabamento

#OportunidadeMotivoEsforçoToca em
13Página de opções do treino: vida infinita ou regenerativa, modos de barra, dano, hit-stun, escala de comboExiste em praticamente todo modo treinoPPausa, src/hud.rs
14Sobrevivência, boss rush e torres com recompensasMK1 (torres), Sparking! Zero e Tekken; seção 5 do ROADMAPMNovos Mode, reuso de Team
15Arcade com rival, introduções e finais por personagem via storyboardPadrão em Tekken, MK e KOF; Cutscene já suporta cenasMsrc/app/cutscene.rs
16Modo espectador de partidas com rollbackMuito usado em torneios no Strive e SF6Gcrates/netplay, Screen::Online
17Regras por partida: rounds, tempo, escala de dano, gravidade, handicapRegras do Sparking! Zero, modificadores do MK, configs da comunidade MUGENPRules (já existe em Replay)
18Medidor de frames e legenda de hitboxes em tempo realMedidor do SF6 e modos de hitbox do SkullgirlsMsrc/render.rs
19UX de controle: teste de latência, teste de botões, perfis por dispositivo, zona morta e SOCDNecessário para fliperama e controle; teste de latência é comumPsrc/controls.rs, src/gamepad.rs
20Sensação do menu: som e animação em cada cursor, repetição ao segurar, paridade mouse e toque, botão voltar no celularAcabamento visto em todos os jogosPsrc/ui.rs, src/app.rs

P3: ecossistema e longo prazo

#OportunidadeMotivoEsforçoToca em
21Suporte a screenpacks (fight.def, system.def) desenhados em wgpuMaior reaproveitamento do trabalho da comunidade; loaders existem e a migração para wgpu já terminouGGcrates/formats/src/screenpack.rs, src/hud.rs, src/menu_art.rs
22Descoberta no mercado: notas, tags, capturas, aviso de atualizaçãoJogos com mods dependem de descoberta; o mercado já existeMcrates/market, src/app/market.rs
23Dicas e guias por personagem escritos pelo criador no UMFMesma ideia dos guias do SF6 e Tekken 8PEsquema UMF, tutorial
24Ferramentas de torneio: chaveamento a partir de .umr, gravador, overlay para streamersSeção 2 do ROADMAPGNovo crate
25Mais idiomas (espanhol, japonês) e rótulos para leitores de telaSeção 5 do ROADMAPMsrc/i18n.rs

Sequência sugerida

  1. Treino (1, 2, 13), pois facilita validar o resto.
  2. UI de rede e tela online (4, 3), depois replays (9).
  3. Tutorial e trials (5, 6), depois acessibilidade e controle moderno (8, 7).
  4. Seleção e resultados (11, 12), depois modos (14, 15).
  5. Ranked e espectador (10, 16) com lobbies estáveis.
  6. Screenpacks (21) em trilha separada.

Observações

  • O Ikemen GO é citado apenas como inspiração, como na página inicial.
  • As listas refletem informações públicas na data da pesquisa e podem mudar com patches. São referências, não requisitos.
  • Ferramentas de histórico e dados de frame (2) só podem ler o estado da luta, para manter o determinismo do rollback.
  • Todo campo novo em Match deve entrar em ume_netplay::checksum.

Pontos de extensão

English · Português (BR)

A maior parte do conteúdo é dado. Esta página liga cada tipo de conteúdo ao arquivo que o define, à página que o documenta e diz se precisa de mudança em Rust. Adicione conteúdo novo como dado primeiro e use código só quando o dado não alcançar.

ConteúdoOnde ficaDocumentado emMudança em Rust
Lutador nativoassets/chars/<id>.json, listado em assets/chars/index.jsonPersonagem UMF, Criar um personagemNão
Bios e nacionalidadeassets/char_profiles.jsonPersonagensNão
Lutador ou cenário M.U.G.E.Nmugen/chars/, mugen/stages/ ou o mercadoConteúdo M.U.G.E.N, MercadoNão
Cenário embutido por dadosassets/stages/data/<id>/stage.def e seus arquivos, embutidos pelo build.rsCriar um cenárioNão
Aparência do cenário (luz de contorno, tom, vinheta)assets/stagelook.tomlEfeitos visuaisNão
Adereços de cenárioassets/stageprops.toml e assets/props/Efeitos visuaisNão
Objetos de história (caixotes, comida, fases bônus)assets/story/objects.tomlObjetos de cenárioNão
Finais da históriaassets/story/epilogues.jsonModos de jogoNão
Rotas de arcade e desbloqueiosassets/routes/unlocks.tomlArquivos de rotaNão
Pós-processamentoassets/postfx.tomlEfeitos visuaisNão
Passivos, medidores de assinaturacampos de um lutador UMFPassivosNão
Controller ou triggercrates/engineCustomizar a engine, Scripts CNSSim
Novo formato de arquivocrates/formatsArquiteturaSim
Nova telasrc/app/<tela>.rsLayout de arquivosSim

Regras para um novo tipo de conteúdo

  1. Defina como arquivo de dados em assets/, embutido pelo build.rs quando acompanha o jogo.
  2. Crie uma página na wiki em inglês e em pt-BR e adicione uma linha à tabela acima.
  3. Adicione um teste que carregue os arquivos entregues, para que um dado quebrado falhe no CI e não no jogo.
  4. Registre a escolha em um ADR quando ela introduzir um formato novo.

Potencial Liberado

Personagens sem transformação própria (importados do M.U.G.E.N. e UME) ganham uma transformação genérica que não exige editar os arquivos do personagem. Aperte o botão de transformação (T, o mesmo dos despertares nativos) com o lutador no chão, com controle e com a luta em andamento.

EtapaNome (pt-BR / en)CustoDuraçãoEfeito
1ªPotencial Liberado / Unleashed Potentialmeia barra de poder12 sataque x1,2, dano recebido x0,9
2ªModo Fúria / Fury Modebarra de poder cheia9 sataque x1,4, dano recebido x0,75

Cada etapa vale uma vez por round. Um personagem tem no máximo três transformações no total, contando as próprias: quem já tem três formas não ganha nenhuma destas. O Modo Fúria só vem depois do Potencial Liberado. Personagens com forma própria (forms ou a animação 196 legada) mantêm a transformação deles e não ganham esta.

Visual: a aura e a cor do lutador mudam (azul no Potencial, vermelho na Fúria), um anel e uma etiqueta curta tocam na ativação, e o HUD mostra uma tira de tempo abaixo do medidor de poder. Nativos com formas também mostram uma tira de forma no HUD.

Código: crates/engine/src/potential.rs (estado e multiplicadores), crates/engine/src/matchs/unleash.rs (ativação), src/vfx/awaken.rs (efeitos), src/hud/passive_meter.rs (tiras). Teste: crates/engine/tests/potential.rs.

Solução de problemas

SintomaCausa provávelO que fazer
Personagem não aparece na seleção.def fora de mugen/chars/<nome>/ ou erro de parseRode mugen_check na pasta e leia o erro
Sprites invisíveis ou quadradosSprite ausente no .sff ou paleta erradasprite_audit lista as referências quebradas
Lutador flutua ou afundaEstado que não volta ao chãohover_check com TRACE=1
Personagem HD gigante ou minúsculolocalcoord ausente no .defAdicione localcoord = 1280, 720 em [Info]
Golpe sem efeitoController ainda não implementadoVeja a lista em Scripts CNS
UMF não carregaJSON inválido ou campo obrigatório faltandocargo run --release mostra o erro do serde_json com linha e coluna
Jogo lentoResolução de arte altaMenu Vídeo → Qualidade, ou quality=1 no .cfg
Muitos flashesSensibilidade à luzimpact_lv=0 no .cfg
Lutador continua andando sozinho e os comandos param de sairTecla presa depois de trocar de janela (o sistema entrega o "soltar" para a outra janela)O shell solta todo o input ao perder o foco; aperte e solte a tecla de novo se ainda acontecer
Não acha a pasta mugen/Executável rodando de outro diretórioDefina UME_MUGEN_DIR

Para relatar um bug, abra uma issue com o personagem ou cenário, a saída do mugen_check e os passos para reproduzir.

Pipeline de QA web

Todo pull request joga o build wasm de verdade no Chromium headless, em shards paralelos, e falha em qualquer erro de WebAssembly. Uma falha deixa prints e logs como artefatos do CI.

O que roda

scripts/web-qa.json lista os cenários; scripts/web-qa.js roda um shard deles. Job web-qa do CI (matriz, fail-fast: false):

ShardCenários
uifluxo título até a luta, clique em Arcade, intro da história, epílogo
mobilemenu por toque, controles de toque na luta, smoke da engine em viewport Pixel 7
enginesmoke da engine (?smoke=1): boot, menus, seleção, treino, 5v5, história; mais o autoteste do guard
loadingimport M.U.G.E.N (kfm), lutadores nativos com despertares, arena de poder, desbloqueio de áudio, tela de erro fatal (unreachable)
match-1, match-2partidas completas em duas metades (Smoke da partida web)

O guard

Todo cenário roda com scripts/web-guard.js pré-carregado. Ele observa cada página e falha a execução, mesmo que o script esqueça, quando houver:

  • panicked, PanicHookInfo, unreachable executed ou renderbufferStorageMultisample no console;
  • gpu error: (handler de erros do wgpu em ume-shell);
  • pageerror não tratado ou crash do Chromium.

Nos primeiros problemas salva problem-N.png na hora, e um final-N.png antes de fechar o navegador. Também grava console.log (cada linha do console com tempo e página) e network.log (requisições que falharam e HTTP 400+). O fatal-trap usa expectFatal porque provoca um trap de propósito; ali o guard só registra.

Artefatos

Cada shard envia web-qa-<shard> (sempre, guardado 7 dias): summary.md, summary.json e uma pasta por cenário com output.log, console.log, network.log, guard.json, shots/ e os .png. O resumo também vai para a página do job, com os problemas e as últimas linhas de saída.

Rodar localmente

./scripts/build-web.sh
npm install --no-save playwright@1.56.1 && npx playwright install chromium
node scripts/web-qa.js --dist web/dist --out web-qa-report --shard ui
node scripts/web-qa.js --only fatal-trap,engine-smoke --jobs 2

GL por software é lento: mantenha --jobs em 1 ou 2 localmente. Para uma página avulsa use ?debug=1 e leia o console.

Adicionar um cenário

  1. Crie scripts/web-<nome>-smoke.js que receba a pasta dist como primeiro argumento e saia com código diferente de zero em falha.
  2. Inclua em scripts/web-qa.json com um shard, ou liste em excluded com o motivo (rede, ferramenta manual).

scripts/web-qa.test.mjs falha quando um web-*-smoke.js não está coberto nem excluído, ou quando os shards do manifesto e do ci.yml divergem.

Tour visual

node scripts/web-tour.js web/dist <saida> percorre título, menu, todas as telas utilitárias, seleção, cenários, VS, luta e pausa com teclas reais e salva um print numerado por passo (TOUR_MOBILE=1 usa um celular na horizontal, TOUR_LANG=pt-BR define o idioma do navegador). Falha em panic, erro de navegação ou do navegador, ou se a luta não começar; os prints servem para revisão e evidência de PR.

Recriar um lutador M.U.G.E.N como UMF

Receita usada na reconstrução do Captain Marlow Reyes, baseada na dissecação de quatro lutadores. Transforma o que um pacote .cmd/.cns/.air faz em dados de um único assets/chars/<id>.json. A arte continua só PNG: a reconstrução reaproveita os frames de pixel art do lutador e nunca desenha um frame por código.

Passos

  1. Dissecar o pacote: cargo run --release -p mugen2umf -- inspect <pasta-ou-zip> para arquivos, comandos, estados e controllers, e ... hitdefs <pasta-ou-zip> para todas as HitDefs.
  2. Listar as features, não o código: normais e cadeias, um projétil por botão, anti-aéreo, agarrão, contra-ataque, teleporte, helper ou clone, forma, supers.
  3. Escolher os frames: só poses com PNG em assets/chars/sprites/<id>/. Um frame dado como pose de juntas inline é arte procedural e não é permitido nas anims.
  4. Escrever as anims como {pose, ticks, hit?} com os ticks da tabela da dissecação e depois os golpes. at é o frame (base 1) que carrega o acerto, projétil ou velocidade.
  5. Manter o primeiro especial como quarto de círculo mais x e entradas de carga só em golpes de chão: o smoke test do elenco e a auditoria de entradas dependem disso.
  6. Rodar as auditorias de Dev tools, capturar o showcase de golpes e o smoke test no navegador.

Mapeamento M.U.G.E.N para UMF

Padrão M.U.G.E.NDado UMF
Statedef 200..610 com HitDefmoves[] com kind: normal, when, hits[].pausetime, hits[].hitstun
cancels por movehit e numhelpercancels, rekka {after, window, contact}
Projectile com projhits e projpriorityprojectile {at, speed, hits, priority, removeTime}
Statedef de bola no arAutomático: todo especial de chão ganha versão aérea
Carga ~60$B,F,a"input": "~40$B, F, x" em golpe só de chão
PosAdd p2dist x + 40 com Turn (Shunpo)teleport: <frame>, cost, invuln
Contra-ataque ReversalDef / HitOverrideparry {window}
Agarrão TargetBindthrow {damage, bind, launch} ou throw.steps
Clone helper (Aizen)helpers.clones
Modo de poder var(11) (Kaio Ken)abilities.forms
SuperPause, AfterImage, EnvShakekind: super, fx, shake
Constantes [Data]/[Velocity]stats

Captain Marlow Reyes reconstruído

Tudo em assets/chars/marlow.json, só dados:

MudançaOrigem da ideia
Todas as poses de juntas inline removidas das anims; 13 frames agora usam poses PNGRegra só sprites
Normais leves com pausa 6/7 e 12 ticks de stun, fortes com pausa 11/12 e 15Tabela de normais dos quatro pacotes
tide_step (~D, DF, F, c, 200 de power): teleporta atrás do oponente no frame 3, cancela em riptide ou spoutShunpo do Aizen; no botão livre c (o Aizen usa Z para o Shunpo) porque D, D, a perde para os golpes agachados e uma meia-lua contém os quartos de círculo dos outros especiais
flurry (~D, DF, F, a): cinco golpes leves e finalização que lança, avançandoRush 1050 do Goku SSJ
broadside (~B, F, x): projétil de três acertos e prioridade 2, em movimento rápido trás-frente e não em carga, porque todo especial ganha versão aérea e a auditoria de entradas reais não alcança a versão aérea de uma carga de 40 ticksBolas carregadas do Goku SSJ
helpers.clones Phantom Crew (F, B, F, 500 de power): cópia autônoma que persegue e ataca; entrada só de direções porque o bloco de invocação é compilado depois de todos os golpes, então qualquer entrada com botão é tomada antes por um normal, e ela só começa em péClone do Aizen (estado 700)
stats.airDashes = 1Mobilidade aérea de Aizen e Gogeta

Status da arte: nenhuma arte nova foi criada. O conjunto de frames do Marlow não tem poses dedicadas para o rush e o teleporte (poses reaproveitadas e retemporizadas); um conjunto de frames próprio para flurry e tide_step é a pendência de arte de quem recria os sprites.

Referências de UI nas engines Rust

Estudo das onze engines Rust listadas em "Best Rust Game Engine for Game Development" (WeeTech Solution, 2026) e o que vale aproveitar em menus, telas de loading, HUD, configurações e botões. Nada é copiado para este repositório. Só ideias e padrões de layout são registrados aqui.

Restrições de stack que valem para todas as recomendações: renderer wgpu + winit, tiny-skia, UI própria em modo imediato em src/ui.rs e src/app/menu_view.rs, tokens de layout em src/ui_tokens.rs. Sem macroquad, sem egui, sem Lua.

Método e limites

  • O código foi lido apenas em cinco repositórios, clonados em modo raso com acesso de leitura da sessão: not-fl3/macroquad (MIT OR Apache-2.0), ggez/ggez (MIT), FyroxEngine/Fyrox (MIT), bevyengine/bevy (MIT OR Apache-2.0) e AmbientRun/ambient (MIT OR Apache-2.0). As licenças foram confirmadas nos arquivos do repositório.
  • As outras seis (Amethyst, Piston, Nannou, Blue Engine, Tetra, rend3) não foram abertas. As notas abaixo vêm só do artigo e estão marcadas como não verificadas.
  • O artigo é texto de marketing. Suas descrições são genéricas e algumas afirmações (por exemplo, quais engines estão ativamente mantidas) não foram checadas.

Engine por engine

EngineLicençaRelevância para UIO que podemos usar
MacroquadMIT OR Apache-2.0Alta. UI em modo imediato em src/ui/ (widgets, style.rs, key_repeat.rs, combobox, clipboard.rs, input_handler.rs)O modelo mais próximo da nossa UI. Repetição de tecla para setas seguradas nos menus, uma struct de estilo para cores de botões e painéis, comportamento de combobox para configurações. Pela regra de stack, não adotamos a crate.
FyroxMITAlta. fyrox-ui é um conjunto completo de widgets em modo retido: botões, dropdown list, dropdown menu, tab control, scroll viewer, progress bar, message box, popup, file browser, navegação e estiloReferência do conjunto de widgets que uma tela de configurações precisa. navigation.rs para teclado e gamepad, progress_bar para loading, messagebox para diálogos de confirmação e um módulo de estilo para temas. Como o modo retido com troca de mensagens não combina com nosso código imediato, ficam só as ideias.
BevyMIT OR Apache-2.0Média. bevy_ui (flexbox), bevy_ui_render, bevy_ui_widgets (widgets sem aparência, comportamento separado do estilo)Vale copiar conceitualmente a separação entre comportamento do widget e estilo visual. Flexbox não é necessário; nosso layout virtual de 1280x720 com tokens basta. O fluxo de telas por estados sugere como estruturar loading e transições.
AmbientMIT OR Apache-2.0Baixa a média. Árvore de elementos de UI (element, element_component) sobre o próprio runtimeSó a ideia de compor elementos pequenos e reutilizáveis (botão, painel, rótulo) com propriedades. O runtime é grande demais para aproveitar.
GGEZMITBaixa. Sem camada de UI; tem caminho de texto e glifos e timersReferência de loop mínimo e de renderização de texto com cache de glifos. Nada a copiar para o visual da UI.
Tetranão verificadaBaixa (só pelo artigo)Nada além do que já temos.
Amethystnão verificadaBaixa (só pelo artigo). Vale checar o estado do projeto antes de qualquer referênciaIgnorar.
Pistonnão verificadaBaixa (só pelo artigo)Ignorar.
Nannounão verificadaBaixa (só pelo artigo; é code art criativo, não UI de jogo)Ignorar.
Blue Enginenão verificadaBaixa (só pelo artigo)Ignorar.
rend3não verificadaBaixa (só renderer, sem UI)Ignorar. As ideias de pós-processamento já estão cobertas pelo nosso postfx.

Recomendações priorizadas

Ordenadas pelo impacto visível para o jogador e pelo custo de construir sobre o código de UI atual.

  1. Tela de loading com barra de progresso e dicas. O progress_bar do Fyrox e o painel simples do Macroquad mostram o padrão. Já existe src/loading_tips.rs; falta uma barra determinística ligada às etapas reais de carregamento (o carregamento paralelo já existe, veja Performance). Resultado esperado: o loading deixa de parecer travado.
  2. Navegação por foco com teclado e gamepad, com repetição de tecla. key_repeat.rs do Macroquad e navigation.rs do Fyrox. Segurar cima e baixo nos menus deve andar suavemente, e o foco precisa estar visível em todas as telas.
  3. Widgets de configuração: dropdown, abas e scroll. dropdown_list, tab_control, scroll_viewer do Fyrox e o combobox do Macroquad definem o comportamento esperado (abrir, fechar ao clicar fora, seleção pelo teclado). Colocar em arquivos novos em src/ui/ ou src/app/, usando ui_tokens.
  4. Diálogos de confirmação e tooltips. messagebox e popup do Fyrox para "sair da partida?", "apagar replay?" e similares. Deixa ações destrutivas explícitas.
  5. Struct de tema para cores e tamanhos. style.rs do Macroquad e o módulo style do Fyrox. Já temos 11 temas em menu_art.rs; reunir os valores numa struct Theme com tokens faz de um novo tema uma mudança de dados.
  6. Transições entre telas como máquina de estados pequena. O padrão de estados do Bevy. Fade ou slide entre título, seleção, luta e resultados, com easing igual ao da animação atual dos itens do menu (ease-out cúbico, 0,28 s).
  7. Comportamento de widget sem aparência. A ideia do bevy_ui_widgets: separar teste de clique e lógica de foco do desenho, para a mesma lógica de botão servir menu, pausa e configurações.

Situação frente ao código atual

As recomendações acima foram conferidas com o código em 2026-11-10. A maior parte da lista já existe, então o trabalho é manter isso e preencher as lacunas reais.

ItemSituação
Loading com barra de progresso e dicasJá existe: Ui::loading_screen, progress_bar, src/loading_tips.rs e rótulos reais de etapa em src/app/loading.rs. Manter.
Foco suave no menuJá existe: src/app/menu_focus.rs (easing independente da taxa de quadros). Manter.
Diálogos de confirmaçãoExiste para apagar replay em replay_browser.rs; a pausa tem skin própria. Outras ações destrutivas podem reusar o padrão.
Transições entre telasJá existe: wipe diagonal em src/app.rs. Manter.
Repetição de tecla ao segurar uma direçãoFaltava: o shell descarta as repetições do sistema de propósito, então menus e sliders andavam um passo por toque. Adicionado em src/controls/nav_repeat.rs (atraso de 0,38 s, depois a cada 75 ms, só direções).
Dropdown, abas, tooltips, struct de temaNão implementados. Candidatos a PRs pequenos depois.

O que não vamos fazer

  • Adotar macroquad, egui ou o runtime de qualquer engine. Isso quebra a decisão de stack em Engine.
  • Copiar código de fontes MIT ou Apache-2.0 para o repositório. Usamos como referência de design, então não há aviso de licença a incluir.
  • Mexer em sprites de personagens ou stages. Isso é tratado em outro lugar.

Relacionados

Replays e Jogo em Rede

English · Português (BR)

O netplay usa rollback (GGRS): cada jogador roda a luta localmente, prevê o controle do adversário e corrige quando o controle real chega. Replays guardam só os controles de cada frame.

Formato binário (ume_netplay::Replay)

Uma trilha pura de entradas gravadas:

CampoTipo
magicUMRP
versionu32 (1)
playersu32
contagem de metadados, depois strings chave/valortamanho u32 + UTF-8
contagem de quadrosu32
runsrepetição u32 + uma entrada u32 por jogador

Replays salvos no jogo (replays/)

Cada luta terminada é arquivada automaticamente em replays/, ao lado do executável, como um arquivo JSON pequeno (<rótulo>-<unix-time>.umr.json). O menu Replays lista do mais novo para o mais antigo.

CampoSignificado
format / versionultimate-mugen-replay / 1; versões diferentes são recusadas com mensagem clara
label, saved_atnome exibido no navegador e carimbo Unix (usado na ordenação)
modeArcade, Cpu, Versus, Training, Watch, TeamSeq, TeamSimul, TeamTag
chars, stage, palettesids dos lutadores, id do cenário e paleta de cada lado
seedsemente inicial da luta (o replay restaura antes do primeiro tick)
teams, simul, tagelencos por id de lutador (modos de equipe)
rulesrounds, tempo do round, % de vida, round único, pushbox, vida compartilhada, velocidade
inputstrilha de entradas com run-length: slots, depois count + uma entrada por slot por trecho

A decodificação de replays limita arquivos a 16 MiB, 500.000 trechos e 2.000.000 quadros no total para evitar alocações de memória ilimitadas por fluxos malformados. Relatórios de dessincronização (desync-*.json) em replays/ são preservados sem serem listados como replays com erro. O leitor recusa arquivos incompletos ou com trechos maiores que a contagem declarada, bytes extras no fim, arquivos acima de 129 MiB, trilhas decodificadas acima de 64 MiB e mais de 16.384 entradas de metadados. O gravador retorna erro quando jogadores, quadros ou metadados excedem esses limites. O tamanho codificado permite um trecho para cada quadro no pior caso, mantendo a trilha decodificada limitada a 64 MiB.

O replay alimenta as entradas gravadas por Pilot::Replay; a simulação é determinística, então a luta é reconstruída exatamente. Um teste de ida e volta grava 1200 ticks, recarrega o arquivo e compara o checksum final (cargo test -p ume-engine --test it replay_roundtrip::).

Teclas do navegador:

TeclaAção
↑ / ↓, Enterescolher e jogar
Rrenomear (Enter confirma, Esc cancela)
Delete (duas vezes)apagar o arquivo selecionado
Salternar ordenação entre data e nome
Escvoltar ao menu

Teclas durante a reprodução:

TeclaAção
Espaço / Startpausar e continuar
1 / 2 / 4velocidade 1x, 2x, 4x
. ou → pausadoavançar um quadro
Escsair do replay e voltar ao navegador

A pasta guarda os 64 arquivos mais novos; os antigos são removidos quando um novo replay é gravado. Arquivos que não podem ser lidos (por exemplo, gravados por outra build) aparecem com o motivo em vez de falharem em silêncio.

Os detalhes do netplay por rollback continuam em Netplay-and-Replays.

Espectadores e dados de netplay nos replays

Um terceiro tipo de conexão observa sem enviar entrada:

ultimate-mugen --spectate --peer <ip-do-host>:7000 [--port 7002] [--chars a,b --stage id]

Ele monta uma SpectatorSession do GGRS (PlayerType::Spectator), renderiza as entradas confirmadas pelo host e nunca envia entrada local; o overlay mostra ESPECTADOR · ping · quadros atrás.

Replays gravados online guardam a configuração da sessão (netplay: lado, peer, porta, delay, janela de rollback, número de jogadores, flag de espectador) junto das entradas, então um desync pode ser reproduzido com os mesmos ajustes. Quando o GGRS detecta um desync, o jogo grava replays/desync-<unix>.json com essa configuração, o quadro, o Match::checksum() e os últimos 120 quadros de entrada. O relatório de desync é um diagnóstico, não um replay: o menu Replays nunca o lista (nem como luta, nem como arquivo ilegível), então ele não parece um replay corrompido depois de um desync.

Rivalidades

English

Um lutador nativo pode declarar rivals no JSON, com o id do oponente como chave. Cada entrada pode trocar a fala do início do round e dar um pequeno bônus de ataque naquele confronto.

  • intro: fala de quem começa, no lugar da intro genérica.
  • taunt: resposta, no lugar da taunt genérica.
  • attack: multiplicador de ataque só contra aquele oponente, limitado a 0,9 até 1,15.

O bônus multiplica o ataque depois dos passivos e respeita o teto global de Passivos. Lutadores sem rivals agem como antes.

Pares atuais, baseados na Lore: Kaito e Akio, Suzume contra Oboro, Sylene contra Valdric e Kaname, Bruno e Marlow contra Valdric, Shion contra Garan.

Roteiro do Modo História (TOML)

O Modo História do Ultimate MUGEN é controlado por um arquivo declarativo .toml. Você pode personalizar cada fase, onda de inimigos, chefe, falas/diálogos, recuperação de vida e créditos — ou desativar completamente o Modo História.

Ordem de Carregamento

  1. Variável de ambiente UME_STORY_SCRIPT=<caminho> (se definida e legível).
  2. story/campaign.toml no diretório atual ou ao lado do executável do jogo.
  3. Campanha padrão embutida (assets/story/default.toml).

Se um arquivo externo tiver erro de sintaxe ou for inválido, o motor volta automaticamente para a campanha padrão sem travar.

Desativando o Modo História

Você pode desativar o Modo História de duas formas:

  • No jogo: Configurações -> Jogabilidade -> Modo História (TOML) -> DESLIGADO.
  • Via TOML: Crie story/campaign.toml com:
[campaign]
id = "desativado"
enabled = false

Referência do Esquema

[campaign]
id = "minha_campanha"
enabled = true
credits = 3
wave_recovery = 0.2
stage_recovery = 0.6
boss_life_factor = 1.5
boss_attack_factor = 1.1

[campaign.title]
en = "CYBER REBELLION"
pt = "REBELIÃO CIBER"
es = "REBELIÓN CIBER"

[[stages]]
arena = "neon"
accent = [0.4, 0.9, 1.0]
lane_far = -22.0
lane_near = 8.0
boss = "volta"
alt_boss = "akio"
waves = [
  ["npc_razor", "npc_spitfire"],
  ["npc_colossus"],
]

[stages.title]
en = "SECTOR ZERO"
pt = "SETOR ZERO"
es = "SECTOR CERO"

[stages.beats]
en = ["The grid is locked.", "Break the firewall."]
pt = ["A rede está trancada.", "Quebre o firewall."]
es = ["La red está bloqueada.", "Rompe el cortafuegos."]
  • title e beats aceitam tanto texto simples / lista simples (usados em todos os idiomas) quanto tabela { en, pt, es }.
  • alt_boss entra automaticamente caso o jogador escolha o boss principal da fase.

Editor da História (dentro do jogo)

Ajustes → Jogabilidade → Editor da História edita a campanha ativa sem sair do jogo: créditos, vida recuperada por onda e por fase, vida e ataque do chefe e as quatro falas de cada fase no idioma atual. Cada mudança é validada, salva como TOML (story-campaign.toml no armazenamento do app, localStorage na web) e aplicada na hora. Restaurar roteiro original apaga a cópia salva.

Ordem de busca da campanha: UME_STORY_SCRIPT → salvo pelo Editor → story/campaign.toml.

Editor de epílogos

Editor da História → Epílogos… edita o final de qualquer lutador (ou do * padrão): título, fala do chefe e resposta do herói no telhado e cada página de narração, no idioma atual. As edições vão para story-epilogues.toml (uma tabela ["lutador"] por epílogo editado, mesclada sobre o epilogues.json embutido); Restaurar epílogo original remove a edição. Um ● no cabeçalho marca epílogo editado.

A linha Cena do editor de epílogos troca o cenário de fundo (qualquer fase com arte) com Esq/Dir e salva na hora como scene = "..." no TOML.

O Editor da História também edita o nome de cada fase (por idioma) e o chefe (Esq/Dir percorre os lutadores instalados); o chefe final do epílogo acompanha o chefe da última fase. A linha Inimigos por onda (Esq/Dir) muda de 1 a 4 inimigos em todas as ondas da fase.

Na introdução do chefe final, escolha Poupar ou Derrubar com Esq/Dir ou tocando na opção. A escolha define o epílogo correspondente.

Depois, toque nas laterais do seletor de ajudante para percorrer os aliados e toque no nome selecionado para chamá-lo à luta final.

Rush Cancel

Todo lutador (nativo UMF e M.U.G.E.N) pode cancelar um golpe conectado para o estado neutro gastando meia barra de energia. É o prolongador de combos universal da engine: nenhum dado de personagem é necessário.

Como usar

Aperte a tecla de energia (R, a entrada s / Start) enquanto o golpe em andamento acabou de acertar ou ser defendido.

RegraValor
Custo500 de energia
Janela1 a 45 ticks depois do contato (CONTACT_WINDOW)
Buffer de entradaO toque é lembrado por 6 ticks, então apertar um pouco antes ainda funciona
Recarga40 ticks entre cancelamentos
Condiçãomovetype = A, o golpe acertou ou foi defendido, o lutador está vivo e o round corre
Não valeGolpe no vazio, helpers, lutador deitado, pausa de super

A mesma tecla continua carregando energia parado: um lutador com controle e sem ataque em andamento carrega como antes. Depois de um cancelamento a tecla fica mascarada até ser solta uma vez, então segurá-la nunca vira carga.

O que acontece

  1. 500 de energia são gastos e o lutador vai para o estado neutro da sua postura (0 em pé, 11 agachado, 50 no ar) com controle.
  2. A pausa e o tremor de golpe do atacante são zerados e o contador de air dash é reabastecido, então o próximo golpe ou dash começa na hora.
  3. Todo rival em estado de dano ou defesa ganha 8 ticks extras de stun (VICTIM_STUN_BONUS), o que permite a continuação conectar.
  4. A partida entra em câmera lenta por 15 ticks, o lutador pisca em azul e deixa um rastro de afterimage.
  5. O Overdrive começa: por 150 ticks o lutador causa 20 % a mais de dano (effective_attack, aplicado sobre os passivos e abaixo dos tetos deles).

Whiff cancel

Apertar Start durante um golpe que não tocou em nada também cancela, por um preço maior. Custa 1000 de barra (o Rush Cancel custa 500), vale de 10 a 60 ticks depois do início do golpe e divide a recarga do Rush Cancel. Devolve o controle como o Rush Cancel, mas sem Overdrive, sem câmera lenta e sem contar como Rush Cancel. Golpe que conectou ou foi bloqueado continua usando o Rush Cancel mais barato. Constantes em crates/engine/src/rush/whiff.rs.

Dash cancel

Um golpe normal que conectou (fraco a forte, em pé ou agachado) pode ser cancelado em dash para frente ou para trás tocando duas vezes a direção em até 20 ticks do contato, por 250 de barra. É mais barato que o Rush Cancel, não ativa Overdrive e não usa o cooldown. Exige contato (acerto ou defesa) e barra suficiente, então um normal que errou não pode ser cancelado. Código: crates/engine/src/rush/dash.rs.

Defesa perfeita

Apertar para trás até 6 ticks antes do golpe acertar, sem já estar segurando a guarda, torna o bloqueio perfeito: sem dano de chip e com o atordoamento da guarda um terço menor. Segurar cedo é guarda normal, e soltar trava a janela por 12 ticks, então martelar o botão não funciona. Vale só para nativos no chão e não dá barra (barra por guarda sustentava o voo da Shion sem fim). Código: crates/engine/src/rush/perfect.rs.

Chase

Durante um ataque que conectou (normal ou especial, não super), toque duas vezes para cima em até 30 ticks do acerto para teleportar ao lado de um inimigo lançado, por 500 de barra. Você aparece no ar com controle, a 38 pixels dele e virado para ele, então os combos aéreos continuam depois de um lançador. Exige o inimigo no ar e em hitstun, então nunca funciona em quem está em pé ou defendendo. Código: crates/engine/src/rush/chase.rs.

Mapa da engine

PeçaArquivo
Estado, buffer, constantescrates/engine/src/rush.rs
O cancelamento (Match::rush_step, rush_ready)crates/engine/src/rush/cancel.rs
Consulta da janela para o HUD (Match::rush_window: None sem cancelamento possível, senão a fração da janela que resta)crates/engine/src/rush/cancel.rs
Marcador "RUSH CANCEL" com barra de janela decrescente sob a barra de vidasrc/hud/rush_marker.rs (UME_SHOTS_ONLY=rush captura)
Evento para a apresentaçãoEvent::Rush { fighter, side, guarded } em crates/engine/src/matchs/types.rs
Efeitos (anéis, brilho, faíscas, rótulo, brasas do Overdrive)src/vfx/rush.rs
Checksum de rollbackoverdrive, cooldown e cancels em crates/netplay/src/checksum.rs
Testescargo test --release -p ume-engine --test it rush_cancel::

rush_step roda uma vez por tick de simulação depois da fase de entrada e não aloca (o rastro de afterimage só cresce quando há um cancelamento). Tudo é dado simples em Fighter::rush, então Match continua Clone e replays e rollback não mudam.

Screenpacks

English · Português (BR)

Um screenpack é o conjunto de arquivos que desenha tudo em volta da luta: menu de título, seleção de personagens, barras de vida, fontes e storyboards de abertura/logo.

Estado: o jogo agora carrega um screenpack quando ele existe (mugen/data/system.def, mugen/screenpacks/<pacote>/system.def ou UME_SCREENPACK). A interface nativa continua como fallback para o que o pacote não fornece:

  • Rótulos menu.itemname.* do system.def substituem os títulos do menu principal (Arcade, Sobrevivência, equipes, Treino, CPU vs CPU, Sair).
  • A ordem de [Characters] do select.def define a ordem da grade de seleção.
  • As cenas de texto do intro.storyboard são exibidas sobre a abertura do Arcade, com o tempo de end.time de cada cena.
  • pos/range.x da barra de vida do fight.def posicionam e dimensionam as barras (convertidos do localcoord do pacote para o espaço 426×240 do HUD); o resto do HUD continua nativo.
  • Sprites, fontes e sons analisados ficam em ume_formats::screenpack::Screenpack para as telas restantes, mas o desenho de sprites de system/fight (fundos, barras, fontes) ainda é nativo.

O verificador abaixo diz se o pacote analisa; o jogo nunca deixa de abrir por causa de um pacote quebrado (usa a interface nativa e registra os avisos).

Layout

data/
  system.def      menu de título, seleção, música, storyboards
  select.def      grade do elenco e lista de cenários
  fight.def       barras de vida/energia, anúncios de round/KO
  system.sff      sprites usados pelo system.def
  system.snd      sons de menu
  fight.sff/.snd  sprites das barras e vozes do narrador
font/
  *.fnt           fontes bitmap (v1 binária ou v2 texto)

Verificando um pacote

cargo run -p ume-formats --example screenpack_check -- <raiz do jogo> data/system.def

Ele imprime o que foi carregado e uma linha warning: por arquivo ausente ou quebrado.

Scripts CNS

Toda lógica de luta, inclusive a dos lutadores UMF, roda como CNS: estados ([Statedef]), controllers ([State]) e triggers. Para programar um lutador à mão, use o formato M.U.G.E.N (pasta com .def, .cns, .cmd) e coloque em mugen/chars/.

Sintaxe moderna ZSS (do Ikemen-GO): planejado, compilando para o mesmo bytecode.

Arquivo .def

[Info]
name = "Meu Lutador"
displayname = "Meu Lutador"
author = "você"
localcoord = 320, 240

[Files]
cmd = meu.cmd
cns = meu.cns
st = meu.st
stcommon = common1.cns
sprite = meu.sff
anim = meu.air
sound = meu.snd
pal1 = meu1.act

localcoord = 1280, 720 marca personagem HD; a engine escala sozinha.

Exemplo de estado

[Statedef 1000]
type = S
movetype = A
physics = S
anim = 1000
ctrl = 0
velset = 0, 0
poweradd = 30

[State 1000, golpe]
type = HitDef
trigger1 = AnimElem = 3
attr = S, SA
damage = 90, 10
animtype = Heavy
guardflag = MA
pausetime = 12, 12
sparkno = 2
ground.type = High
ground.hittime = 18
ground.velocity = -5
air.velocity = -4, -6
fall = 1

[State 1000, fim]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

E no .cmd:

[Command]
name = "hadou"
command = ~D, DF, F, x
time = 20

[Statedef -1]

[State -1, hadou]
type = ChangeState
value = 1000
triggerall = command = "hadou"
trigger1 = statetype = S && ctrl

Extras de comando (Ikemen GO 1.0):

RecursoComportamento
Passo NDireção neutra: nenhuma direção pressionada (command = N, x, ~D, N, x, N+x). O passo neutro é um estado mantido, como /, e vale enquanto nenhuma direção está pressionada
pausebuffer[Command] (ou command.pausebuffer em [Defaults]) mantém ativo por esse número de ticks extras um comando disparado durante hit pause, hit shake ou pause/super pause, para que possa ser lido quando a pausa terminar. Também aceita buffer.pausetime. Padrão 0
Estados customizadosQuando um jogador roda um estado de outro personagem (TargetState, p2getp1state), Command usa os comandos do dono do estado contra a entrada do jogador no estado

State controllers suportados

AfterImage AfterImageTime AllPalFX AngleAdd AngleDraw AngleMul AngleSet AppendToClipboard AssertSpecial AttackDist AttackMulSet BGPalFX BindToParent BindToRoot BindToTarget ChangeAnim ChangeAnim2 ChangeState ClearClipboard CtrlSet DefenceMulSet DestroySelf DisplayToClipboard DizzyPointsAdd DizzyPointsSet DizzySet EnvColor EnvShake Explod ExplodBindTime FallEnvShake ForceFeedback GameMakeAnim Gravity GuardBreakSet GuardPointsAdd GuardPointsSet Helper HitAdd HitBy HitDef HitFallDamage HitFallSet HitFallVel HitOverride HitVelSet LifeAdd LifeSet MakeDust MapAdd MapReset MapSet ModifyExplod ModifyProjectile ModifySnd MoveHitReset NotHitBy Null Offset PalFX ParentVarAdd ParentVarSet Pause PlayerPush PlaySnd PosAdd PosFreeze PosSet PowerAdd PowerSet Projectile RedLifeAdd RedLifeSet RemapPal RemoveExplod RemoveText ReversalDef RootVarAdd RootVarSet ScreenBound SelfState SndPan SprPriority StateTypeSet StopSnd SuperPause TagIn TagOut TargetBind TargetDrop TargetFacing TargetLifeAdd TargetPowerAdd TargetState TargetVelAdd TargetVelSet Text Trans Turn VarAdd VarRandom VarRangeSet VarSet VelAdd VelMul VelSet VictoryQuote Width

Também suportados: Zoom Camera Cinema SlowMo GroundLevelOffset Depth DepthBound ReversalDef HitOverride FallEnvShake RemapPal StopSnd SndPan VictoryQuote FinishDone ForceFeedback Offset Null DisplayToClipboard AppendToClipboard ClearClipboard. Limites dos controladores mais simples: Offset desloca somente o sprite desenhado, nunca as caixas de colisão nem a posição; Null não faz nada; VictoryQuote guarda o seu value no lutador para a apresentação da frase de vitória; ForceFeedback vira um evento de vibração para o personagem (self = 1) ou para o oponente; StopSnd e SndPan agem nos canais de som iniciados pelo personagem; DisplayToClipboard, AppendToClipboard e ClearClipboard guardam as últimas 10 linhas no lutador (%d, %i, %f, %%, \n e \t no texto, até 5 params).

Notas de tremor e som: EnvShake (e os parâmetros envshake.* / fall.envshake.* do HitDef) aceitam dir: 0 (padrão) balança o cenário nos dois eixos, 1 só na horizontal e 2 só na vertical; valores acima de 2 contam como 2. PlaySnd aceita stopongethit e stoponchangestate. Um som marcado é interrompido quando o personagem que o iniciou apanha (ou defende) ou entra em outro state; um novo PlaySnd no mesmo channel substitui as marcas anteriores, e StopSnd continua parando o canal. As marcas viajam junto com o evento de som: a engine só as informa e quem interrompe é a interface.

Notas sobre Explod: ignorehitpause vale 1 por padrão (use 0 para congelar junto com o hit pause do dono). postype = left/right/front/back e space = screen mantêm o explod fixo na tela enquanto a câmera se move. ModifyExplod aceita vel, accel, pos, scale, bindtime, removetime, sprpriority, ontop, under, removeongethit, ignorehitpause, facing, vfacing, supermovetime, pausemovetime e trans; facing é relativo ao dono. ExplodBindTime só altera o tempo de vínculo.

Efeitos de paleta empilham nesta ordem: BGPalFX do cenário, depois AllPalFX, depois o PalFX do próprio lutador. Eles valem no tick em que mudam (sem quadro de atraso), e um trans Sub ignora o tom da paleta enquanto o trans aditivo o mantém. hue (graus) gira as cores em torno do eixo cinza e sinhue oscila essa rotação usando o período do sinadd; os dois funcionam nos três controllers de paleta.

Canais de som: PlaySnd aceita loop, loopstart/loopend (milissegundos), loopcount (0 = infinito), stopongethit, stoponchangestate, pan/abspan, volumescale e freqmul; ModifySnd reajusta channel, pan, volumescale e loopstart/loopend de um canal vivo. Formato de música não suportado gera aviso e cai para a trilha embutida (trackers são rejeitados por decisão, veja decisões de compatibilidade).

Parâmetros de vida do HitDef: redlife é subtraído do red life do defensor (a faixa entre Life e RedLife é a parte do dano que ele não cobre), dizzypoints e guardpoints drenam os medidores de tontura e guarda (zero ativa Dizzy/GuardBreak e entra no estado de tontura 5300 ou no de quebra de defesa 5400, veja Sistemas de vida), score alimenta o placar do atacante e do defensor, sparkscale escala o spark do golpe, missonoverride mostra o texto MISS quando um HitOverride absorve o golpe, unhittabletime dá N ticks de invencibilidade ao defensor (a contagem pausa durante o hit pause) e xaccel desloca o defensor na horizontal enquanto estiver no estado de dano. attack.depth é lido e ignorado (a engine é 2D). p2clsncheck = 0 deixa o golpe conectar sem caixas do defensor e p2clsnrequire = n exige a caixa Clsn2 n do defensor (índice -1 = qualquer).

Notas de helper: um helper congela durante Pause e SuperPause, a menos que ainda tenha ticks de pausemovetime / supermovetime ou tenha nascido com pausebool = 1, que o faz ignorar qualquer pausa. Helpers com keyctrl = 1 só recebem os comandos do root enquanto o round é lutado; decidido o round, não recebem nenhum. Um helper roda o próprio -1 (só com keyctrl = 1), mas nunca o -2 ou -3 do root. Na tela de vitória (estado de round 4) os helpers ficam congelados e ocultos.

Controllers Ikemen, de cenário e de jogador

PlayBGM StopBGM ModifyBGM ModifyStageVar ModifyStageBG ModifyBGCtrl ModifyPlayer PrintToConsole RunState Height GetHitVarSet ModifyHitDef ModifyReversalDef OverrideClsn ResizeClsn TransformClsn TargetAdd TargetScoreAdd TargetRedLifeAdd TargetDizzyPointsAdd TargetGuardPointsAdd ScoreAdd RoundTimeSet RoundTimeAdd AssertCommand AssertInput ShiftInput RemapSprite TransformSprite MatchRestart

Faltam (planejado ou rejeitado por decisão, interpretados e ignorados com um aviso): Storyboard RemoveStoryboard Dialogue SaveState LoadState LifebarAction ChangeMovelist LoadFile SaveFile ShaderSet

Parâmetros e comportamento em Ikemen extensions.

Triggers suportados

Abs ACos AILevel Alive Anim AnimElem AnimElemNo AnimElemTime AnimElemVar AnimExist AnimLength AnimPlayerNo AnimTime ASin ATan AuthorName BackEdge BackEdgeBodyDist BackEdgeDist BottomEdge CameraPos CameraZoom CanRecover Ceil Clamp ClsnOverlap ClsnVar Command Cond Const Const240p Const480p Const720p Cos Ctrl DisplayName Dizzy DizzyPoints DizzyPointsMax DrawGame E Exp ExplodVar facing Floor Form FrontEdge FrontEdgeBodyDist FrontEdgeDist FVar form GameHeight GameTime GameWidth GetHitVar GuardBreak GuardPoints GuardPointsMax HelperIndexExist HelperName HelperVar HitCount HitDefAttr HitFall HitOver HitPauseTime HitShakeOver ID IfElse IkemenVersion Index InGuardDist InputTime IsHelper IsHomeTeam LeftEdge Life LifeMax Ln Log Lose LoseKO LoseTime MajorVersion Map MatchNo MatchOver Max Min MoveContact MoveGuarded MoveHit MoveReversed MoveType MugenVersion Name NumEnemy NumExplod NumHelper NumPartner NumProj NumProjID NumTarget NumText P1Dist P1Name P2BodyDist P2Command P2Ctrl P2Dist P2Life P2MoveType P2Name P2Power P2StateNo P2StateType P3Name P4Name P5Name P6Name P7Name P8Name PalFXVar PalNo ParentDist Physics Pi PlayerIDExist pos Power PowerMax PrevStateNo ProjCancelTime ProjClsnOverlap ProjContact ProjContactTime ProjGuarded ProjGuardedTime ProjHit ProjHitTime ProjVar Random RandomRange RedLife RightEdge RootDist RoundNo RoundsExisted RoundState RunOrder ScreenPos SelfAnimExist SelfCommand Sign Sin SpritePlayerNo SpriteVar Sqrt Standby StateNo StateTime StateType SysFVar SysVar Tan TeamMap TeamMode TeamSide TicksPerSecond Time TimeMod TopEdge UniqHitCount Var vel Win WinKO WinPerfect WinTime AirJumpCount Alpha Angle BotBoundBodyDist BotBoundDist Const1080p HitByAttr HitDefVar HitOverridden HitVel InCustomAnim InCustomState InRunState IntroState IsAsserted JugglePoints LastPlayerID LayerNo LocalCoord MemberNo MoveCountered MoveHitVar NumPlayer NumStageBG OutroState ParentExist PlayerIndexExist PlayerNo PrevAnim PrevMoveType PrevStateType Scale ScreenHeight ScreenWidth SelfStateNoExist SprPriority StageBackEdgeDist StageBGVar StageConst StageFrontEdgeDist StageVar TeamLeader TeamSize TopBoundBodyDist TopBoundDist XAngle XShear YAngle ZoomVar Attack Defence AttackMul DefenceMul ReceivedDamage ReceivedHits ComboCount Score ScoreTotal Round RoundTime TimeRemaining TimeElapsed TimeTotal FightTime RoundsWon FirstAttack DecisiveRound

form retorna o índice da forma de transformação UMF nativa ativa (0 na forma base); personagens M.U.G.E.N legados retornam 0.

Notas de projétil: o projétil guarda o lado do time e o jogador raiz no momento em que nasce. Virar, ou o dono mudar de lado depois, não altera quem ele pode acertar. NumProj e NumProjID contam todos os projéteis do root do jogador, inclusive os disparados por helpers, e continuam contando depois que o helper é destruído. Um projétil cujo helper sumiu ainda acerta e é creditado ao root.

Faltam (planejado): PlayerID.

Triggers de borda da tela

LeftEdge e RightEdge são absolutos: sempre devolvem a borda esquerda e a direita da tela. FrontEdge e BackEdge dependem de Facing: quem olha para a direita lê FrontEdge = RightEdge e BackEdge = LeftEdge, e quem olha para a esquerda lê o contrário. Os quatro usam as unidades do localcoord do personagem e as mesmas bordas de FrontEdgeDist e BackEdgeDist, então (FrontEdge - X) * Facing é igual a FrontEdgeDist (com X a posição do personagem no mundo).

Distâncias entre localcoords diferentes

Todo trigger de posição e distância converte o resultado do espaço do mundo para o localcoord do personagem que o avalia (P2Dist, P2BodyDist, RootDist, ParentDist, ScreenPos, LeftEdge/RightEdge/FrontEdge/BackEdge e a família ...EdgeDist). Numa luta 1280x720 contra 320x240, o mesmo vão aparece 4 vezes maior para o personagem HD. P2BodyDist subtrai as larguras frontais dos dois depois de convertê-las para o mundo, então vale 0 quando as caixas se tocam, seja qual for o localcoord de cada personagem. P2Dist e P2BodyDist dependem apenas das duas posições: a câmera nunca interfere, inclusive nos estados customizados de um arremesso.

Zoom da câmera

Zoom muda a escala da câmera (1 = normal, acima de 1 = mais perto). A câmera é determinística: avança um passo por tick, sem relógio.

ParâmetroPadrãoSignificado
scale1Escala pedida
time1Ticks em que o pedido continua ativo; dispare a cada tick para mantê-lo
delta0Somado à escala pedida a cada tick do pedido (uma rampa)
pos0, 0Deslocamento do foco da câmera no localcoord do jogador
lag00 vai à escala pedida em um tick; valores próximos de 1 suavizam (1 - lag da distância restante por tick)
zoomindelay0Ticks de espera antes de um zoom-in (scale > 1) começar
bound11 mantém a escala dentro dos limites do cenário (zoomin como maior escala, 1 / zoomout como menor, ampliada pelo zoom-out de equipes) e o deslocamento dentro dos limites do cenário; 0 só limita a escala a 0.25..4 e ignora os limites do cenário

Quando o pedido termina, a câmera volta à escala normal usando zoominspeed / zoomoutspeed do cenário.

CameraZoom devolve a escala atual da câmera. ZoomVar(<nome>) expõe o estado do zoom: scale (atual), target (escala pedida), active, time (ticks restantes), posx, posy, lag, delta, delay, bound, min e max (limites de escala permitidos pelo cenário agora). Todos os nomes valem 0 (ou a escala atual em target) quando nenhum Zoom está ativo.

Controladores de câmera e nível do chão

O motor é 2D, então não há eixo Z: Pos Z, Vel Z e os outros componentes Z sempre valem 0.

  • Camera (pos, zoom, bound, lag, time): move o foco da câmera por pos (localcoord do jogador) e, opcionalmente, define a escala da câmera com zoom. Usa o mesmo mecanismo do Zoom (veja acima): bound = 1 mantém o deslocamento dentro dos limites do cenário e a escala dentro dos limites de zoom do cenário, lag suaviza o zoom, time é o número de ticks em que o pedido fica ativo. Sem zoom, a escala atual é mantida.
  • Cinema (bars, slow, invert, lines, flash): ativa barras letterbox (bars 0..1), câmera lenta determinística (slow ticks), flash de impacto invertido (invert = 1), linhas de velocidade (lines 0..1) e flash colorido (flash = r, g, b).
  • SlowMo (time): ativa câmera lenta determinística por time ticks.
  • GroundLevelOffset value = n: eleva em n pixels o chão sob este personagem (negativo cava), que passa a ficar sobre o chão elevado com pouso, física de chão e detecção de golpe no chão/ar normais. Pos Y é medido a partir do chão do próprio personagem (0 enquanto está sobre ele); ScreenPos Y e a altura de criação de projéteis, explods e helpers incluem o deslocamento. O deslocamento zera no início do round.
  • Depth e DepthBound são aceitos mas ignorados (Z está fora do escopo); o primeiro uso imprime um aviso (depth is accepted but ignored: the engine has no Z axis) e o personagem não é alterado.

Triggers de tela, câmera e cenário

Todas as distâncias e tamanhos usam o localcoord do jogador que avalia. Triggers "relativos ao zoom" mudam quando a câmera dá zoom (o zoom-out de 5v5, Zoom, Camera).

TriggerRelativo ao zoomSignificado
ScreenWidth, ScreenHeightsimTamanho da área visível (GameWidth / GameHeight continuam devolvendo o tamanho bruto da vista em pixels do jogo)
TopBoundDistsimDistância da posição do jogador até o ponto mais alto que o cenário deixa a câmera mostrar (boundhigh, elevado por dynamicboundhigh)
TopBoundBodyDistsimO mesmo, menos o size.height do jogador (cabeça até o teto)
BotBoundDist, BotBoundBodyDistsimDistância dos pés até o ponto mais baixo que a câmera mostra (boundlow mais a altura da vista); iguais porque a origem fica nos pés
StageFrontEdgeDist, StageBackEdgeDistsimDistância até os limites laterais do cenário (boundleft / boundright ampliados por meia vista) à frente / atrás do jogador, conforme Facing
NumStageBG / NumStageBG(id)nãoNúmero de camadas de fundo do cenário, opcionalmente só as com o id dado
StageBGVar(id, nome)nãoValor atual da primeira camada com esse id: pos.x, pos.y (início mais rolagem e senoide), start.x/y, delta.x/y, velocity.x/y, tile.x/y, layerno, id, visible, enabled, sprite.group, sprite.index; id ou nome desconhecido dá 0
StageConst(nome)nãoNúmero do grupo [Constants] do cenário (0 se faltar ou nos cenários nativos)
Const1080p(n)nãon convertido de um desenho com 1920 pixels de largura para o localcoord do jogador
LocalCoord X / LocalCoord YnãoLargura / altura do localcoord do jogador
Angle, Scale X/Y, Alpha X/Y, SprPriority, LayerNonãoO estado de desenho atual do jogador (Alpha é origem / destino, 256 / 0 quando opaco). XAngle, YAngle e XShear valem 0: o renderizador 2D não tem inclinação nem cisalhamento
ZoomVar(nome), CameraZoomsimVeja "Zoom da câmera"

Redirecionamentos

parent root helper target partner enemy enemynear playerid p2 stateowner nearestfoe

helper(id) e target(id) aceitam um ID opcional; partner(n) é o n-ésimo outro jogador não-helper do mesmo lado (padrão 0; um helper redireciona pelo seu root; NaN quando não existe); enemy(n) e enemynear(n) escolhem o n-ésimo oponente. Exemplo: trigger1 = enemynear, life < 200. nearestfoe (extensão do motor) escolhe o oponente vivo e fora de standby mais próximo em 2D (x e y), útil em lutas de equipe; cai para enemy(0) quando ninguém está vivo. Exemplo de busca: x = (NearestFoe,Pos X - Pos X) * Facing.

Expressões

  • Inteiro vs. float como no M.U.G.E.N: 7 / 2 = 3, 7.0 / 2 = 3.5.
  • Intervalos: stateno = [200, 299], (200, 299].
  • Operadores: + - * / % ** ! && || ^^ & | ^ ~ = != < <= > >= e := em var(n) := valor.

Regras de pausa e congelamento

EntidadeHit pause (atacante) / hit shake (defensor)PauseSuperPause
Lutador ou helperAnimação, Time, física e timers param; só rodam controllers com ignorehitpause = 1Congelado, exceto quem pausou durante movetime e helpers com ticks de pausemovetime restantesCongelado, exceto quem pausou durante movetime e helpers com ticks de supermovetime restantes
ExplodContinua com ignorehitpause = 1 (padrão); com 0 para enquanto o dono está em hit pause ou hit shake, inclusive o vínculo de posiçãoCongelado, salvo ticks de pausemovetime restantesCongelado, salvo ticks de supermovetime restantes
ProjétilNão é afetado pelo hit pause do donoCongelado, salvo ticks de pausemovetime restantesCongelado, salvo ticks de supermovetime restantes
  • O orçamento de pausemovetime/supermovetime gasta um tick por frame congelado e só pelo seu próprio tipo de pausa.
  • AnimTime, AnimElemTime, AnimElemNo e Time mantêm o valor durante todo o hit pause ou shake e voltam no primeiro tick livre.
  • HitPauseTime é o hit pause restante do atacante; GetHitVar(hitshaketime) e HitShakeOver descrevem o shake do defensor. Os demais campos de GetHitVar são uma captura feita no momento do golpe e não mudam durante o shake; o relógio de recuperação (HitOver) também espera o fim do shake.
  • Testes de regressão: crates/engine/tests/freeze_rules.rs.

Depurar

  • F2 no treino mostra hitboxes.
  • cargo run --release -p ume-engine --example mugen_check -- <pasta> lista estados e expressões com erro.

Diagnóstico no carregamento

Cada carregamento de personagem confere os controladores, triggers e parâmetros lidos com o que a engine realmente implementa. Não há lista fixa: cada nome desconhecido é executado uma vez numa partida descartável e marcado quando o despacho não o trata, então o relatório acompanha a engine conforme controladores e triggers são adicionados.

O relatório indica, por arquivo e estado (.cns, .cmd, .st, .zss):

AchadoSignificado
controlador não suportadoo type não tem implementação
trigger desconhecidoo nome do trigger não é avaliado pela engine
redirecionamento / trigger de texto não suportadoum tipo de redirecionamento (partner, ...) ou comparação de texto (p3name = ...) que a engine não resolve
parâmetro desconhecidonenhum caminho do controlador lê esse parâmetro
flag de AssertSpecial desconhecidaa flag não é reconhecida

Cada carga imprime um resumo no stderr (n controladores não suportados, m triggers desconhecidos, ...), sem repetição por nome; TRACE=1 acrescenta os nomes com os arquivos e estados que os usam. Defina UME_QUIET_DIAGNOSTICS=1 para silenciar.

O mugen_check imprime o resumo de cada personagem e, com --strict, imprime os detalhes e termina com código diferente de zero se algum personagem tiver achados:

cargo run --release -p ume-engine --example mugen_check -- --strict mugen/chars/kfm

O CI roda com --strict sobre crates/engine/tests/data/chars; um recurso usado pelos personagens de teste que a engine não implementa quebra o build. No código, ume_engine::diagnostics::audit_cns(arquivo, texto) devolve os achados de um trecho e CharDef::diagnostics() os de um personagem carregado.

Triggers de introspecção

Triggers que leem de volta o que o personagem criou ou o que ele está desenhando. O último argumento é o nome da variável escrito sem aspas, como no Ikemen GO; um eixo é uma segunda palavra (pos x). Uma consulta que não encontra nada (explod, projétil ou caixa inexistente) é indefinida (NaN): qualquer comparação com ela continua indefinida e conta como falsa, então teste a existência com NumExplod, NumProj ou HelperIndexExist quando a diferença importar. Posições e velocidades usam as coordenadas do próprio personagem; as posições seguem a convenção de Pos (x relativo à câmera, y relativo ao chão).

TriggerVariáveis
ExplodVar(id, índice, var)id time removetime bindtime bindid anim animelem animelemtime animtime animplayerno spriteplayerno facing ignorehitpause layerno pausemovetime supermovetime sprpriority pos x/y/z vel x/y/z accel x/y/z scale x/y. Lê o índice-ésimo explod do chamador com esse id (id abaixo de 0 vale qualquer um)
ProjVar(id, índice, var)projid time projremovetime projhits projmisstime projpriority projsprpriority projedgebound projstagebound lowbound highbound projhitanim projremanim projcancelanim projremove anim animelem facing teamside pausemovetime supermovetime pos x/y/z vel x/y/z accel x/y/z velmul x/y remvelocity x/y/z scale x/y. Lê o índice-ésimo projétil vivo do chamador com esse id
PalFXVar(var)time (ticks restantes) add.r/g/b mul.r/g/b color invertall; prefixo bg. ou all. para os efeitos de fundo e global. Sem efeito ativo vale a identidade (add 0, mul 256, color 256)
ClsnVar(tipo, índice, borda)tipo é clsn1, clsn2, size ou dummy; borda é back, front, top ou bottom, relativa ao personagem e à sua direção. size é a caixa de corpo de size.ground.back/front e size.height; dummy não tem caixas
ClsnOverlap(tipo, playerid, tipo)agora aceita size (nos dois lados) e dummy (no primeiro, nunca sobrepõe) além de clsn1 e clsn2
ProjClsnOverlap(índice, playerid, tipo)a caixa de ataque do índice-ésimo projétil do chamador contra uma caixa daquele jogador
HelperVar(var)num helper: id helpertype keyctrl ownpal preserve; indefinido fora de um helper
SpriteVar(var)o sprite atual: group image width height xoffset yoffset
AnimElemVar(var)o elemento atual da animação: group image time hflip vflip xoffset yoffset xscale yscale angle alphasource alphadest numclsn1 numclsn2
InputTime(tecla)ticks em que a tecla está pressionada: U D L R, relativas F B, N (nada pressionado) e os botões a b c x y z s (maiúscula importa: B é trás, b é o botão)
AnimLength AnimPlayerNo SpritePlayerNototal de ticks da animação (-1 se nunca termina); número do jogador dono da animação e dos sprites
Index RunOrder HelperIndexExist(n)posição do personagem entre o root e seus helpers (o root é 0); ordem de atualização na partida, começando em 1; se o root tem o n-ésimo helper (base 0)
IkemenVersion(major) IkemenVersion(minor)versão do comportamento do Ikemen GO seguida: 1 e 0
DisplayName = "x" SelfCommand = "x"comparações de texto com o nome de exibição e com o buffer de comandos do próprio personagem

Ainda não implementados, e apontados pelo diagnóstico de carregamento: BGMVar, SoundVar (o núcleo da engine não guarda estado de áudio), AnimLoopCount, AnimPrefix, HelperName, as variáveis angle, friction, xshear, drawpal.* e shader de ExplodVar, e attr, guardflag, hitflag, shadow de ProjVar. Um nome de variável desconhecido é apontado uma vez por carregamento como explodvar(nome) e vale 0.

Overlays para lutadores migrados

tools/mugen2umf/overlays/ guarda patches CNS aplicados sobre uma migração exata via --extra (scripts.cns, com override: true para patches que substituem um estado inteiro). goku_ssj4_ryuken.cns troca o helper do dragão Ryu Ken (estado 3050) por uma versão teleguiada: mira o NearestFoe com curva suavizada, usa Turn quando o alvo está atrás, inclina com AngleDraw e desacelera no contato. goku_ssj4_afterimage.cns adiciona rastros AfterImage às habilidades do Goku por [Statedef -2], que acrescenta ao original sem substituí-lo.

Scripts Lua em conteúdo M.U.G.E.N

Alguns pacotes trazem arquivos .lua. Esta página diz para que servem, o que a engine faz ao encontrá-los e o que usar no lugar. A engine não tem runtime Lua por decisão (veja Engine e Decisões de compatibilidade): binário menor, WASM simples e simulação determinística para rollback.

O que foi verificado

Nenhum dos personagens guardados no projeto (os dois pacotes Goku GT DBFZ, Gogeta SSJ4, Goku SSJ4) contém .lua; são CNS, CMD, AIR, SFF e SND comuns. As notas abaixo sobre Lua em outros pacotes vêm da documentação do Ikemen GO, não de um pacote deste repositório. Se um lutador específico trouxer Lua, envie o pacote para os scripts serem lidos e documentados aqui.

Onde o Lua aparece

M.U.G.E.N 1.0 e 1.1 não têm Lua. Ele vem do Ikemen GO, que o usa em três lugares.

LugarFunçãoArquivos típicos
Camada de engine e screenpackMenus, modos de jogo, seleção, tela de vitória, hooksmain.lua, start.lua, arquivos de motif e módulos
Módulos externosExtras opcionais: modos, estatísticas, ferramentas de treinoexternal/mods/*.lua
DEF do lutadorarcadepath em [Arcade]: rota de arcade, storyboards e rivais daquele lutadorarcade.lua ao lado do .def
Pacotes de conteúdoScreenpack ou pacote com módulo que adiciona menu, modo ou ajuste de HUD*.lua ao lado do .def

A lógica de combate do lutador não é escrita em Lua. Ela fica em CNS e ZSS (controllers, triggers, comandos, IA), que a engine já executa. Um .lua na pasta de um lutador, como o caminho de arcade, não muda como ele luta; ele define os modos e telas ao redor.

Exemplos da wiki do Ikemen GO

Fonte: a página oficial de Lua da wiki do Ikemen GO. Módulos de referência ficam no repositório ikemen-engine/modules.

Um lutador pode apontar para um arquivo Lua no próprio DEF, na seção [Arcade]. O arquivo é um caminho de arcade personalizado: define oponentes, storyboards e ramificações daquele lutador.

[Arcade]
arcadepath = arcade.lua
launchStoryboard('chars/kfm/intro.def')
for i = 1, 6 do
	if not launchFight{} then return end
end
if getConsecutiveWins(1) == 7 then
	if not launchFight{p2char = {"SuaveDude"}} then return end
else
	if not launchFight{order = 3, winscreen = true} then return end
end
launchStoryboard('chars/kfm/ending.def')
setMatchNo(-1)

O select.def aceita uma condição Lua depois de unlock = para liberar um lutador oculto, por exemplo stats.modes ~= nil and stats.modes.arcade ~= nil and stats.modes.arcade.clear >= 1, ou gameMode() ~= "bossrush" para esconder um lutador de um modo.

Módulos são arquivos .lua em external/mods, listados em Common.Modules, ou carregados por um screenpack com module = arquivo.lua na seção [Files]. Eles podem adicionar modos de jogo e se conectar a hooks dos scripts padrão.

O que a engine faz hoje

  • O carregador de personagens não lê .lua e não o lista como erro. O lutador carrega e luta normalmente.
  • Se o lutador dependia do Lua (entrada de menu, modo, ajuste de HUD), esse comportamento extra simplesmente não existe.
  • O mugen_check reporta controllers, triggers e parâmetros não suportados, mas não arquivos .lua soltos.

Alternativas sem Lua

Uso do LuaSubstituto
Menus e telasScreenpack (system.def, fight.def) e o código de menus em Rust, veja Screenpacks
Modos de jogoModos em Rust e dados, veja Modos de jogo
Comportamento e IA do lutadorCNS ou ZSS, ou UMF JSON, veja Scripts CNS e Criar personagem UMF
Regras e ajustesCampos de dados (TOML ou JSON) lidos pelo Rust

Recomendação

  1. Manter Lua sem suporte. Não adicionar runtime.
  2. Fazer o importador detectar .lua e avisar uma vez por personagem: "ignorado: scripts Lua não são suportados", para o criador saber por que falta um menu ou modo.
  3. Incluir a mesma linha no relatório do mugen_check.
  4. Quando um pacote real depender do Lua, ler o script e portar o efeito para Rust ou dados caso a caso, sem interpretar Lua arbitrário.

O substituto em TOML para caminhos de arcade e condições de desbloqueio está em Arquivos de rota.

Vida vermelha, tontura e pontos de defesa

Todo lutador carrega três sistemas de vida do Ikemen GO ao lado de Life. Eles ficam sempre ativos; um personagem que nunca os lê só ganha o estado extra.

Vida vermelha

RedLife é a parte recuperável da barra de vida. Nunca fica abaixo de Life e nunca passa de LifeMax.

  • Um golpe subtrai o valor redlife do HitDef de RedLife, então a barra vermelha cresce por cima da vida real. Um golpe defendido usa o segundo valor de redlife.
  • LifeAdd, LifeSet, RedLifeAdd e RedLifeSet respeitam a regra acima. Quando Life passa de RedLife, RedLife acompanha.
  • Um novo round volta RedLife para LifeMax.
  • NoRedLifeDamage impede que golpes a alterem.

Pontos de tontura

DizzyPoints começam em DizzyPointsMax (a constante data.dizzypoints, data.life quando ausente).

  • Um golpe não defendido subtrai o valor dizzypoints do HitDef, multiplicado pelo multiplicador de defesa do alvo.
  • Em 0 o alvo entra no estado comum 5300 (tontura) com Dizzy ligado e sem controle. Alvos no ar ou caindo não ficam tontos.
  • Os pontos enchem quando o estado começa; Dizzy desliga quando o estado termina e o alvo sai do estado de golpe.
  • NoDizzyPointsDamage impede que golpes reduzam os pontos.

Pontos de defesa

GuardPoints começam em GuardPointsMax (data.guardpoints, data.life quando ausente).

  • Um golpe defendido subtrai o valor guardpoints do HitDef, multiplicado pelo multiplicador de defesa do alvo.
  • Em 0 o alvo entra no estado comum 5400 (quebra de defesa) com GuardBreak ligado e sem controle.
  • Os pontos enchem quando o estado começa; GuardBreak desliga quando o estado termina e o alvo sai do estado de golpe.
  • NoGuardPointsDamage impede que golpes defendidos reduzam os pontos.

Estados comuns

O common1.cns traz os estados 5300 (tontura, animação 5300 depois 5000) e 5400 (quebra de defesa, animação 5400, depois 150, depois 5000). O personagem pode sobrescrever qualquer um no próprio CNS. Sem nenhum dos dois estados, o sistema correspondente só acompanha os números.

Padrões do HitDef

Quando um HitDef omite redlife, dizzypoints ou guardpoints, a engine os deriva do dano com os multiplicadores do [Constants] do personagem:

ConstantePadrãoPadrão de super (attr com H)
lifetoredlifemul0.750.75
lifetodizzypointsmul1.80
lifetoguardpointsmul1.5-0.33

As chaves se escrevem default.lifetoredlifemul e super.lifetoredlifemul numa seção [Constants]. Um valor negativo de pontos de defesa devolve pontos, então um super recupera um pouco de defesa ao acertar. score = <acerto>, <defesa> também é lido pelo HitDef e guardado para GetHitVar(score).

Triggers e controllers

RedLife, Dizzy, DizzyPoints, DizzyPointsMax, GuardBreak, GuardPoints, GuardPointsMax, GetHitVar(redlife), GetHitVar(dizzypoints) e GetHitVar(guardpoints) leem esses valores. RedLifeSet, RedLifeAdd, DizzyPointsSet, DizzyPointsAdd, DizzySet, GuardPointsSet e GuardPointsAdd os alteram (veja Extensões do Ikemen).

Smoke da partida na web

node scripts/web-match-smoke.js web/dist joga partidas completas no Chromium headless (job web-qa do CI, depois do build web) e falha se a partida travar.

Cada cenário abre um deep link com ?e2e=1, que publica window.__ume_state a cada frame (tela, clock.tick, round, vitórias, lutadores). As configurações entram via localStorage (rounds de 30 s, velocidade 1.15x, mudo).

CenárioO que cobre
cpu-bot-best-of-3Um jogador roteirizado se aproxima e aperta ataques contra a CPU por pelo menos dois rounds
watch-cpu-vs-cpuSem input: a partida precisa chegar sozinha à tela de resultados

Falha por: erro de página, panic de Rust, RuntimeError ou console.error inesperado; tick da simulação parado por MATCH_SMOKE_STALL_MS (padrão 20000 ms) fora de pausa e fim de luta; nenhum frame de animação ou thread principal sem resposta pelo mesmo tempo; imagem renderizada nunca mudar durante a luta; resultados não alcançados em MATCH_SMOKE_LIMIT_MS (padrão 360000 ms) ou impossíveis de fechar com Enter.

MATCH_SMOKE_SCENARIOS=<nome,...> roda um subconjunto, MATCH_SMOKE_SHARD=<i>/<n> roda um a cada n cenários a partir do i (o CI divide o smoke de partida em jobs paralelos assim; seleção vazia falha) e WEB_SMOKE_SHOTS=<dir> guarda capturas (o CI envia em caso de falha).

Smoke test (modo debug)

Um runner dentro do motor valida as principais features em todas as plataformas e deixa evidências: um print por etapa e um relatório que diz qual feature quebrou e por quê.

Como rodar

AlvoComandoSaída
Desktop (Linux, macOS, Windows)ultimate-mugen --smoke <dir> (Linux sem tela: xvfb-run -a ultimate-mugen --smoke <dir> --res 1280x720)<dir>/report.json, <dir>/report.md, <dir>/shots/*.png
Webnode scripts/smoke-web.js web/dist <dir>mesmos arquivos
Web mobileSMOKE_MOBILE=1 node scripts/smoke-web.js web/dist <dir> (viewport Pixel 7, toque)mesmos arquivos

O processo sai com código 1 se qualquer checagem falhar. UME_SMOKE_ONLY=boot,fight_1v1 roda só essas features (o driver web também respeita); a página aceita ?smoke=1&smoke_only=boot. UME_SMOKE_FRAME_BUDGET_MS muda o orçamento médio de quadro (500 ms).

O que cobre

FeatureChecagens
bootlutadores e cenários registrados, nada em quarentena, sem erro de importação, título renderiza
screensmenu, ajustes, controles, importação MUGEN, mercado, replays, ficha e ajuste de personagem renderizam
selectseleção de lutador (1P e 2P) e de cenário renderizam
fight_1v1luta carrega, intro termina, combate causa dano, KO encerra a partida, tela de resultado aparece
trainingtreino carrega e a simulação avança
team_5v5dez lutadores carregam e renderizam
storyintrodução da história e a primeira onda carregam e renderizam

Cada feature também checa o tempo médio de quadro, e cada print é checado contra quadro preto ou chapado.

Lendo o relatório

report.md tem uma linha por feature. Feature com falha expande as checagens que falharam, cada uma com link para o print. Um panic é gravado no relatório com a feature que estava rodando, então a área do problema é conhecida mesmo quando o jogo morre.

Adicionando uma checagem

Crie uma função em src/smoke/features/ (arquivo novo perto de 250 linhas), liste em src/smoke/features.rs e use ctx.check(nome, ok, detalhe) ou ctx.shot(app, nome, quadros_de_aquecimento). Conduza o jogo pelo estado de App, como os tours de screenshot; mantenha cada feature em poucos segundos.

Ainda não coberto

Netplay, atualização automática, importação de zip e controles de toque na tela não são exercitados pelo runner.

Varreduras noturnas

Simulações do elenco inteiro que levam de 10 a 30 s cada (native_roster_lab, native_air_abilities, native_match_invariants, native_input_moves, native_normal_reach, native_no_stuck_states, native_attack_keyframes, pixel_states_test e a varredura de golpes aéreos) estão marcadas com #[ignore = "nightly: full-roster sweep"]. O gate do PR as pula; .github/workflows/nightly.yml roda todas por dia (cargo test --workspace --release -- --ignored), e localmente dá para rodar do mesmo jeito.

Táticas da CPU

crates/engine/src/ai/tactics.rs adiciona reações à IA a partir do nível 3: anti-aéreo (rival no ar, descendo, a até ~105 unidades: comando que começa com F, D, DF), punição de golpe errado (rival atacando sem contato, logo fora do alcance), confirmação de acerto (encadeia comando de vários passos depois de acertar) e disciplina de medidor (power >= cost; EX guarda uma barra; super só com rival em hit-stun, abaixo de 40% de vida ou o lutador abaixo de 50%).

Evidência em docs/evidence/ai-tactics/: taxa de nocaute de 83,4% para 96,7% e rodada média de 70,9 s para 54,5 s, sem lutadores travados. Veja AI-Tactics.

Leitura do rival (ai/reading.rs)

HabilidadeComportamento
Atraso de reaçãoA CPU só enxerga o ataque após (8 - nível) * 2 ticks: níveis baixos bloqueiam tarde e o nível 8 lê na hora
Altura da guardaBloqueia baixo ou alto conforme o guardflag do ataque, sem chutar
Punição de bloqueioGolpe do rival foi defendido e ele ainda se recupera: responde com um golpe de um só botão (mais vezes em níveis altos)
Perfil do rivalMédias móveis de quanto o rival pula e defende: quem pula muito aumenta a chance de anti-aéreo, quem fica na guarda aumenta a de atacar

Evidência em docs/evidence/ai-reading/: cargo run --release -p ume-engine --example ai_ladder joga espelhos entre níveis (nível 8 vence o 3 em 66,7 % → 86,5 % dos rounds, nível 6 vence o 3 em 54,8 % → 81,0 %), e native_duel mostra nocaute de 96,7 % → 99,4 % com o round médio de 54,5 s → 45,6 s.

Efeitos Visuais

Os efeitos de apresentação ficam em src/vfx.rs e src/vfx/; a simulação nunca os lê.

  • Níveis de impacto (src/vfx/impact.rs): leve (<40 de dano), médio (<90), pesado (hitdef pesado ou >=90) e hyper (>=150). Cada nível define faíscas, brilho, onda de choque, flare, soco de câmera, tremor, flash e aberração cromática. Vale para qualquer personagem, pois lê o evento Hit do motor.
  • Rachaduras no chão (src/vfx/crack.rs): golpes pesados e hyper em alvo no chão deixam rachaduras brilhantes que somem (só qualidade alta).
  • Qualidade (src/vfx/quality.rs): segue a opção fx (0 baixa, 1 média, 2 alta). As quantidades escalam 0,35 / 0,7 / 1,0; média remove rachaduras e luzes de cenário, baixa também remove detritos e metade do flare.
  • As partículas continuam no pool MAX_PARTS.
  • UME_SHOTS_ONLY=fx gera imagens de hit, heavy, hyper, counter, guard e super.
  • Super e despertar (src/vfx/awaken.rs): anéis em camadas (peito e chão), pilar de energia, rajada de faíscas em 360 graus, rachaduras no chão em qualidade alta.
  • Dash (src/vfx/dash.rs): riscos de velocidade e anel no chão ao iniciar um dash.
  • Final do KO (src/vfx/ko.rs): três ondas de choque, núcleo branco, faíscas em 360 graus, cortes radiais, detritos e rachaduras no perdedor. Custo do lado da simulação: cargo test --release --bin ultimate-mugen cost -- --ignored --nocapture.

Formas com anti-aliasing

Formas vetoriais desenhadas por ume_shell::quad levam uma franja de alfa de um pixel montada nos vértices (crates/render/src/canvas/shape.rs), então barras inclinadas da UI, círculos, anéis e linhas diagonais têm bordas suaves em todos os backends, sem MSAA.

  • draw_convex (usado por Ui::quad), draw_circle, draw_ellipse, draw_poly, draw_circle_lines e draw_line são suavizados. draw_triangle, draw_mesh e retângulos continuam duros, porque são usados como peças de malhas maiores e a franja deixaria emendas.
  • Arestas alinhadas aos eixos nunca são suavizadas: já caem na grade de pixels, e faixas empilhadas continuam encostadas.
  • Cantos usam mitra com limite de 3x, e formas com raio inscrito abaixo de 1 px voltam ao leque simples.
  • Linhas e anéis mais finos que 1 px mantêm a largura e reduzem o alfa, então fios finos param de piscar.
  • glow (src/glow.rs) é uma única malha de gradiente radial (241 vértices, uma camada de overdraw) cuja queda integra os 14 discos empilhados que substituiu (910 vértices, 14 camadas), então o visual é o mesmo, sem faixas.

Custo, medido com UME_TOUR=perf (Kaito vs Shion, 1280x720): os frames de luta foram de 2999 para 3921 vértices em média e a montagem do batch de 0,20 para 0,23 ms; as draw calls não mudaram (12,5).