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.
| Page | Audience | Covers |
|---|---|---|
| Installation | Players | Download, build, run on desktop, browser and phone |
| Automatic updates | Players | Self-update from GitHub releases, opt-outs and CLI flags |
| Configuration and controls | Players | .cfg file, command-line flags, environment variables, controls |
| Adding M.U.G.E.N content | Players | Install .def/.zip characters and stages, and validate them |
| GitHub marketplace | Players | Install characters, stages and music from any GitHub repository |
| 3D fighters (prototype) | Contributors | Isolated glTF skeletal fighter drawn on the 2D fight plane |
| Story mode | Players | Five scrolling stages, waves, bosses, cutscenes and health carry-over |
| Stage objects | Players, creators | Breakable crates, barrels and cars, food pickups, bonus rounds and their TOML data |
| Audio | Players & Creators | Character sounds, music per stage, formats and panning |
| Character select | Players | Select screen, portraits, teams and shortcuts |
| Game modes | Players | Arcade, teams (Sequence, Parallel, Tag) and their rules |
| In-fight Easter Eggs | Players | Secret combat milestones, stage cameos, and lore matchup interactions |
| Universe and Lore | Players & Creators | Cosmology, factions, energy systems and the Great Convergence |
| Character Dossiers | Players & Creators | Roster bios, portraits, moves, rivalries and home stages |
| Compatibility decisions | Creators | Features the engine rejects by design and why |
| Format coverage | Creators | Status of SFF, SND, AIR, ACT, DEF and screenpack support |
| Lua scripts | Creators | What Lua in M.U.G.E.N packs does and the Lua-free alternatives |
| Route files | Creators | Arcade routes and unlock rules in TOML |
| Make a character (quick start) | Creators | A working fighter in ten lines, inherited from another one |
| Creating a UMF character | Creators | Full reference: every field of a fighter in a single JSON |
| Passives | Creators | Rage, ability stacks and regeneration, data-driven |
| Unleashed Potential | Players | Generic transformation for imported characters: Potential, then Fury |
| Signature | Creators | Per-fighter signature meter with tiers, declared in JSON |
| Kit Inputs | Players | Per-archetype charge and 360° inputs for native fighters |
| Rivalries | Creators | Per-matchup round-start lines and attack bonus, declared in JSON |
| Replay Camera | Players | Cinematic framing for replays: zooms on close fights, leans toward attacks |
| Photo Mode | Players | Free camera, filters and clean PNG capture on a paused fight or replay |
| Combo Trials | Players | Seven combo goals in training, saved per fighter |
| Match Mutators | Creators | Per-match rule changes; gravity is the first mutator |
| Standing Hits | Players, Creators | Light hits push back without knocking down; threshold by life % |
| Rush Cancel | Players & Creators | Spend meter to cancel a connected move, Overdrive and the presentation |
| Combo Tiers | Players & Creators | Combo badges, energy notch, air dashes and bounces |
| Bleach-inspired kits | Players | Abilities inspired by Bleach in three native fighters |
| Effect frames | Creators | Projectile and spark effects |
| CNS scripts | Creators | States, controllers, triggers and commands |
| AssertSpecial flags | Creators | All 77 Ikemen flags and what each one does |
| Red life, dizzy and guard points | Creators | RedLife, DizzyPoints, GuardPoints, states 5300/5400 and HitDef defaults |
| Screenpacks | Creators | Menu and HUD screenpack support |
| Screenpack study | Creators | Screenpack differentials and what the engine adopted |
| Sprite atlas import | Creators | Turn a sprite sheet into a fighter |
| Dev tools | Contributors | Rust build and audit tools (ume-tools) |
| Roster audit | Developers | Fight every character and stage and read a severity report |
| Sprite toolkit | Creators | Slice sheets, palette variants, auto collision boxes |
| Move generator | Creators | TOML to AIR, CNS, CMD and Statedef -1 |
| Combo strings | Creators | Signature three-part strings per native fighter |
| ZSS scripts | Creators | Ikemen ZSS state scripts |
| Ikemen extensions | Creators | Ikemen GO controllers and triggers the engine accepts |
| Make a stage (quick start) | Creators | A stage from a .def file, story arena data, and what still needs code |
| Creating stages | Creators | Full reference: M.U.G.E.N .def stages and native stages |
| Architecture | Developers | Crate map, dependency direction, where new code goes |
| Contributing | Contributors | Build, checks, rules and pull request flow |
| Extension points | Creators, Contributors | Which file defines each kind of content and whether it needs Rust |
| Architecture decisions | Contributors | ADRs: why the engine is built this way |
| Customizing the engine | Developers | Architecture, new controller, new trigger, tests |
| Web match smoke | Developers | CI test that plays full matches in the browser and catches freezes |
| File layout | Developers | The 250-line rule, one responsibility per file, splitting a file, parallel PRs |
| Performance | Developers | Parallel loading, frame pacing, benchmarks |
| Reverse engineering the browser port | Developers | How a 78-fighter M.U.G.E.N build runs in a browser, and what we took from it |
| Replays | Players | Saved fights, replay browser, playback speed |
| Research: fighting games | Developers | Survey of other fighters and prioritized improvement list |
| M.U.G.E.N code study | Developers | Goku GT and four Mortal Kombat fighters read line by line |
| Dissection of four fighters | Developers | Aizen, Gogeta, Goku SSJ and SSJ4: files, commands, normals, move patterns |
| Remaking a M.U.G.E.N fighter | Creators | Recipe and mapping to UMF, with the Captain Marlow Reyes rebuild |
| MUGEN conversion checklist | Creators | What the MUGEN to UMF converter migrates, what is partial and what is missing |
| Ability library | Creators | Reusable blocks (blink, vfx, quake, projectile.repeat, kit abilities) and the MUGEN gap map |
| CPU tactics | Developers | Anti-air, whiff punish, hit confirm and meter rules of the CPU |
| Fighter study | Developers | 50+ fighters surveyed and the moves they inspired |
| Smoke test (debug mode) | Developers | One command checks every main feature on desktop and web, with screenshots and a report |
| Web QA pipeline | Developers | Parallel CI shards that play the wasm build in Chromium, with prints and logs on every failure |
| Stress and resilience | Developers | Fuzzing, spawner caps, hot path numbers |
| Native animation audit | Developers | Pose coverage of the native roster |
| Authoring tool survey | Developers | What Fighter Factory Studio checks and how to match it |
| Research: story mode | Developers | Survey behind the story mode design |
| Media capture | Developers | Screenshots and GIFs from the web build in headless Chromium |
| Troubleshooting | Everyone | Common errors and diagnostic tools |
Accepted formats
| Format | Use | Files |
|---|---|---|
| UMF | Native declarative fighter | assets/chars/<id>.json |
| M.U.G.E.N | Classic 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
| Target | Command |
|---|---|
| Desktop | cargo run --release |
| Tests | cargo 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 |
| Android | cargo install cargo-apk --version 0.9.6 --locked, then cargo apk build -p ultimate-mugen --lib --release --target aarch64-linux-android |
| iOS | cargo 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):
| Asset | Purpose |
|---|---|
ultimate-mugen-v<version>-<platform>.zip / .tar.gz | Manual install package (binary + README) |
ultimate-mugen-v<version>-<platform>[.exe] | Raw executable downloaded by the auto-updater |
latest.json | Update manifest read by the running build |
SHA256SUMS.txt | Human-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
- At boot the game requests
releases/latest/download/latest.jsonover HTTPS (8 s timeout, silently ignored when offline). - A newer
versionwith abinaryentry 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". - Accepting starts the background download (180 s timeout) to
.update-v<version>[.exe]next to the running executable. - The download is rejected unless its
sha256and byte size match the manifest and the staged executable answers--versionwithultimate-mugen <version>. - 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. - The previous
.oldfile 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
| Flag | Effect |
|---|---|
--check-update | Prints whether a newer release exists and exits |
--update | Downloads, verifies and installs the newest release, then exits |
--no-auto-update / UME_NO_AUTO_UPDATE=1 | Keeps the footer notice, never shows the prompt (so never downloads or installs) |
--no-update-check / UME_NO_UPDATE_CHECK=1 | No 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.
| Key | Values | Effect |
|---|---|---|
fullscreen | 0 / 1 | Fullscreen |
res | 0 1280×720, 1 1920×1080, 2 2560×1440, 3 3840×2160, 4 5120×2880 | Window size |
quality | 0 automatic, 1 3×, 2 4.5×, 3 6× | Vector art density |
fps | 0 / 1 | Show FPS |
fx | 0 to 2 | Post-processing (bloom, vignette, etc.) |
impact_lv | 0 minimum (photosensitivity), 1 reduced, 2 normal, 3 intense | Impact effect strength |
version | 2 | File format version (older files without it still load) |
vsync | 0 / 1 | V-Sync (native) |
fps_cap | 0 unlimited, 1 30, 2 60, 3 120, 4 144 | Frame limiter (native) |
master music sfx | 0 to 10 | Volume steps |
mute | 0 / 1 | Silence everything |
difficulty | 1 to 8 | CPU level |
round_time | 0 99 s, 1 60 s, 2 30 s, 3 infinite | Round timer |
rounds | 0 first to 1, 1 first to 2, 2 first to 3 | Rounds needed to win |
life | 0 50%, 1 75%, 2 100%, 3 150%, 4 200% | Life bar multiplier |
lang | en / pt / es | Language of the whole interface |
keep_aspect | 1 (default) / 0 | 1 letterboxes the 16:9 picture inside any window shape; 0 stretches it to fill the window |
filter | nearest (default) / linear | Sprite sampling when scaled: crisp pixels or bilinear smoothing |
window | WIDTHxHEIGHT, 0x0 when unset | Windowed 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
| Flag | Effect |
|---|---|
--res 2560x1440 | Window resolution |
--4k | 3840×2160 window |
--fullscreen | Fullscreen |
--touch | Force touch controls |
--mute | No audio |
--shots <folder> | Automatic tour saving screenshots |
--shots-audio | Enable sound during a screenshot tour; --mute still takes precedence |
--version | Print the version |
--check-update | Print whether a newer release exists and exit |
--update | Download, verify and install the newest release, then exit |
--no-auto-update / --no-update-check | Keep the notice, hide the update prompt / skip the update check |
Environment variables
| Variable | Effect |
|---|---|
UME_MUGEN_DIR | Alternative M.U.G.E.N content folder |
UME_MARKET_HOME | Folder for marketplace downloads and state |
UME_GITHUB_TOKEN / GITHUB_TOKEN | Optional GitHub token for the marketplace (raises the API rate limit) |
UME_NO_UPDATE_CHECK=1 | Skip update checks |
UME_NO_AUTO_UPDATE=1 | Keep the update notice but never download or install |
UME_NOFX=1 | Disable 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.rsholds the keyed table (English and Portuguese) andsrc/i18n/es_catalog.rsthe 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 olderi18n::tr(pt, en)finds its Spanish text throughsrc/i18n/es_phrases.rs, keyed by the English string. Placeholders usei18n::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.languageon the web,LC_ALL/LC_MESSAGES/LANGon 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
| Action | Keyboard P1 | Keyboard P2 | Gamepad | Touch |
|---|---|---|---|---|
| Move | arrows | I K J L | D-pad / stick | virtual stick |
Punches x y z | Q W E | Num 4 5 6 | □ △ | LP HP |
Kicks a b c | A S D | Num 1 2 3 | ✕ ○ | LK HK |
| Quick specials | V B N | Num 7 8 9 | — | ESPECIAL, SUPER |
| Move shortcuts (slots 1-4) | 1 2 3 4 | — | L1, L2, R1, R2 | — |
| Awakening (transform) | T | Num 0 | L3 + R3 / SELECT | — |
| Tag swap (Tag mode) | F | Num Enter | L3 + R3 / SELECT | awaken button |
| Charge ki | R | Num Decimal | R3 (alone) / START | — |
| Pause / hitboxes | Esc / F2 | Esc / F2 | START | ❚❚ |
| Fullscreen / FPS | F11 / 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.
| Section | Key | Effect |
|---|---|---|
[theme] | background | Menu background base color |
[theme] | glow_bottom, glow_left, glow_right | Menu 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] | accent | Selection colour: main-menu highlight, pause and settings buttons, sliders |
[theme] | title, info, muted, text | Headings and values (gold), hints and links (cyan), secondary text, body text, across every menu and the HUD |
[hud] | life, life_low, damage | Life bar fill, its colour under 25% life, and the trailing damage chunk. The top of each gradient is derived from the colour |
[music] | fight | Audio 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_tint | Lifebar accent color per side |
[hud] | bar_offset_y | Moves the lifebars down (-4 to 40) |
[accessibility] | hud_opacity | HUD opacity multiplier (0.3 to 1.0) |
[accessibility] | colorblind | true uses blue/orange side colors instead of the tints |
[accessibility] | hud_scale | HUD size multiplier (0.8 to 1.25) |
[accessibility] | reduce_motion | true turns off screen shake |
[accessibility] | title_crt | false 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
- Put the folder in
mugen/chars/<name>/with the.definside, or drop the.zipstraight intomugen/. - Open the game: the character shows up in the select screen.
Tabfilters 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
| Item | Status |
|---|---|
.sff v1 and v2 (PCX, RLE8, RLE5, LZ5, PNG 8/24/32) | Supported |
.air, .cmd, .cns, .st, .snd (PCM WAV 8/16 bit), .act | Supported |
localcoord (HD 720p characters) | Supported |
| ~80 state controllers and 100+ triggers | See CNS scripts |
ReversalDef, HitOverride, RemapPal, SndPan, VictoryQuote | Planned |
[BGCtrl] in stages, screenpacks, fight.def lifebars, .fnt fonts | Planned |
| 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
- Press
U(or click + Adicionar) and paste a link:https://github.com/owner/repo,owner/repo, or a folder link such ashttps://github.com/owner/repo/tree/main/mugen. - The game reads the repository tree and lists what it finds.
- Mark items (
Space, click, or Todos) and press Instalar (I). Downloads run in parallel with a progress bar. - 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/PageDownand 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_SS4andGoku_SSJ4_UMFcount 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 showPACK · Nand 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/orthumbs/folder with the same name as the item (previews/umf/Goku_SSJ4_UMF.pngforumf/Goku_SSJ4_UMF.zip). Only visible cards are fetched (3 at a time, fromraw.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
| Repository | Characters | Stages | Music | Packs |
|---|---|---|---|---|
| juninmd/ultimate-mugen | — | — | — | elecbyte.zip |
| Carlmundo/NooksVsCrans | chars | stages | sound | Rayman.zip |
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
| Kind | Rule | Installed files |
|---|---|---|
| Character | folder with a .def plus .sff, .air and .cns/.cmd in its tree | the 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/ folder | the 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 | .zip | the 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
| Platform | State 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 |
| Android | app internal storage, market/ |
| Web | IndexedDB 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
httpslinks togithub.com,api.github.com,raw.githubusercontent.com,media.githubusercontent.comandcodeload.github.comare 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
| Platform | Adding a repository |
|---|---|
| Desktop | type in the game (paste is not available in the game window; type owner/repo) |
| Web and phone browser | the browser's own prompt, with paste |
Featured repository: zinclee123/mugen_chars
Community roster of M.U.G.E.N characters. Paste a folder link in Mercado GitHub (U) to install a single character.
| Kind | Link |
|---|---|
| Repository | zinclee123/mugen_chars |
| Characters | Hinako · K' · Lin · MasterRyu · Rugal2nd · kusanagi-XIII |
| Stages | none in the repository |
| Music | none in the repository |
| Packs | none 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:
| Page | Scene | Content |
|---|---|---|
| 1 | Rooftop at night, boss on the ground | the boss speaks to this fighter |
| 2 | Rooftop, fighter in the victory pose | the fighter answers |
| 3 | The fighter's home scenery at dawn | narration |
| 4 | Home scenery in daylight, victory pose | narration |
| 5 | Home scenery, dimmed | THE 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.

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.
| Pickup | Effect | Score |
|---|---|---|
| Apple | +12 % life | 100 |
| Pizza slice | +25 % life | 200 |
| Roast | +50 % life | 400 |
| Gem | score only | 1500 |
| Battery | +34 % power | 150 |

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
Breakablehas a position on the floor, a lane, a hurt box (half_width,height), life and an optionalPickupSpecdrop. 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 + depthof the object lane. - One hit per swing: after a hit the object ignores new hits for
REHIT_TICKS(10). The attacker getsMoveContact/MoveHitand up to 8 ticks of hit pause, so normals cancel off a crate exactly like off a fighter. solidobjects (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 exceedslife_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
| File | Role |
|---|---|
crates/engine/src/stage_objects.rs | State, goal clock, solid bodies |
crates/engine/src/stage_objects/strikes.rs | Strikes and projectiles against breakables, drops |
crates/engine/src/stage_objects/pickups.rs | Pickup physics and collection |
src/story/objects.rs | TOML catalog, spawning per stage and per bonus round |
src/story/objects_art.rs | Sprites, shadows, hit flash, depth ordering against fighters |
src/vfx/stage_objects.rs | Debris, sparks, smoke, floating text, sounds |
src/app/story/bonus.rs, src/app/story/hud.rs | Bonus 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.
channelworks as in M.U.G.E.N: a new sound on the same channel of the same fighter replaces the old one;lowpriority = 1keeps the old one if it is still playing.PlaySndreadspan,abspan,loop,freqmul,volumescale,channelandlowpriority.StopSndstops one channel, or every sound of the character withchannel = -1.- Looping sounds keep playing until the channel is stopped or the fight ends.
SndPanmoves sounds that are already playing on that channel (or every channel and looping sound of the character withchannel = -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 thenpc_*fighters borrow their parent's voice. MoveInfo.stateties 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...]withKOKORO_MODEL/KOKORO_VOICESpointing atkokoro-v1.0.onnx/voices-v1.0.binfrom the kokoro-onnx releases, plusffmpegwith 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,hitandhitheavy, 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 (
hit0.8,hitheavy0.55,counter0.45,super0.35,ko0.2 of the current level) and recovers smoothly. - A crowd cheer plays on the KO.
AssertSpecialnomusicsilences 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,Ppicks 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 inultimate-mugen.cfg(pal1,pal2) and in replays. - Keyboard, gamepad and touch/mouse use the same navigation as before.
- Grid navigation moves by column:
UpandDownkeep 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/PgDnmove a whole page,Home/Endjump to the ends, the wheel scrolls by row andRpicks 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,Escor a click clears it. Search matches name, id, author and series. On the search page the arrows andPgUp/PgDnchoose a result andEntermoves the cursor to it. - The footer shows the page (
page 3/15) next to the position. For 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+Uor 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=1forces 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;Escclears the search. - Names are cut to the tile width with an ellipsis;
Home/Endjump to the ends; the footer shows position and page. Randompicks 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.
| Mode | Fighters in play | Round ends when |
|---|---|---|
| Team · Sequence | 1 per side, the next teammate enters after a KO; the winner keeps its life | one side runs out of fighters |
| Team · Parallel | the 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 teammate | every member of a side is KO'd |
| Team · Tag | 1 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.
- Tier 0 (First Run): The supreme architect Mikazuki Oboro (
- 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 dedicatedCHEFE FINALbanner). 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.
- Phase 1: Oboro fights with flight, shadow teleportation, super speed, and his first awakening (Véu Desperto,
- 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.jsonbeside 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 %viavillain_life_ratioinsrc/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
ScoreTotalof 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=keyscaptures 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, P2Num -/Num +, rebindable under Controls; the engine bits areLANE_UP/LANE_DOWN). Walking works only while grounded and in control, and each stage limits the band to its real floor (lane_far/lane_nearinsrc/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 COMPLETEcard. Texts live inassets/story/epilogues.jsonand can be replaced with astory-epilogues.jsonfile next to the executable. Details: Story Mode. - Guard button. Story has a dedicated guard button (P1
C, P2Num *, 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 byume-tools gen-story-npcs). Fighters with dedicated sprite packs underassets/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.
| NPC | Move set base | Story Life | Trait |
|---|---|---|---|
| Brute | Bruno | 11 % of hero | strong and hkick carry armor |
| Razor | Suzume | 9 % of hero | 35 % faster, kicks lunge forward |
| Spitfire | Akio | 10 % of hero | jab throws a small orb (ranged pressure) |
| Colossus | Daichi | 12 % of hero | Slower, armor on every basic strike |
| Phantom | Jin | 9 % of hero | Faster, 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/ScoreTotalfor your side plus a1000 × roundclear 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_simulKO rule). - Inputs are independent: P1 uses the player-1 keys/pad, P2 the player-2 ones (
Tabis not needed). The HUD tags each fighterP1/P2by 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 (
Ffor 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_maxticks (default 180, three seconds) before it can swap again. The HUD shows a bar and aTAGmark 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_windowticks (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,EnemyNearskip 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.
TeamModereturns3in this mode.TagOut/TagInswap the fighters for real (see Ikemen extensions);Standbyis1for the waiting fighters andNumPartnercounts 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:
| Plan | What the dummy holds |
|---|---|
| Stand | Nothing |
| Crouch | Down |
| Jump | Up on every landing |
| Guard | Back, only while the rival attacks or a projectile is alive (it does not walk away) |
| Low guard | Down, plus back while threatened |
| Record my inputs | Nothing; every input you press is recorded (up to 10 s) |
| Play recording | Your recorded inputs on a loop, mirrored to the dummy's facing |
| AI learns you | Counts 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 insrc/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
&Matchstate 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 withFilterMode::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)
- TOASTY! — Corner pop-in referee cameo on heavy airborne launches (
damage >= 115). - DOUBLE K.O. DRAMA! — Both fighters knocked out simultaneously.
- MAGIC PIXEL! — Winning a round or landing a Super below 5–6% life.
- UNTOUCHABLE! — Flawless 100% life round victory with golden crown badge.
- CLASH OF FATES! — Simultaneous mutual hit trade within 3 ticks.
- TAUNT TO GET BODIED! — Getting hit within 90 ticks of taunting.
- HONORABLE DUEL! — Both fighters taunt within 120 ticks of each other.
- SYNC JUMP! — Both fighters jump on the exact same frames twice in a round.
- TACTICAL DANCE PARTY! — Rapid crouch-spam 4+ times at long range.
- SPEEDRUN K.O.! — Winning a round in under 10 seconds.
- BUZZER BEATER! — Round decided with 3 or fewer seconds remaining.
- GRAVITY OFF! — Landing a 5+ hit air juggle combo.
- IRON FORTRESS! — Blocking 6+ hits cleanly in a single sequence.
- GUARD SHATTERED! — Guard break (
state_no == 5300). - DOUBLE SUPER CLASH! — Both sides fire a Super within 90 ticks.
- LIMIT BREAK DUEL! — Both fighters awaken/transform in the same match.
- STOP, HE'S ALREADY DOWN! — 15+ hit overkill combo with referee pop-in.
- GREAT CORNER ESCAPE! — Reversing out of a prolonged corner trap with a heavy hit.
- HIGH NOON STAREDOWN... — Both fighters stand idle facing each other for 3 seconds, rolling a pixel-art tumbleweed across the floor.
- INSERT COIN — MAX METER! — Reaching full super meter drops a spinning 1UP arcade coin flyby.
Stage-Specific Environmental & Cameo Easter Eggs (20)
- Dojo — Master's Paper Crane: An animated origami crane drifts across the sunset roof.
- Dojo — Rooftop Tremor: Heavy impacts shake the ancient dojo roof tiles.
- Neo-Metrópole 2099 — Cyber UFO Sighting: A blinking neon flying saucer zips across the skyline.
- Neo-Metrópole 2099 — System Overload // 2099: Firing a Super triggers a neon grid surge banner.
- Moonlit Bamboo — Moonlit Bamboo Spirits: Spirit masks drift through the grove during combos.
- Rocky Plains — El Viento Salado: Marlow's flying galleon crosses the distant clouds.
- Spirit Gate — Kitsune Apparition: A glowing kitsune mask floats above the torii gate on Supers or Awakenings.
- Volcanic Crater — Magma Geyser Spike: Heavy hits trigger a seismic caldera roar.
- Praça do Interior (Brazil) — Chill Capybara Cameo: A pixel-art capybara with a tangerine on its head waddles across the plaza.
- Praça do Interior (Brazil) — Caramelo Dog on Patrol: Plaza guardian cameo on Round 2+.
- Christ the Redeemer (Corcovado) — Corcovado Toucan Flyby: A vibrant pixel-art toucan glides across the Rio sky.
- Great Wall of China — Sky Dragon Kite: A paper kite dances along the mountain ridge.
- Petra (Al-Khazneh) — Rose Canyon Scarab: A golden scarab shimmers over the canyon on heavy impacts.
- Texas — High Noon in Texas: A desert tumbleweed rolls down Main Street at high noon.
- Chichén Itzá — Feathered Serpent Shadow: Kukulcán's emerald glow ripples across the temple on Supers.
- Colosseum of Rome — Ave Gladiator!: The Emperor rewards 6+ hit combos with a golden laurel badge.
- Taj Mahal — White Doves of Agra: Doves take flight over the marble palace on Round 2+.
- Pyramids of Giza — Pharaoh's Eye Glint: Reaching full meter awakens the golden scarab of Giza.
- Hanging Gardens of Babylon — Hanging Gardens Peacock: Emerald-gold plumage glides overhead on air combos.
- 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)
- Mirror Match Banter: Any fighter facing themselves triggers an "impostor" speech bubble.
- Suzume vs Oboro: Kagerou clan vengeance banner with crimson eclipse emblem.
- Sylene vs Garan: Borealia's Arctic ice vs Underworld ashen flames.
- Kaito vs Oboro: Storm of Izu vs the Scarlet Eclipse.
- Bruno on Brazil / Corcovado: Home crowd cheers on the three-time Minas Gerais champion.
- Volta on Neo-Metrópole 2099: Free-will firmware speech bubble back at its birthplace.
- Akio Fired Up (<30% HP): Starfall Dojo optimism kicks in with a steaming ramen badge.
- Haruki's Apology: Gentle archivist apologizes mid-fight after landing a 5+ hit combo.
- Marlow vs Valdric: Sky pirate playfully eyes the Red Star Empire's crown.
- Kaito vs Jin: Wind-runner rivalry between Izu Cliffs and the Blue Mountains.
- Shion vs Kaname: Meteorite blade meets the Alpine spirit katana (
crossed_blades). - Lian on Great Wall: Jade Lantern grandmaster defending the Great Wall.
- Bruno vs Daichi: Heavyweight grappler showdown — Iron Ring vs Altai Wolf.
- Garan on Volcanic Crater: The Ashen Gate opens where 99 monks sealed him.
- Valdric vs Oboro: Two crowns, one throne — Red Star Empire vs Scarlet Eclipse.
- Suzume vs Jin: High-speed ninja vs courier duel.
- Volta vs Haruki: Android asks the gentle archivist what makes a heart courageous.
- Akio vs Kaito: Classic shonen rivalry — "Loser buys ramen!"
- Marlow's Pirate Parrot: El Viento Salado's first mate swoops across the screen on Supers or 6+ hit combos.
- 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/esandanswer_pt/en/esround-start taunt pools.[[matchup]]:fighters = [a, b]ormirror = true,style,sprite,sfx,color, localizedtitle_*andsub_*.[[stage_interaction]]:fighter+stage_contains = [...].[[fighter_trigger]]:fighterorfighter_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!) andaizen*(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
| Flag | Meaning |
|---|---|
| `--netplay 1 | 2` |
--peer ip:port | the other player's address |
--port n | local UDP port (default 7000 / 7001) |
--chars a,b | character ids or names for P1 and P2 (same on both sides) |
--stage id | stage id or name |
--delay n | input 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 ismatch.clone(); character data (CharDef) is shared throughArc, so a snapshot only copies the moving parts. ume_netplay::Rollbackanswers 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::checksumhashes positions, states, life, power, variables, explods and projectiles. GGRS compares it between peers to detect desyncs.- Inputs are one
u32per 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
Vecor sorted keys, never direct iteration over a rawHashSet/HashMap).
Binary format (ume_netplay::Replay)
A raw stream of recorded inputs:
| Field | Type |
|---|---|
| magic | UMRP |
| version | u32 (1) |
| players | u32 |
| metadata count, then key/value strings | u32 length + UTF-8 |
| frame count | u32 |
| runs | u32 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.
| Field | Meaning |
|---|---|
format / version | ultimate-mugen-replay / 1; a different version is refused with a clear message |
label, saved_at | name shown in the browser and the Unix timestamp (sorted by it) |
mode | Arcade, Cpu, Versus, Training, Watch, TeamSeq, TeamSimul, TeamTag |
chars, stage, palettes | fighter ids, stage id and the palette of each side |
seed | initial RNG seed of the match (replays restore it before the first tick) |
teams, simul, tag | team line-ups by fighter id (team modes) |
rules | rounds, round time, life %, single round, pushbox, shared team life, game speed |
inputs | run-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:
| Key | Action |
|---|---|
| ↑ / ↓, Enter | pick and play |
| R | rename (Enter confirms, Esc cancels) |
| Delete (twice) | delete the selected file |
| S | toggle sorting between date and name |
| Esc | back to the menu |
Playback keys:
| Key | Action |
|---|---|
| Space / Start | pause and resume |
| 1 / 2 / 4 | playback speed 1x, 2x, 4x |
. or → while paused | advance one frame |
| Esc | leave 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:
- 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.
- 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.
- 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.
- 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.
- Taoist Chi & Wind-Silk (Yu-Chi): Practiced by Lian Feng. Focuses on deflection, gravitational redistribution, and fluid roundhouse kicks that ripple through kinetic space.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Lunar Requiem (Kurogane Tsuki): Channelled by Shion Kurogane. Gravitational tides of the Pale Moon condensed into an impossibly heavy broadsword.
- Shadow Lotus Mirage (Kagerou-Ryu): Inherited by Suzume Kagerou. Phantom displacement, sensory blind-spot manipulation, and silent assassination daggers.
- 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
| ID | Name | Country | Alignment | Role / Archetype | Home Stage | Awakened Form |
|---|---|---|---|---|---|---|
kaito | Kaito Arashi | Japan | Hero | Wandering Storm Karateka | Sunset Dojo Roof (dojo) | Eye of the Storm |
shion | Shion Kurogane | Egypt | Anti-Hero | Exiled Pale Moon Greatswordsman | Moonlit Bamboo Grove (bamboo) | Full Moon |
akio | Akio Hoshi | Mexico | Hero | Hot-Blooded Starfall Striker | Sunset Dojo Roof (dojo) | Starlight |
suzume | Suzume Kagerou | Vietnam | Anti-Hero | Shadow Kunoichi of the Crimson Lotus | Moonlit Bamboo Grove (bamboo) | Dark Lotus |
bruno | Bruno "Bulldozer" Volk | Brazil | Hero | Undefeated Heavyweight Brawler | Hinterland Plaza — Brazil (brazil) | Ring Fury |
sylene | Sylene Vashti | Norway | Neutral | Exiled Glacial Crown Sovereign | Rocky Plateau (plains) | Winter Queen |
volta | VX-9 Volta | United States | Hero | Sentient Cybernetic Android | Neo-Metropolis 2099 (neon) | Overcharge |
lian | Lian Feng | China | Hero | Jade Lantern Kick Grandmaster | Moonlit Bamboo Grove (bamboo) | Jade Dragon |
garan | Garan the Ashen Oni | Netherworld | Villain | Ancient Demonic Calamity | Volcanic Crater (volcano) | Awakened Oni |
marlow | Captain Marlow Reyes | Spain | Anti-Hero | Swashbuckling Sky Galleon Buccaneer | Rocky Plateau (plains) | Captain Tempest |
kaname | Kaname Fuyutsuki | Switzerland | Neutral / Lawful | Everwinter Frost Samurai Judge | Gate of Spirits (spirit) | Spiritual Blade |
jin | Jin Kazaguruma | Jamaica | Hero | Swift Gale Shinobi Acrobat | Moonlit Bamboo Grove (bamboo) | Typhoon |
daichi | Daichi Ginrou | Mongolia | Hero | Celestial Peak Golden Ki Wolf | Rocky Plateau (plains) | Lupine Instinct |
valdric | Valdric Morn | Germany | Villain | Technocratic Imperial Warlord Prince | Neo-Metropolis 2099 (neon) | Scarlet Dominance |
haruki | Haruki Sumi | South Korea | Hero | Reluctant Archivist / Sealed Calamity | Gate of Spirits (spirit) | Contained Fury |
oboro | Mikazuki Oboro | Eclipse Realm | Supreme Villain (Boss) | Eldritch Illusionist Sovereign | Gate of Spirits / Volcano (spirit/volcano) | Awakened Veil |
Character Dossiers
1. Kaito Arashi (嵐 海斗)
| Visual Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Chronicles of the Storm Road (Crônicas da Estrada da Tempestade) ID: kaito | Author: Ultimate MUGENOrigin: 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) |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Requiem of the Pale Moon (Réquiem da Lua Pálida) ID: shion | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Starfall Dojo (Dojo da Queda Estelar) ID: akio | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Shinobi of the Crimson Lotus (Shinobi do Lótus Carmesim) ID: suzume | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Iron Ring Federation (Federação do Ringue de Ferro) ID: bruno | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Saga of the Glacial Crown (Saga da Coroa Glacial) ID: sylene | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Neon Grid Protocol (Protocolo Grade Neon) ID: volta | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Tales of the Jade Lantern (Contos da Lanterna de Jade) ID: lian | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Legends of the Ashen Gate (Lendas do Portão de Cinzas) ID: garan | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Corsairs of the Salty Wind (Corsários do Vento Salgado) ID: marlow | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Chronicles of the Everwinter Blade (Crônicas da Lâmina do Inverno Eterno) ID: kaname | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Winds of the Hidden Valley Village (Ventos da Vila Escondida no Vale) ID: jin | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Legends of the Celestial Peak Fist (Lendas do Punho do Pico Celeste) ID: daichi | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Chronicles of the Red Star Empire (Crônicas do Império da Estrela Rubra) ID: valdric | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Twilight Library Archives (Arquivos da Biblioteca do Crepúsculo) ID: haruki | Author: Ultimate MUGENOrigin: 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 |
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 Identity | Combat Profile |
|---|---|
Avatar Portrait | Series: Scarlet Eclipse — Final Boss (Eclipse Escarlate — Chefe Final) ID: oboro | Author: Ultimate MUGENOrigin: 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 |
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:
| Addition | Input | Notes |
|---|---|---|
| EX projectile | fireball motion + x+y | 250 meter, stronger multi-hit shot |
| EX anti-air | uppercut motion + y+b | 500 meter, longer invulnerability |
| Overhead | x+b | high-guard medium hit |
| Crouch launcher | crouch + y | starts juggles |
| Dive strike | air y | ground-bounces the opponent |
| Level 3 hyper | super motion + x+y | costs the full 3000 meter |
| Awakened special | fireball motion + a+b | only while transformed, three-way spread |
| Transformation | L3+R3 / awaken | spends meter, boosts attack and movement, unlocks form moves and increases damage taken on unguarded hits |
| Slide kick | F+a | low launching mixup against the overhead |
| Escape burst | x+a+b | 500 meter, breaks out of hit-stun |
| Ascended form | second transformation | 2000 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
| Symptom | Likely cause | What to do |
|---|---|---|
| Character missing from select | .def not in mugen/chars/<name>/ or a parse error | Run mugen_check on the folder and read the error |
| Invisible or square sprites | Sprite missing from the .sff or wrong palette | sprite_audit lists the broken references |
| Fighter floats or sinks | A state that never returns to the ground | hover_check with TRACE=1 |
| HD character too big or small | localcoord missing in the .def | Add localcoord = 1280, 720 to [Info] |
| Move has no effect | Controller not implemented yet | See the list in CNS scripts |
| UMF does not load | Invalid JSON or a missing required field | cargo run --release prints the serde_json error with line and column |
| Game is slow | High art resolution | Settings → Video → Quality, or quality=1 in the .cfg |
| Too many flashes | Light sensitivity | impact_lv=0 in the .cfg |
| Fighter keeps walking on its own and commands stop coming out | Key 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 found | Executable run from another directory | Set 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.
| Controller | Decision | Reason |
|---|---|---|
Storyboard | Planned | Needs the screenpack/storyboard runtime; tracked with the screenpack work |
Dialogue | Planned | Same runtime as Storyboard |
MatchRestart | Planned | Needs the rules surface and a deterministic restart path |
LifebarAction | Planned | Needs the fight.def lifebar renderer |
ChangeMovelist | Planned | Needs a per-match move list; the debug move list is read-only today |
LoadFile | Rejected by design | Characters run inside a deterministic match; disk reads from scripts are not allowed |
SaveFile | Rejected by design | Same sandbox rule as LoadFile |
SaveState | Rejected by design | No rollback snapshot in the engine; replaying the input stream is the supported path |
LoadState | Rejected by design | Same as SaveState |
ShaderSet | Rejected by design | Shaders 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
| Behaviour | M.U.G.E.N | Ultimate MUGEN | Reason |
|---|---|---|---|
Airborne hit state with physics = N | No gravity: a fighter hit by repeated yvel = 0 attacks stays in mid-air | The fighter falls, as if its state had ground-or-air gravity | Stops 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.
| Place | Purpose | Typical files |
|---|---|---|
| Engine and screenpack layer | Menus, game modes, select screen, win screen, hooks | main.lua, start.lua, motif and module files |
| External modules | Optional add-ons loaded by the engine: extra modes, stats, training tools | external/mods/*.lua |
| Fighter DEF | arcadepath in [Arcade]: that fighter's own arcade route, storyboards and rivals | arcade.lua next to the .def |
| Content packs | A 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
.luafiles 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_checkreports unsupported controllers, triggers and parameters, but not stray.luafiles.
Alternatives without Lua
| Lua use | Replacement |
|---|---|
| Menus and screens | Screenpack (system.def, fight.def) and the Rust menu code, see Screenpacks |
| Game modes | Rust modes and data, see Game modes |
| Fighter behaviour and AI | CNS or ZSS, or UMF JSON, see CNS scripts and Creating a UMF character |
| Custom rules and tweaks | Data fields (TOML or JSON) read by Rust |
Recommendation
- Keep Lua unsupported. Add no runtime.
- Make the importer detect
.luafiles and report them once per character as "ignored: Lua scripts are not supported", so creators know why a menu or mode is missing. - Add the same line to the
mugen_checkreport. - 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
| File | Used for | Source |
|---|---|---|
route_<fighter id>.toml | Arcade route of that fighter | Data folder (next to the executable, app storage on Android, browser storage on the web) |
unlocks.toml | Unlock and hide rules for fighters and stages | Same 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.
| Key | Meaning |
|---|---|
fight | order (1 picks the next regular opponent, 2 or more picks the boss), p2 (fighter ids or names, first match wins), stage, winscreen |
stage | Stage 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. |
storyboard | Plays a .def storyboard from an imported MUGEN pack, including its .sff image layers and .air animations; referenced files resolve relative to the storyboard |
action | clear ends the route |
repeat | 1 to 99 times; when is checked on every repetition |
when | Condition; the step runs only when true |
else | Same 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.
| Variable | Value |
|---|---|
stats.arcade.clear | Arcade clears saved so far |
consecutive_wins, match_no | Fights already planned in this run |
mode | arcade, story, survival, cpu, versus, training, watch or team |
netplay | 1 in an online match, else 0 |
team_size | 1 or 2 (routes only) |
player | Id 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:
| Line | Meaning |
|---|---|
format | umf/2 (umf/1 still loads) |
id | Unique, lowercase, no spaces. It is also the file's internal name |
name, author, color | What the select screen shows. color is the card colour |
extends | Inherit everything from kaito (any loaded fighter or kit works) |
palettes | Recolour. Keys are the colour names of the parent's art (top, trim, hair) |
moves | Change 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 itsidtoassets/chars/index.jsonif you want a set order, and runcargo 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 }]
}
]
inputuses the command syntax:D, DF, F, xis a quarter circle plusx;x+ymeans both at once.kindisnormal,specialorsuper. A normal cancels into specials and supers on hit or block.animmust be the name of an animation in the parent (galehere). Your own animations go in"anims".hits[].atis the frame where the hit goes live.damageis the amount.
More: moves, hits, command syntax.
4. Give it your own look
- Colours only: change
palettes, or addawakeningPalettefor 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 inmugen/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
- 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. - 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.
- Pick the frames: only poses with a PNG in
assets/chars/sprites/<id>/(lsthe folder, checkmeta.json). A frame given as an inline joint pose object is procedural art and is not allowed in anims. - Write the anims as lists of
{pose, ticks, hit?}with the tick counts from the dissection table, then the moves that use them.atis the one-based frame that carries the hit, projectile or velocity. - 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. - 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 pattern | UMF data |
|---|---|
Statedef 200..610 with HitDef | moves[] with kind: normal, when, hits[].pausetime, hits[].hitstun |
trigger = movehit, numhelper cancels | cancels, rekka {after, window, contact} |
Projectile with projhits, projpriority | projectile {at, speed, hits, priority, removeTime} |
| Air fireball statedef | Automatic: 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 counter | parry {window} |
TargetBind throw | throw {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, EnvShake | kind: 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:
| Change | Source 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 15 | Normal 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 spout | Aizen 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 forward | Goku 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 charge | Goku 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 state | Aizen clone (state 700) |
stats.airDashes = 1 | Aizen 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
| Area | In the bundle |
|---|---|
| States and controllers | mugen.cns, mugen.st, mugen.stcommon verbatim (CNS and ZSS), including helpers, Statedef -2/-3, AI and custom throws |
| Commands | mugen.cmd verbatim: [Defaults], every [Command] and the Statedef -1 routes |
| Constants | parsed from the original [Data], [Size], [Velocity], [Movement] with the same localcoord scaling |
| Animations | mugen.anims: every action with offset, ticks, flip, blend and alpha, scale, angle, every Clsn1/Clsn2 box, loopstart |
| Sprites | one indexed PNG per SFF sprite (same indices and palette), true color as RGBA, SFF order and duplicates kept for palette selection |
| Palettes | SFF palettes (sffpal_<k>.png) and pal1.act..pal12.act: palette swaps and RemapPal/PalFX see the same colors |
| Sounds | every .snd entry as snd_g_i.wav |
| UMF-only fields | profile (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 -1command 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 pack | UMF block | Status |
|---|---|---|
Fireball helper, Projectile | projectile | existing |
Ki volley (several Projectile controllers, one per frame) | projectile.repeat | new |
Teleport behind or to the rival (PosAdd p2dist, Turn) | blink (behind, front, above, back) and the older teleport | new |
Charge flash, aura burst, Explod of an animation | vfx | new |
EnvShake outside a hit | quake | new |
Beam with many hits (projhits) | projectile.hits | existing |
Flight (physics = N), clone helper, form (var flag) | abilities.fly, helpers.clones, abilities.forms | existing |
Rush with several HitDefs | hits[] plus moves[].vel | existing |
Helper with its own AI, Statedef -2/-3 logic, Lua/ZSS | scripts, or stay in the legacy format | not 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 } } }
| Field | Meaning |
|---|---|
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.repeat | Fans 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
atagainst 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
- Copy a finished fighter as a base:
cp assets/chars/kaito.json assets/chars/mine.json. - Change
id(unique, lowercase, no spaces),name,series,authorandcolor. - Optional: add the
idtoassets/chars/index.jsonto set its order in the select screen. Missing ones follow alphabetically. - Run
cargo run --release.build.rsembeds every.jsonin the folder into the executable. - Test in Training with
F2on 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": []
}
| Field | Required | Description |
|---|---|---|
format | yes | umf/2 (umf/1 still loads) |
extends | no | Fighter or kit ids to inherit from, see Reuse. Required fields may then come from the parent |
id, name, series, author, color | yes | Identity; color is the select card color |
boss | no | true hides it from select and makes it the final Arcade boss |
npc | no | true hides it from select and every random pool; used by Story mode thugs, no boss empowerment |
profile | no | Nationality and biography, see Profile |
speed | no | Animation speed multiplier (>1 = faster moves) |
stats | no | Attributes, table below |
art | yes | Art: style.colors drives palette recolouring of the PNG sprites, poses names the pose keys |
palettes | no | Alternate colors; each item overrides keys of art.style.colors |
awakeningPalette | no | Color overrides applied on top of the selected palette while awakened; effect sprites are unchanged |
anims | yes | Animations by name |
moves | yes | Moves |
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):
| Tool | Where | What it does |
|---|---|---|
"extends": "kaito" | top level | Inherits 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 move | Clones 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 inanimsreplaces the inherited one as a whole. A value ofnullremoves the inherited key. movesare matched byid. 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,bossandnpcare never inherited from a fighter. spriteSetlets the new fighter reuse the parent's pixel-art pack. Recolour it withpalettesand leaveart.style.colorsinherited: 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), andextendschains 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 byid. Aprofilefield inside the fighter file wins over that table, so imported UMF fighters carry their own. countrypicks the flag drawn next to the nationality:jp,br,no,us,cn,es,mn,de,kr,ar,au,ru,fr, plus the fictionalunderworldandeclipse. Flags are vector shapes insrc/flag/designs.rs(no image files); add a new entry there for another country. An unknown code simply shows no flag.UME_SHOTS_ONLY=flagssaves 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.
tagsis 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-callerbecomes STORM CALLER). The list lives insrc/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 profilechecks that every fighter file ofassets/charshas a complete profile in the three languages.
stats
| Field | Example | Meaning |
|---|---|---|
life | 1000 | Life |
power | 3000 | Max super meter (1000 per level) |
attack / defense | 100 | Multipliers 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 |
airDashes | 1 | Air dashes per jump (movement.airdash.num) |
height | 100 | Body 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 field | Description |
|---|---|
pose | Name of a pose in art.poses, or an inline pose object |
ticks | Duration in ticks (60 per second); -1 = forever |
hit | Active hitbox: part (limb or weapon) + radius, or box [x1, y1, x2, y2] |
hurt | "none" removes the hurtbox (invincible frame) |
effect | Draws an effect instead of the body (projectiles, sparks), see Effect frames |
offset | Drawing offset [x, y] |
loop | Frame 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 most0.10 Hin front of the origin and reaches at least0.60 H(the M.U.G.E.N median for punches is0.72 H, kicks0.80 H); - at least
0.36 Htall and never above0.95 Hor below the floor (M.U.G.E.N punches sit between-0.75 Hand-0.33 H, kicks down to-0.05 H); - the standing hurtbox is
0.46 Hwide (M.U.G.E.N median0.46 H) and the crouching one0.67 Htall (M.U.G.E.N median0.67 H); - an explicit
boxis 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.
| Name | Action | Name | Action |
|---|---|---|---|
idle | 0 | guardHit | 150 |
turn | 5 | crouchGuardHit | 152 |
crouchTurn | 6 | airGuardHit | 154 |
crouchStart / crouch / crouchEnd | 10 / 11 / 12 | lose / draw / win | 170 / 175 / 181 |
walk / walkBack | 20 / 21 | intro | 190 |
jumpStart / jumpUp / jumpFwd / jumpBack / jumpDown | 40–44 | taunt / powerUp | 195 / 196 |
land | 47 | defeat1…defeat4 | 197–200 |
run / hop | 100 / 105 | hitLight / hitMedium / hitHeavy | 5000–5002 |
guardStart / crouchGuardStart / airGuardStart | 120–122 | hitLowLight / hitLowMedium / hitLowHeavy | 5010–5012 |
guard / crouchGuard / airGuard | 130–132 | hitCrouch / hitAir | 5020 / 5030 |
guardEnd | 140 | airRecover / fall / trip | 5040 / 5050 / 5070 |
bounce / bounceAir / lieDown / getUp / dead | 5100 / 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 } }
| Field | Values | Effect |
|---|---|---|
id, name | text | Identifier and name in the move list |
input | command syntax, below | Command |
simple | sp1 sp2 sp3 super | One-button shortcut (keys 1/2/3, touch) |
kind | normal special super | Priority and cancels: normal → special → super on hit or guard |
when | stand (default) crouch air | State the move starts from |
anim | name in anims | Move animation |
hits | list | One HitDef per item |
moves | [{ "at": frame, "vel": [x, y] }] | VelSet on the frame; use null to keep an axis |
projectile | object or list | Projectiles |
cost | number | Meter spent; super defaults to 1000 |
invuln | [start, end] | Invincible frames |
teleport | frame, 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) |
fx | aura | Extra 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)) |
voice | 1000, 0 | Character sound group and index played at move start, when that sample is bundled |
airPhysics | true | Keeps air physics |
cancels | list of move ids | This 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 |
timestop | ticks | Freezes everyone else |
burst | true | Combo 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 |
flight | true | 8-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
cancelsfollows the genre rules: a normal cancels into any stronger normal (light<medium<heavyby 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 explicitcancels; supers cancel out of any move. - Explicit routes.
"cancels": ["strong", "rush"]onjabmakesstrongandrushacceptjabon contact. A projectile special can be cancelled once its projectile touches the opponent. Anairspecial 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 elementat(give that frame ahitbox), the victim is held onat + 1, takes the damage onat + 2and is launched, so the animation needs at leastat + 2frames. Throws ignore guarding and whiff when the target is out of reach.armor(hitsabsorbed, optionalthreshold= damage above which the armor breaks). From move start until the last hit frame the move takes 35 % chip damage and is not interrupted; oncehitsare spent the next hit staggers normally.- Multi-hit glue. Moves with three or more
hitspush 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. Setknockbackexplicitly 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[]
| Field | Default | Description |
|---|---|---|
at | — | Frame (1 = first) where the HitDef activates |
damage | — | Damage |
guardDamage | damage / 8 | Damage on block |
level | medium | light (hitstop 9, hitstun 12), medium (11, 16), heavy (13, 20) |
guard | mid | high, low, mid or unblockable |
knockback / airKnockback | by level | Velocity [x, y] applied to the opponent |
launch | false | Knocks down |
hitstop, hitstun, spark, shake | by level | Fine tuning |
projectile
| Field | Description |
|---|---|
at | Frame it is fired on |
anim / hitAnim | Flight / impact animation |
speed / accel | Velocity and acceleration [x, y] |
offset | Spawn position [x, y] relative to the fighter |
damage, level, launch, knockback | As in hits |
hits | Number of hits |
removeTime | Ticks until it disappears |
priority | Priority 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
| Symbol | Meaning | Example |
|---|---|---|
F B U D / DF DB UF UB | Directions (relative to facing) | D, DF, F, x |
x y z a b c | Buttons (s = start) | x |
, | In sequence | F, F |
+ | At the same time | x+y |
~ | Release | ~D, DF, F, x |
/ | Hold | /B, F, x |
$ | Inclusive direction ($D accepts DB, D, DF) | $D, x |
> | No other input between steps | F, >F |
N | Neutral 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:
| Section | Replaces in M.U.G.E.N / ZSS | Key capabilities |
|---|---|---|
helpers.stand | Manual Helper(keyctrl=1) + BindToParent + HitOverride | Independent hitbox/hurtbox Stand fighting alongside parent (input or triggerMove), toggle summon/recall, optional meter drain, lifeTransfer to parent via ModifyPlayer |
helpers.clones | Manual AI clone Helpers | Kage 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 choreography | p2Anim (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[].cinematic | Movie direction on attacks & supers | letterbox, 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 |
bossRules | UI-breaking [StateDef -4] AssertSpecial / Text / ModifyPlayer | hideHud, hideLifeBar, hidePowerBar, hideTimer, freezeTimer, continuous or triggered HUD texts[], modifyPlayer[] (self or "enemy"), phases[] (lifeBelowRatio, when, once, attackMul, defenceMul) |
scripts | Raw .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-filledClsn1/Clsn2boxes, amber pushbox, pivot crosshairs, velocity vectors,helper/targetlink tethers, stage bounds, top toolbar, and a 4-tab inspector (F4:Overview/Vars & Maps/Clipboard & HitDef/Console & Engine);F5freezes simulation;F6or.advances+1 frame;F7cycles speed (1x/0.5x/0.25x/0.1x);F8cycles 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).
| File | Poses that use it |
|---|---|
01_idle | idle0, walk, run, crouch, guard, jump and every pose with no art of its own |
02_attack1 … 06_victory | jab / punch, kick, special, projectile and victory / taunt poses |
07_idle1, 08_idle2 | the other breathing frames of idle (idle3 reuses 07_idle1) |
09_hit1, 10_hit2, 11_hit3 | hitH1, hitH2, hitH3 (damage) |
12_fall1, 13_fall2 | hitAir1/fall1/trip and hitAir2/fall2/bounce (knocked into the air) |
14_lie | lie, dead, lose and every df* pose (knocked out, with a low and wide hurt box) |
15_power0, 16_power1, 17_power2 | powerup0, 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>.pngfor the SFF palettes,pal1.act..pal12.act, every sound assnd_g_i.wav, andmeta.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
| Area | Definition |
|---|---|
| Identity and profile | id (^[a-z0-9][a-z0-9_-]*$), profile with en, pt, es texts, element, alignment |
stats, passives, abilities | Typed numbers, fly, teleport, superSpeed, charge, forms |
anims | frames as "pose*ticks" strings or objects with pose, sprite, effect, hit, hurt, offset, ticks |
moves | kind, 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, scripts | Stand, clones, boss phases, ZSS and CNS hooks |
Kits and extends | A 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
| Key | Default | Range | Meaning |
|---|---|---|---|
maxMultiplier | 4.0 | 1 to 6 | Damage multiplier reached at fullRatio |
exponent | 1.0 | 0.25 to 4 | 1 is linear, above 1 stays low longer then ramps, below 1 ramps early |
startRatio | 1.0 | 0.05 to 1 | Life share where the bonus starts (1.0 = from full life) |
fullRatio | 0.01 | 0 to startRatio - 0.01 | Life 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.
| Key | Default | Effect per stack |
|---|---|---|
damageGain | 0.05 | Damage multiplier 1 + damageGain * stacks |
defenceGain | 0 | Defence multiplier 1 + defenceGain * stacks (capped at 3x) |
speedGain | 0 | Horizontal movement speed 1 + speedGain * stacks (capped at 1.5x, not applied while being hit) |
maxStacks | 10 | Stack ceiling |
decayTicks | 0 | When above 0, one stack is lost after this many ticks without gaining one |
resetOnRound | true | Stacks are cleared when a round starts |
specials, supers | true | Which 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
| Key | Default | Range | Meaning |
|---|---|---|---|
maxMultiplier | 5.0 | 1 to 6 | Damage multiplier reached at the end of the ramp |
startSeconds | 0 | 0 and up | Seconds of fight before the bonus starts |
rampSeconds | 60 | above 0 | Seconds from the start to the maximum |
exponent | 1.0 | 0.25 to 4 | 1 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.
| Rule | Value |
|---|---|
| Cost | 500 power |
| Window | 1 to 45 ticks after contact (CONTACT_WINDOW) |
| Input buffer | The press is remembered for 6 ticks, so pressing a hair early still works |
| Cooldown | 40 ticks between cancels |
| Condition | movetype = A, the move hit or was guarded, the fighter is alive and the round is running |
| Not allowed | Whiffed 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
- 500 power is spent and the fighter changes to the neutral state of its stance (
0standing,11crouching,50airborne) with control. - 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.
- 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. - The match drops into slow motion for 15 ticks, the fighter flashes blue and leaves an afterimage trail.
- 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
| Piece | File |
|---|---|
| State, buffer, constants | crates/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 lifebar | src/hud/rush_marker.rs (UME_SHOTS_ONLY=rush captures it) |
| Event for the presentation | Event::Rush { fighter, side, guarded } in crates/engine/src/matchs/types.rs |
| Effects (rings, glow, sparks, tag, Overdrive embers) | src/vfx/rush.rs |
| Rollback checksum | overdrive, cooldown and cancels in crates/netplay/src/checksum.rs |
| Tests | cargo 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.
| Hits | Badge |
|---|---|
| 3-5 | GOOD |
| 6-9 | GREAT! |
| 10-14 | SUPERB! |
| 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, Jingustdash, Kaitotempest, Garanascent, Brunobullrush, Shioncleave, Daichidaybreak. - Ground bounce: Garan
brimstone, Daichilandslide.
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.
| Input | Move id | Role |
|---|---|---|
B+x | string_a | Opener. Also reachable by cancelling jab on contact |
B+a | string_b | Middle link. Cancel from string_a on contact |
B+y | string_c | Finisher. 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:
| Fighter | Style | Route |
|---|---|---|
| Akio, Jin, Suzume, Phantom, Razor | Rushdown: three to four fast light hits, long advance | string_a > string_b > string_c > starburst/chakram/volley |
| Bruno, Brute, Colossus, Valdric | Heavy: two slow hits, wall bounce finisher with armor | string_a > string_c > quake/ridgeblast/royallance |
| Kaname, Shion, Marlow, Oboro | Blade: weapon strikes, ice/water element where it fits | string_a > string_b > frost arc/crescent/riptide |
| Garan, Sylene, Kaito, Volta, Spitfire | Elemental: every hit carries fire, ice, wind or lightning stun | string_b > string_c > element special |
| Garan, Lian, Jin, Suzume, Phantom, Razor | Ground-bounce finisher for a follow-up juggle | string_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.
| Press | Chain |
|---|---|
x | jab > jab2 > jab3 (finisher with small pushback, cancels into the two signature specials) |
a | lkick > lkick2 > lkick3 |
y | strong > strong2 |
crouch x | cjab > cjab2 |
air x | ajab > 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.
| Move | Input | Idea |
|---|---|---|
Frostmoon Arc (frostarc) | ~D, DF, F, x | Blade scattered into petals |
Piercing Needle Beam (byakurai) | ~D, DF, F, y | Very fast thin beam |
Crimson Cannon (shakkaho) | ~D, DB, B, x | Heavy red fireball, two hits |
Flash Step Behind (shunpo_behind) | D, D, a | Flash step that ends in a cut |
Thousand Petal Storm (kageyoshi) | ~D, DF, F, D, DF, F, y | Super: 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 }
type | Shape |
|---|---|
orb (default), burst | Energy ball / explosion |
dragon | Forward-facing energy dragon with a trailing body |
beam (length) | Horizontal ray |
pillar (length) | Vertical column |
shockwave | Ground wave |
slash, wave, water | Arc cut |
kunai, shuriken | Throwables |
ice, fire, darkfire, lightning, petal | Elements |
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):
| Feature | Behavior |
|---|---|
N step | Neutral 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 states | When 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.
| Parameter | Default | Meaning |
|---|---|---|
scale | 1 | Requested camera scale |
time | 1 | Ticks the request stays active; re-trigger every tick to hold it |
delta | 0 | Added to the requested scale after every tick of the request (a ramp) |
pos | 0, 0 | Camera focus offset in the player's localcoord |
lag | 0 | 0 jumps to the requested scale in one tick, values towards 1 ease slowly (1 - lag of the remaining distance per tick) |
zoomindelay | 0 | Ticks to wait before a zoom-in (scale > 1) starts |
bound | 1 | 1 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 bypos(player localcoord) and optionally sets the camera scale withzoom. It uses the same machinery asZoom(see above):bound = 1keeps the offset inside the stage bounds and the scale inside the stage zoom limits,lageases the zoom,timeis the number of ticks the request stays active. Withoutzoomthe current scale is kept.Cinema(bars,slow,invert,lines,flash): activates widescreen letterbox bars (bars0..1), deterministic slow motion (slowticks), an impact-frame invert flash (invert = 1), speed lines (lines0..1), and a flash color (flash = r, g, b).SlowMo(time): enables deterministic slow motion fortimeticks.GroundLevelOffset value = n: raises the floor under this character bynpixels (negative digs it), so it stands on the raised floor with normal landing, ground physics and ground/air hit detection.Pos Yis measured from the character's own floor (0 while standing on it),ScreenPos Yand the spawn height of projectiles, explods and helpers include the offset. The offset resets at round start.DepthandDepthBoundare 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).
| Trigger | Zoom-relative | Meaning |
|---|---|---|
ScreenWidth, ScreenHeight | yes | Size of the visible area (GameWidth / GameHeight keep returning the raw view size in game pixels) |
TopBoundDist | yes | Distance from the player's position up to the highest point the stage lets the camera show (boundhigh, raised by dynamicboundhigh) |
TopBoundBodyDist | yes | Same, minus the player's size.height (head to ceiling) |
BotBoundDist, BotBoundBodyDist | yes | Distance 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, StageBackEdgeDist | yes | Distance 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) | no | Number of stage background layers, optionally only those with the given id |
StageBGVar(id, name) | no | Live 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) | no | Number from the stage's [Constants] group (0 when missing or on built-in stages) |
Const1080p(n) | no | n scaled from a 1920 pixel wide design to the player's localcoord |
LocalCoord X / LocalCoord Y | no | The player's localcoord width / height |
Angle, Scale X/Y, Alpha X/Y, SprPriority, LayerNo | no | The 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), CameraZoom | yes | See "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:=invar(n) := value.
Pause and freeze rules
| Entity | Hit pause (attacker) / hit shake (defender) | Pause | SuperPause |
|---|---|---|---|
| Fighter or helper | Animation, Time, physics and timers stop; only controllers with ignorehitpause = 1 run | Frozen, except the pauser during movetime and helpers with pausemovetime ticks left | Frozen, except the pauser during movetime and helpers with supermovetime ticks left |
| Explod | Keeps going with ignorehitpause = 1 (default); with 0 it stops while its owner is in hit pause or hit shake, position binding included | Frozen unless pausemovetime ticks are left | Frozen unless supermovetime ticks are left |
| Projectile | Not affected by the owner's hit pause | Frozen unless pausemovetime ticks are left | Frozen unless supermovetime ticks are left |
- A
pausemovetime/supermovetimebudget is spent one tick per frozen frame and only by its own kind of pause. AnimTime,AnimElemTime,AnimElemNoandTimehold their value for the whole hit pause or shake and resume on the first free tick.HitPauseTimeis the attacker's remaining hit pause;GetHitVar(hitshaketime)andHitShakeOverdescribe the defender's shake. Every otherGetHitVarfield 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
F2in 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):
| Finding | Meaning |
|---|---|
| unsupported controller | the type has no implementation |
| unknown trigger | the trigger name is not evaluated by the engine |
| unsupported redirection / string trigger | a redirection kind (partner, ...) or a string comparison (p3name = ...) the engine does not resolve |
| unknown parameter | no code path of the controller reads that parameter |
| unknown AssertSpecial flag | the 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).
| Trigger | Variables |
|---|---|
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 SpritePlayerNo | total 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)
| Flag | Effect |
|---|---|
Intro | Holds the round in the intro (capped at 10 s) |
RoundNotOver | Holds the round-over state (capped at 15 s) |
TimerFreeze | Round timer stops |
RoundFreeze | Round timer and round state clock stop |
RoundNotSkip | The attack-button skip of the first-round face-off is disabled |
CameraFreeze | The camera does not move |
GlobalNoKO | Nobody is KO'd; life stops at 0 and the round goes on |
GlobalNoShadow | No shadows or reflections |
NoKOSlow | No slow motion on KO |
NoKOSnd | No KO sound |
NoMusic | Music is muted |
NoBG / NoFG | Back / front stage layers are not drawn |
NoBarDisplay | The whole fight HUD (bars, timer, partner tiles, combo counter) is hidden |
NoTimeDisplay | The timer is hidden |
SkipFightDisplay / SkipRoundDisplay / SkipKODisplay / SkipWinDisplay | The "FIGHT!", "ROUND n", "K.O." or win announcement is not shown |
Per-character flags (58 + Immovable)
| Flag | Effect |
|---|---|
Invisible, NoShadow | Sprite or shadow is not drawn |
Unguardable | The player's attacks cannot be guarded |
NoStandGuard, NoCrouchGuard, NoAirGuard | The player cannot guard in that state type, and does not enter the guard state |
NoJuggleCheck | Juggle points are not enforced against the player's hits |
NoAutoTurn, NoWalk, NoJump, NoAirJump, NoCrouch, NoStand | Disable the built-in turn, walk, jump, double jump, crouch and stand-up transitions |
NoHardcodedKeys | Disables every built-in key transition (walk, jump, crouch, guard) |
AutoGuard | Guards as if back were held |
NoKO | This 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, NoGuardDamage | Hits / guarded hits do no life damage to the player |
NoRedLifeDamage | Hits do not raise the player's red life |
NoDizzyPointsDamage | Hits do not lower the player's dizzy points |
NoGuardPointsDamage | Guarded hits do not lower the player's guard points |
NoScore | Hits do not change the player's score |
NoGuardKO | A guarded hit cannot kill the player |
NoKOFall | A KO'ing hit does not force the fall |
NoKOVelocity | A KO'ing hit does not add the extra KO launch velocity |
NoFallHitFlag | The player ignores the F hitflag while falling |
NoCornerPush | The player is not pushed back after hitting an opponent in the corner |
Immovable | Engine extension: the opponent's pushbox cannot move the player |
AnimateHitPause | The animation keeps playing during hit pause |
AnimFreeze | The animation stops |
NoInput | Button and direction input is cleared |
PostRoundInput | Commands are read after the round ended |
RunFirst, RunLast | The player's states run before / after everyone else's on the next tick |
NoDestroySelf | DestroySelf has no effect |
NoMakeDust | The built-in dust effect is not spawned |
NoAILevel | AILevel returns 0 for the player |
DrawUnder | The player is drawn behind other fighters |
NoLifeBarDisplay, NoPowerBarDisplay, NoFaceDisplay, NoNameDisplay, NoWinIconDisplay, NoComboDisplay | The 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
redlifevalue fromRedLife, so the red bar grows over the real life bar. A guarded hit uses the secondredlifevalue. LifeAdd,LifeSet,RedLifeAddandRedLifeSetkeep the rule above. WhenLiferises overRedLife,RedLifefollows it.- A new round resets
RedLifetoLifeMax. NoRedLifeDamagestops 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
dizzypointsvalue, multiplied by the defender's defence multiplier. - At 0 the defender enters common state 5300 (dizzy) with
Dizzyset and control removed. Airborne or falling defenders do not become dizzy. - The points refill as the state starts;
Dizzyclears when the state ends and the defender is out of hit state. NoDizzyPointsDamagestops hits from lowering the points.
Guard points
GuardPoints start at GuardPointsMax (data.guardpoints, data.life when absent).
- A guarded hit subtracts the HitDef
guardpointsvalue, multiplied by the defender's defence multiplier. - At 0 the defender enters common state 5400 (guard break) with
GuardBreakset and control removed. - The points refill as the state starts;
GuardBreakclears when the state ends and the defender is out of hit state. NoGuardPointsDamagestops 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:
| Constant | Default | Super default (attr has H) |
|---|---|---|
lifetoredlifemul | 0.75 | 0.75 |
lifetodizzypointsmul | 1.8 | 0 |
lifetoguardpointsmul | 1.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 }
}
| Feature | Status |
|---|---|
[StateDef n; key: value;], negative states | Supported |
if / else if / else, switch / case / default | Supported |
persistent(n), ignorehitpause | Supported |
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 / continue | Supported |
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.
| Controller | Parameters | Effect |
|---|---|---|
MapSet | map, value, type (1 = add) | Sets a named value on the player |
MapAdd | map, value | Adds to a named value |
MapReset | map (omit for all keys) | Removes one key, or every key, from the player's map |
TeamMapSet / TeamMapAdd / TeamMapReset | same as MapSet / MapAdd / MapReset | Same operations on the map shared by every player and helper on the same side |
RootMapSet / RootMapAdd / RootMapReset | same as MapSet / MapAdd / MapReset | Same operations on the root player's map |
ParentMapSet / ParentMapAdd / ParentMapReset | same as MapSet / MapAdd / MapReset | Same operations on the parent's map; does nothing without a parent |
RootVarSet / RootVarAdd | var(n), fvar(n), sysvar(n), sysfvar(n) or v / fv + value | Writes variables on the root player, like ParentVarSet does on the parent |
RedLifeSet / RedLifeAdd | value, absolute | Recoverable (red) life, kept between life and lifemax |
DizzyPointsSet / DizzyPointsAdd | value | Stun points, 0..data.dizzypoints |
DizzySet | value | Dizzy flag |
GuardPointsSet / GuardPointsAdd | value | Guard points, 0..data.guardpoints |
GuardBreakSet | value | Guard break flag |
Text | text, params, pos, velocity, scale, color, align, removetime, id | Draws 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) |
RemoveText | id (omit for all) | Removes the player's texts |
TagOut / TagIn | self, stateno, ctrl, partnerstateno, partnerctrl | Moves 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 |
ModifyProjectile | id, velocity, accel, velmul, removetime, projhits, projpriority, projscale | Changes the player's live projectiles |
ModifySnd | channel, pan, abspan, volumescale | Changes sounds already playing on a channel |
PlayBGM | bgm, volume, loop, loopstart, loopend, freqmul | Starts 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 |
StopBGM | Stops the music | |
ModifyBGM | volume, loop, loopstart, loopend, freqmul | volume 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 |
ModifyStageVar | camera.boundleft, camera.boundright, camera.boundhigh, camera.boundlow, camera.verticalfollow, camera.tension, camera.startx, camera.starty, camera.zoomout, stageinfo.zoffset, playerinfo.p1startx, playerinfo.p2startx | Changes 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 |
ModifyStageBG | id (omit or -1 for all layers), visible, enabled, velocity, pos, offset, sinx, siny, anim | Changes background layers of the running stage; pos is absolute, offset is added |
ModifyBGCtrl | id (target layer id), time (start, end, loop), looptime, value, x, y | Edits the stage's BGCtrl entries that target id (all when omitted); the edits last until the round restarts |
ModifyPlayer | id (omit for self), life, lifemax, power, powermax, ctrl, ailevel, redlife, dizzypoints, guardpoints | Whitelisted fields only, always clamped (ailevel 0..8, power lives on the root) |
PrintToConsole | text, params | Appends 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 |
RunState | value | Runs 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 |
Height | value = 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 |
GetHitVarSet | hittype, 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, playerno | Writes the listed GetHitVar fields (type is spelled hittype because type names the controller); GetHitVar(attr) is not available yet |
ModifyHitDef | any HitDef parameter | Overwrites only the listed fields of the HitDef that is active; nothing happens without one |
ModifyReversalDef | any ReversalDef parameter, reversal.attr | Same for the pending ReversalDef |
OverrideClsn | clsn (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 |
ResizeClsn | clsn, index (-1 = all boxes), value = dx1, dy1, dx2, dy2, time | Moves each edge of the box by the given deltas |
TransformClsn | clsn, scale = sx[, sy], offset = x, y, time | Scales then shifts every box of that type |
AssertCommand | value (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 |
AssertInput | value (input bits), time (default 1) | ORs the bits into the player's input for time ticks, so Command matches the injected press |
ShiftInput | value | Positive 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.
| Trigger | Returns |
|---|---|
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 |
RedLife | Red life |
Dizzy, DizzyPoints, DizzyPointsMax | Dizzy flag and points |
GuardBreak, GuardPoints, GuardPointsMax | Guard break flag and points |
StandBy | 1 while tagged out |
NumText | Texts 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 |
NumPartner | Teammates on the same side |
IsAsserted(flag) | 1 while the AssertSpecial flag is on (character or global flag) |
TeamMode | 0 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) |
TeamSize | Members of the player's team (the whole roster in Sequence mode, the fielded players otherwise) |
TeamLeader | PlayerNo of the player's team leader |
NumPlayer | Players in the match (both rosters; 6 for a 3v3 Sequence, 10 for a 5v5 Parallel) |
PlayerNo | 1-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 |
MemberNo | 1-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) |
LastPlayerID | ID of the most recently created player or helper |
IntroState | 1 before the intro starts, 2 while the intro plays, 0 afterwards |
OutroState | 1 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.
| Controller | Status | Notes |
|---|---|---|
MatchRestart | supported | Resets wins and the round counter and restarts at the start of the next tick |
LoadFile, SaveFile | rejected by design | Characters never get file access; content runs in a sandbox |
ShaderSet | rejected by design | The renderer has a fixed pipeline; user shader code is not loaded |
Storyboard, RemoveStoryboard, Dialogue | planned | [SceneDef] files are parsed but there is no storyboard runtime yet |
SaveState, LoadState | planned | Needs the rollback snapshot of the match (see the roadmap) |
LifebarAction | planned | The HUD has no scripting hooks yet |
ChangeMovelist | planned | The 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.defmenu.itemname.*labels replace the main-menu titles (Arcade, Survival, teams, Training, Watch, Exit).select.def[Characters]order drives the select grid order.intro.storyboardtext scenes are played over the arcade opening cutscene, timed by each scene'send.time.fight.deflifebarpos/range.xplace and size the life bars (converted from the packlocalcoordto the 426×240 HUD space); the rest of the HUD stays native.- Parsed sprites/fonts/sounds are kept in
ume_formats::screenpack::Screenpackfor 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
| File | Sections 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 v1 | embedded 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
- Ikemen GO wiki: Screenpack features
- Ikemen GO wiki: Updating to 1.0
- Ikemen GO menu system (DeepWiki)
- Ikemen GO issue 329: KOF98-style versus select
- MUGEN Guild: screen pack docs
- MUGEN Guild: X-Men Children of the Atom screenpack for Ikemen GO
- MUGEN Guild: Street Fighter Alpha Zero screenpack, 16:9 and 4:3
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
| Area | Differential | Ultimate MUGEN |
|---|---|---|
| Structure | One system.def points to select.def, fight.def, sprites, sounds and fonts; any missing file falls back to the default motif | Same layout and fallback, see Screenpacks |
| Select | Grid size and cursor set by parameters, animated portraits, per-character stage and slots | Grid, cursors, team slots and palette row already native, see Character select |
| Versus | Order select on the versus screen, animated portraits, KOF98-style pick | Versus screen with team strips exists; order select is a follow-up |
| Victory | Winner portrait, name and a typed victory quote after Arcade, Versus, Quick Match and Watch | Winner pose and name existed; quote is a follow-up |
| Results | Time, combo and damage grading, time-challenge best times on the select screen | New stats strip (below) |
| Resolution | Packs ship for 4:3 and 16:9 with localcoord | localcoord is converted to the 426x240 HUD space |
| Parser | Unknown fields produce warnings instead of silent failure | Checker 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
- Order select inside the versus screen for team modes.
- Victory quote line typed under the winner name.
- Rank grade (S to D) from time, life left and combo.
- 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):
| Pack | Differential | Takeaway for the engine |
|---|---|---|
| IKEMEN Generations HD (OroCrimson) | Category-first select: up/down picks a category, left/right a character; custom KOF 2002 style lifebars | Category navigation for big rosters |
| Infinite Legacy X HD | Very large slot counts (700 slots); author notes the engine struggles with huge grids | Paging and virtualized grid already exist; keep it that way |
| Capcom vs SNK HD Black Edition | Selectable slot densities (120 to 840) | Grid density as a setting |
| Anything VS Anything | 999 slots navigated only up and down; users report it is slow to pick | Confirms need for jump keys (PgUp/PgDn already in place) |
| Ikemen-GO-Screenpack and PR #56 | Official default motif being replaced with original art and MIT fonts | Reference for a clean default motif |
| Engine PR #4146 | Alpha and blend on every animation and text element; slot cycling; stage select buttons | Per-element alpha is worth copying in our HUD tokens |
| Ikemen-GO-Plus screenpack.lua | Lua hooks read localcoord from system.def | Scripting is out of scope; keep data-driven |
| external-lua-modules | Carousel-style select as external modules | Candidate 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
| Tool | What it does |
|---|---|
slice | Detects 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 |
palettes | Builds .act variants (hue, saturation, brightness presets) from a base .act; index 0 and --keep indices never change |
air | Emits 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
| Key | Meaning |
|---|---|
[defaults] | sprite_manifests, clsn1_height (standing height, grows the attack box), hitsound, guardsound, super_sound, voice_channel |
kind | normal, crouch, air, special, air_special, super, projectile, throw (sets damage, pause, power and attribute defaults) |
state, anim | State number and animation number (default: the state) |
command, command_name, command_time | MUGEN input notation; default name spec_<state> |
frames | [group, item, ticks, "hit"?, {x, y, flip, trans, clsn1, clsn2}?]; "hit" adds an automatic Clsn1 |
hit | HitDef list; elem or elems choose the animation elements (default: first frame with Clsn1); extra adds raw parameters |
sounds, vel, vfx, helpers, cancel, extra, voice | PlaySnd, velocity, Explod, Helper, cancel and raw controllers |
power, superpause | Power cost and SuperPause for supers |
phases | Extra 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 want | Needs code? | Go to |
|---|---|---|
| A new background from your own art, with the M.U.G.E.N format | No | M.U.G.E.N stage |
| More content for one of the five story arenas (objects, music, animated sky) | No | Story arenas |
| A new arena in the story mode or a new built-in arena | Yes, Rust | What needs code |
1. A M.U.G.E.N stage
- Put two files in
mugen/stages/:my-stage.defandmy-stage.sff(the art). - Start from
docs/examples/stage/my-stage.def.
The .def file is plain text with sections:
| Section | What 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:
| What | Where | Notes |
|---|---|---|
| Backdrop strip | assets/stages/story/<arena>.png | One segment per fight (four waves and the boss). Regenerate with python3 tools/story_segments.py |
| Animated background | assets/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 round | assets/story/objects.toml, table [stages.<arena>] | Full format in Stage objects |
| Fight music | tweaks.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 frame0. - Expanded arena dimensions: built-in arenas span
bound_left = -680tobound_right = 680(bound_high = -140,zoom_out = 0.62,zoom_in = 1.05) with0.21panoramic parallax inillustration_layout. - Reactive floors & interactive arena props: all 21 illustrated stages (including
braziland the 14 World Wonders viaStageKind::Arena) renderStageReactground cracks, scorch marks, ripples and impact debris. In Versus/Arcade fights,src/stages/interactive.rsplaces 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). SetUME_STAGE_PROPS=0to 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 insrc/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 fromtweaks.tomlonly. - A
type = parallaxlayer. 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
| Section | Supported 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:
| Key | Meaning |
|---|---|
scalestart = x, y | Base scale of the sprite, anchored at its axis (default 1, 1). |
scaledelta = x, y | Scale 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). |
angle | Rotation in degrees around the sprite axis, counter-clockwise for positive values. |
xshear | Horizontal shear: each row is shifted by xshear times its distance from the axis. |
window = x1, y1, x2, y2 | Clipping rectangle in stage units. |
maskwindow = x1, y1, x2, y2 | Second clipping rectangle; when both are present the layer is clipped to their intersection. |
windowdelta = x, y | How fast the clipping window scrolls with the camera (defaults to the layer delta). |
spacing = x, y | Gap 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
| Key | Default | Meaning |
|---|---|---|
bgmusic | none | Track file (.ogg, .mp3, .flac or .wav) |
bgmvolume | 100 | Percent of the normal music volume |
bgmloopstart, bgmloopend | 0 | Loop 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:
| Type | Look |
|---|---|
aurora | Green-blue bands of light that drift sideways over the top of the screen |
godrays | Light rays fanning out from the top centre |
stars | A starfield that twinkles |
clouds | Soft clouds that drift across the upper part of the screen |
| Key | Default | Meaning |
|---|---|---|
color | 255, 255, 255 | Tint, r, g, b from 0 to 255 |
intensity | 0.6 | Opacity at its brightest, 0 to 1 |
speed | 1 | Speed 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.
| Name | Value |
|---|---|
info.name, info.displayname, info.author, info.mugenversion | text, compared with StageVar(info.author) = "name" (case-insensitive) |
camera.startx, camera.starty, camera.boundleft, camera.boundright, camera.boundhigh, camera.boundlow | numbers |
camera.verticalfollow, camera.tension, camera.zoomin, camera.zoomout | numbers |
playerinfo.p1startx, playerinfo.p2startx, playerinfo.leftbound, playerinfo.rightbound | numbers |
playerinfo.autoturn | 1 unless the stage sets autoturn = 0 |
stageinfo.zoffset, stageinfo.localcoord.x, stageinfo.localcoord.y, stageinfo.roundtime | numbers (localcoord alone means the width; roundtime is -1 when the stage does not set it) |
shadow.intensity, shadow.yscale, reflection.intensity | numbers |
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.
| Key | Default | Effect |
|---|---|---|
verticalfollow | 0.2 | Fraction of the highest fighter's height the camera follows upward |
tension | 50 | Horizontal 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 |
verticalfollowdelta | 0 | Dead zone in stage pixels: the vertical target only changes when it moved at least this much, which stops small jumps from shaking the camera |
yscrollspeed | 0.3 | Share of the remaining vertical distance covered per tick (clamped to 0..1) |
zoominspeed, zoomoutspeed | 0.04 | Share 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) |
lowestcap | 0 | When 1 the camera never sinks below starty |
dynamicboundhigh | 0 | When 1 boundhigh is raised by boundhighdelta for every unit of zoom-out above 1x, so the sky stays reachable while zoomed out |
boundhighdelta | 0 | Used 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.
- Write a
fn mine() -> Stagethat builds layers withlay(...)and the primitives fromume_engine::raster(rect,lin, gradients) andtexgen(blobs,grain,haze). Usedojo()as a model. - 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) }, }
- For reactive effects (dust, crowds, water), add a
StageKindvariant and handle it instagefx.rs. - 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

- 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

- 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

- 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

- 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

- 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

- 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

- 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

- 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

- 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

- 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

- 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

- 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

- 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

- 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é

- 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

- 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

- 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

- 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

- 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

- 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

- 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 engineHitevent. - 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 thefxoption (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_PARTSpool; no allocation happens per hit beyond the pool. UME_SHOTS_ONLY=fxrenders 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.
| Section | Keys | Effect |
|---|---|---|
bloom | intensity, threshold, knee, tint | Glow strength, where it starts, soft-knee width (Bevy/Unreal style, no hard cut) and a warm halation tint |
grade | tonemap, exposure, split, shadows, highlights | ACES filmic curve (0 off, 1 full), exposure, and a split tone that tints shadows and highlights |
distortion | shockwave, heat | Screen refraction from impact rings and heat haze around supers |
lens | chroma, vignette, grain, sharpen | Multipliers for the existing lens effects and contrast-adaptive sharpening (4 extra taps) |
quality | grade_from_level, shockwave_from_level, heat_from_level, bloom_from_level | Lowest 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;
fxlevel 0 skips post-processing entirely. - Tests:
cargo test -p ume-render --test headlessandcargo test --bin ultimate-mugen postfx.
How it compares
| Technique | Where it comes from | Here |
|---|---|---|
| Soft-knee bloom threshold | Bevy, Unreal | bloom.knee |
| Warm halation tint | Film look, Godot glow colour | bloom.tint |
| Contrast-adaptive sharpening | FidelityFX CAS, Bevy ContrastAdaptiveSharpening | lens.sharpen |
| ACES filmic tonemap | Godot, Bevy tonemapping | grade.tonemap |
| Impact refraction | SF6 and Strive hit shockwaves | distortion.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 byUi::quad),draw_circle,draw_ellipse,draw_poly,draw_circle_linesanddraw_lineare feathered.draw_triangle,draw_meshand 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.
| Tactic | Trigger | Action |
|---|---|---|
| Anti-air | Rival airborne, descending (vel.y > 0) and within ~105 units | Picks a usable command whose motion starts F, D, DF (dragon punch) |
| Whiff punish | Rival 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 confirm | Own attack connected (move_hit > 0) and control not back yet | Picks a multi-step command; the compiler's cancel rules let it connect |
| Meter discipline | Every random or reactive pick | Needs 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/.
| Before | After | |
|---|---|---|
| Knockout rate | 83.4 % | 96.7 % |
| Average round | 70.9 s | 54.5 s |
| Damage per round | 1388 | 1527 |
| Win-rate spread | 24.7 pts | 23.2 pts |
| Rounds with stuck fighter | 0 | 0 |
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)
| Skill | Behaviour |
|---|---|
| Reaction delay | The CPU only sees an attack after (8 - level) * 2 ticks, so low levels block late and level 8 reads at once |
| Guard height | Blocks low or high from the attack's guardflag instead of guessing |
| Block punish | Rival move was guarded and he is still recovering: answers with a single-input normal (more often at higher levels) |
| Rival profile | Moving 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
- Pick an issue labelled
good first issue, or open one describing what you want to change before writing large code. - Read the architecture overview and the file layout rules once; they explain where code belongs.
- Characters, stages and data changes need no Rust: see Make a character and Make a stage.
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
| Check | Command |
|---|---|
| Rust tests | cargo test --workspace --release |
| File size ceiling (250 lines) | node scripts/file-size.mjs |
| Crate boundaries | node scripts/crate-boundaries.mjs |
| Script tests | node --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.mdfiles anddocs/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/engineis deterministic: no clocks, threads, randomness or allocation insideMatch::tick.- Respect the crate boundaries in Architecture;
scripts/crate-boundaries.mjsenforces 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)?: descriptionwith type infeat|fix|perf|refactor|docs|test|build|ci|chore|style|revert;commit-lintrejects 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
mastercommit types;featis minor,fixandperfare 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
| Crate | Responsibility | May depend on |
|---|---|---|
ume-formats | INI, SFF, AIR, SND, ACT, PCX, PNG, FNT, stages, VFS (folders and zips) | nothing in the workspace; builds for wasm32 |
ume-engine | Fighter VM, expressions, triggers, controllers, HitDef, match rules, UMF compiler | ume-formats |
ume-netplay | ggrs rollback, state checksum, replay format | ume-engine |
ume-render | Sprite and post-processing pipelines on wgpu | wgpu only |
ume-shell | Adapter, surface, window, input, quad draw API, audio out, frame pacing | ume-render |
ume-market | GitHub marketplace: listing, bundles, safety limits | ume-formats |
ume-charforge, ume-devtools | Authoring and audit tooling | formats, engine |
ultimate-mugen (src/) | Screens, HUD, stages, VFX, audio mixing, settings, registry | everything 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
ume-formatsparses character and stage files, or the native UMF JSON, into plain data.ume-enginecompiles CNS, ZSS and UMF into one bytecode and runsMatch::tickat a fixed 60 Hz. It never reads a clock, a thread or the GPU.ume-netplayclones and checksumsMatchfor rollback and replays.src/readsMatchstate each frame and draws it throughume_shell::quad, which batches intoume-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 add | Put it in |
|---|---|
| A state controller or trigger | crates/engine (new file, one wiring line in controllers.rs or triggers.rs) and document it in CNS-Scripts.md |
| A file format or parser | crates/formats |
| A fighter, stage or route | Data only: UMF JSON, .def, TOML; no Rust |
| A screen or HUD element | src/app/<screen>.rs or the matching feature folder in src/ |
| A GPU effect | crates/render, exposed through ume_shell::quad |
| A marketplace rule | crates/market |
Extension points that need no code in the engine
- Native fighters:
assets/chars/*.json(UMF character). - Stages: M.U.G.E.N
.defor native stage data (Stages), story objects in TOML (Stage objects). - Arcade routes and unlocks: TOML (Route files).
- Passives: data in a fighter (Passives).
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.
| Content | Where it lives | Documented in | Rust change |
|---|---|---|---|
| Native fighter | assets/chars/<id>.json, listed in assets/chars/index.json | UMF character, Make a character | No |
| Fighter bios and nationality | assets/char_profiles.json | Characters | No |
| M.U.G.E.N fighter or stage | mugen/chars/, mugen/stages/ or the marketplace | Adding M.U.G.E.N content, Marketplace | No |
| Built-in stage from data | assets/stages/data/<id>/stage.def and its files, embedded by build.rs | Make a stage | No |
| Stage look (rim light, tint, vignette) | assets/stagelook.toml | Visual effects | No |
| Stage props | assets/stageprops.toml and assets/props/ | Visual effects | No |
| Story objects (crates, pickups, bonus rounds) | assets/story/objects.toml | Stage objects | No |
| Story epilogues | assets/story/epilogues.json | Story mode | No |
| Arcade routes and unlocks | assets/routes/unlocks.toml | Route files | No |
| Post-processing | assets/postfx.toml | Visual effects | No |
| Passives, signature meters | fields of a UMF fighter | Passives | No |
| State controller or trigger | crates/engine | Customizing the engine, CNS scripts | Yes |
| New file format | crates/formats | Architecture | Yes |
| New screen | src/app/<screen>.rs | File layout | Yes |
Rules for a new kind of content
- Define it as a data file under
assets/, embedded throughbuild.rswhen it ships with the game. - Give it a wiki page with an English and a
pt-BRversion, and add a row to the table above. - Add a test that loads the shipped files, so a broken data file fails CI instead of the game.
- Record the choice in an ADR when it introduces a new format.
Customizing the engine
Architecture
| Path | Responsibility |
|---|---|
crates/formats | M.U.G.E.N file readers: INI, SFF, AIR, SND, ACT, PCX, PNG, stages, virtual file system (folders and zips). No platform dependencies |
crates/engine | State 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/chars | Bundled 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
- In
crates/engine/src/controllers.rs, insiderun, 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.
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.- Add the field in
fighter.rsif you need new state. - Write a test in
crates/engine/tests/combat_logic.rscallingume_engine::controllers::run. - List the name in
CNS-Scripts.mdandpt-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. Returntruefrom the module'srun(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
| Command | Covers |
|---|---|
cargo test --workspace --release | Everything |
cargo test -p ume-engine --test kfm | Reference Kung Fu Man |
cargo test -p ume-engine --test it combat_logic:: | Combat rules |
cargo test -p ume-formats | Decoders |
cargo clippy --workspace -- -D warnings | Lint |
node scripts/web-smoke.js web/dist | Web build in Chromium |
node scripts/web-match-smoke.js web/dist | Full 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.mdfiles anddocs/wiki/pt-BR/. - The simulation (
crates/engine) uses no clock, threads or randomness outsideMatch::random, to keep replays and rollback working. - No allocation inside
Match::tickin 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 byscripts/commit-lint.mjs.
Architecture decisions
| Topic | Choice |
|---|---|
| Render | wgpu (Vulkan, Metal, DX12, WebGPU, WebGL2), palette in the shader |
| Scripts | CNS and ZSS for fighters, UMF JSON for the native format; no Lua |
| Expressions | Stack bytecode |
| Audio | kira + symphonia |
| Network | ggrs (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
common1state hands control back instead of leaving the fighter owned by the shared file. - States from
common1.cnsare the player's own: the character's-1states 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-1that 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_panelregisters 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 (fxlevel 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,.mdpages 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 --updatein the same pull request that split it. - Never regenerate the baseline to raise a number.
--updateis 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:
| Question | Same responsibility | Different responsibility |
|---|---|---|
| Why would it change? | two functions change when the format changes | one changes with the format, the other with the camera |
| What data does it own? | one struct and its helpers | several structs that talk to each other |
| Who reviews it? | the same reviewer with the same context | a different specialist |
| Can it be tested alone? | yes, with the crate's public API | only 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.rsholds the types every part shares and the functions the rest of the crate calls.feature/<concern>.rsholds one concern each. Rust lets a folder sit next to the file with the same name, so nomod.rsis needed inside it.mod.rsis a facade: module declarations,pub usere-exports, nothing else. Aim for 60 lines; amod.rswith 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.rskeeps the frame and state,src/app/<screen>.rsowns 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:
| File | Owns |
|---|---|
mode.rs, screen.rs, team.rs | Mode, Screen and Team types (re-exported from app) |
title_screen.rs, menu_screen.rs, menu_focus.rs | Title, main menu, eased menu focus |
stage_select.rs | Stage grid |
load_plan.rs, vs_screen.rs | Who loads with which palette, VS screen, start_fight |
fight_screen.rs | The fight frame and team rotation |
results_screen.rs | Results screen |
netplay_session.rs | Netplay start, overlay and replay capture |
fighter_draw.rs | Fighter 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
- List the responsibilities in the file. If the list is not obvious, read the callers first; the file is not understood yet.
- Create
feature/and move one responsibility per pull request, one commit per extraction. - Change no behavior while extracting. Tests must pass before and after, and the diff must be mostly moves.
- Extract the smallest cohesive unit first (the one with fewer callers). Big-bang rewrites conflict with every open pull request.
- 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>.rsand 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.rsandtriggers.rsmatch arms,mod.rsdeclarations,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.
| File | Lines | Suggested split |
|---|---|---|
crates/native/src/effects.rs | 1711 | effects/canvas.rs, effects/raster.rs, effects/kinds.rs |
crates/engine/src/matchs.rs | 1751 | matchs/round.rs, matchs/collision.rs, matchs/camera.rs, matchs/tick.rs |
src/app.rs | 2238 | Nine screens already live in src/app/; next are select (830 lines, split by grid, side panel and input) and load_step_inner |
src/stages.rs | 1069 | stages/load.rs, stages/layers.rs, stages/motion.rs |
src/stagefx.rs | 704 | stagefx/scenes.rs already exists; extract stagefx/particles.rs, stagefx/weather.rs |
src/market.rs | 700 | market/install.rs, market/listing.rs; the crate keeps the logic |
crates/formats/src/screenpack.rs | 610 | screenpack/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.
Related pages
- Customizing the engine - architecture, adding a controller, a trigger or a format.
- Performance - where the hot paths live.
Dev tools
English · Português (BR)
Repository build and audit tools are Rust binaries, not scripts. crates/devtools builds ume-tools:
| Command | Replaces | What it does |
|---|---|---|
ume-tools pack-sprites [out] [--sprites dir] | scripts/pack_sprites.py | Packs 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.py | Writes 240x135 Lanczos thumbnails to <stages>/thumbs |
ume-tools audit-moves [dir] [--json] | scripts/audit_native_moves.py | Static roster audit: inputs, cancels, throws, hit boxes |
ume-tools audit-sprites --out report.json | scripts/audit_native_sprites.py | Exact-file PNG inventory with alpha bounds |
ume-tools roster-audit [--chars dir] [--only text] [--fail-over severity] | manual play-testing | Fights every character and stage and writes a severity report (Roster audit) |
ume-tools mugen-census <zip-or-dir>... | new | Counts 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
| Stage | What happens | Threads |
|---|---|---|
| SFF v1 decode | Subfile headers scanned; PCX payloads are decoded in parallel across cores; linked sprites share source pixels (Arc) | All cores (max 32) |
| SFF v2 decode | Headers 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 & Decompression | Central directory scanned, entries decompressed in parallel with live ZipProgress visual loading bar and hardware thread tracking | All cores (max 32) |
| Character sprites | Palette to RGBA conversion runs in parallel, once per unique pixel buffer and palette; linked sprites share one ImageData, so they also share one GPU upload | All cores (max 8) |
| Stage sprites | Same parallel RGBA conversion; the RGBA buffer is moved into the stage, never copied | All cores (max 8) |
| Stage caching & reuse | src::registry | MugenStage 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 parsing | ume_formats::stage | Stage .def parsed once with parse_ini_no_lines and shared with 3D model detection, eliminating duplicate INI parsing and string line allocations |
| Common state cache | ume_engine::common | common_def() cached via OnceLock<Arc<CharDef>>, eliminating ~4 ms duplicate parse of common1.cns per match |
| CNS & CMD single-pass parsing | ume_engine::loader, cns | Sections parsed once using parse_ini_no_lines and shared between constants and states; avoids redundant INI passes |
| Expression & param bytecode cache | ume_engine::chardef | safe_expr and Param::new cache parsed AST and bytecode across identical triggers and parameters via thread-local storage |
| Zero-alloc INI lookups | ume_formats::ini | Section::get and find_section use eq_ignore_ascii_case avoiding heap allocations; strip_comment short-circuits without comments |
| Select-screen portraits | load_mugen_portrait decodes only sprites 9000,0, 9000,1 and the first idle frame (plus their link sources) via decode_sff_only | 1 |
| Native (UMF) sprites and effects | Every unique frame is decoded or rasterized in parallel | All cores (max 8) |
| Whole character | Loaded on a char-load thread while the VS screen is shown | 1 background thread |
| VFS resolution | Short-circuiting single-candidate lookups, zero-alloc ASCII path normalization, and clone-free BTreeMap::range queries | Calling 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
| Technique | Where | Effect |
|---|---|---|
| Frame pacing | ume_shell::Pacer | Frame 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 step | Session::update | 60 Hz simulation with a tiny tolerance and at most 5 ticks per frame (no spiral of death) |
| Texture prefetch | Gfx::prefetch_step, App::warm_step | Fighter 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 prewarm | Audio::preload_match | Every fighter sound is decoded in parallel during the VS screen; sounds of characters no longer in the match are freed |
| Bytecode VM | ume_engine::bytecode | CNS/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 paths | commands, matchs, triggers, ai, ikemen | Arc<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 path | ume_render::Batch, ume_shell::quad | Dedicated push_quad_verts writes contiguous quad indices without iterator mapping; unrotated quad coordinates bypass trigonometry (sin_cos) |
| Zero-alloc hot paths | commands, matchs, triggers, ai, ikemen | Arc<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 bypass | ume_engine::palette | is_identity() guard skips float trig, multiplications, and clamping on untouched palettes, plus short-circuiting in PalParams::combine and batch apply_slice |
| Zero-alloc hot paths | commands, matchs, triggers, ai, ikemen | Arc<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 paths | commands, matchs, triggers, ai, ikemen | Arc<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 paths | commands, matchs, triggers, ai, ikemen | Arc<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 bounds | ume_formats, ume_engine::matchs | Image 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 paths | commands, matchs, triggers, ai, ikemen | Arc<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
| Technique | Where | Effect |
|---|---|---|
| Palette in the shader | Gfx::sprite_tex, IndexedTexture, Palette | M.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 resets | ume_shell::quad | The 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 paths | post.wgsl fs_composite | Without 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
| Command | Measures |
|---|---|
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_bench | Native (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):
| Scenario | Step p50 | Draw p50 | Frame p50 | RSS after load |
|---|---|---|---|---|
| Kaito vs Shion | 0.03 ms | 0.09 ms | 5.52 ms (180 Hz vsync) | 380 MB |
| 2v2 parallel (4 native fighters) | 0.05 ms | 0.13 ms | 5.52 ms | 533 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:
| Fix | Where | Effect |
|---|---|---|
Share the RGBA buffer between ImageData and Texture2D | chardef::ImageData, Texture2D::from_rgba_shared | Removes the second full copy of every native sprite: 1v1 RSS fell from 455 to 380 MB |
| Evict the GPU texture cache when the roster changes | App::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 definitions | Registry::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)
| Technique | Where | Effect |
|---|---|---|
ControlFlow::Wait on the web | ume_shell::run | winit'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-fill | Renderer::new | Atlas and palette textures are initialized once, so texSubImage2D no longer triggers lazy clears (Firefox warning) |
| Surface retry | Shell::redraw | A failed get_current_texture re-requests the frame instead of stalling the loop (black screen) |
| Loader + cache | web/index.html, web/sw.js | Download 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 demand | src/web_sprites.rs, ume-tools pack-sprites | Each 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 profile | Cargo.toml [profile.web], scripts/build-web.sh | The 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 backdrop | src/power_arena_backdrop.rs, src/screen_art_fetch.rs | On 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 loops | native::recolor, native::pixel_fit | Palette 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.
| Work | Where it runs now |
|---|---|
| Select-screen MUGEN preview and portrait | CharEntry::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 decoding | Audio::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 screen | uses 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.
| Technique | Where | Effect |
|---|---|---|
| Lazy folder index | ume_formats::vfs::add_dir | Walks 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 cache | vfs::File | Reads 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 key | vfs::File::signature | Character/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 keying | find_char_defs, find_stage_defs, Registry::add_vfs_inner | Def headers and content keys are computed with ume_formats::par::map (up to 8 workers) |
| Off-thread roster | App::new | Registry::new + scan_folders + dedupe + sort_mugen run on the registry-scan thread while the boot screen keeps drawing frames |
| Set-based dedupe | Registry::add_vfs_inner | Roster ids and keys live in HashSets; the previous per-fighter linear scan was quadratic |
| Async stage thumbnail | Registry::stage_preview | The 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 build | Registry::prepare_stage | The stage is loaded, previewed and its BGM located on stage-load; the VS screen polls the result |
| Off-thread release | Registry::drop_off_thread | Dropping a fighter definition (hundreds of MB of sprites) happens on char-free, not inside a frame |
| Frame-pumping loads | App::start_fight | Rematch 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::assignsrecords variable mutations using a compactVarKindenum (Var,FVar,SysVar,SysFVar) rather than allocating dynamicStringkeys per assignment.state_mask,attr_kind_mask, andguardflag_bitsparse string slices byte-by-byte with inlineto_ascii_uppercase(), eliminating temporary uppercaseStringallocations duringhitbyattrevaluations.- 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_startto bypass iterator instantiation for the most common animation frame timing queries.
- Implements Fighter::fill_boxes using caller-provided scratch buffers, eliminating continuous Vec
-
Wave 29 - Chunked Raster Pixmap Conversion & In-Order SFF RLE8 Decoding:
- Replaces per-pixel
extend_from_slicecalls inraster::pixmap_to_imagewith direct 4-byte chunk slice writes (chunks_exact_mut(4)). - Streamlines
decode_rle8read sequence without extra index decrementing.
- Replaces per-pixel
-
Wave 30 - Branchless Input Relative Directions & Byte Jump Table:
- Replaces nested branching in
input::rel_dirswith branchless bitwise shiftud | (4 << (is_back ^ 1)). - Replaces string matching in
button_bitwith byte-level slice matching, supporting case-insensitivity without allocation. - Implements branchless facing assignment in
InputHistory::push.
- Replaces nested branching in
-
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 inadd_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.
- Implements multi-threaded scoped chunked inflation (
SIMD ACT palette decoding & camera bounds fast-path
- Vectorized ACT decoding: decode_act and
encode_actuse 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_indicesreturns a stack-allocatedVec<usize>buffer instead of heapVec<usize>, eliminating allocation across all target controllers (targetstate,targetlifeadd,targetpoweradd,targetfacing,targetbind, etc.). - Zero-alloc AssertSpecial flag lookup:
flags::names_inandflags::lookupwork directly with borrowed&strand 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_valcopies the key into a 64-byte stack array to query.xvariants without heapformat!("{k}.x"). - Typed variable assignments:
Match::assignsrecordsAssignKindenum instead of allocating aStringon each trigger variable assignment.
SFF v2 chunked RLE decompression and redundant zero-store elimination
- Redundant zero-store skipping in
decode_rle8: Sincevec![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 indexj. 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 whenc == 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 viacopy_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 returnvec![]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
p2clsnrequiretarget slice: InMatch::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 asVec<usize>integers intofighter.def.commandsinstead of cloning fullCommandDeftrees with strings and vectors. Close and ranged attacks are partitioned duringinit, turning tick command selection intoO(1)array indexing. - Vectorized straight-alpha pixmap conversion:
raster::pixmap_to_imageavoids integer divisions on opaque (alpha == 255) and transparent (alpha == 0) pixels withas_chunks_mut::<4>().
Pre-allocated SND decoding & zero-alloc command movelist filtering
- Pre-allocated SND sound hash tables:
snd::decode_snd_checkedbounds capacity usingcount.min(8192)and preallocates bothoutandseenhash tables with that capacity, eliminating repeated hash table reallocations and rehashes across character audio decoding. - Static palette key resolution in loader:
loader::load_mugen_charresolves character DEF palette overrides (pal1..pal12) using static string slice tablePAL_KEYSrather than formatting 12 heap strings per character. - Pre-allocated sprite deduplication: Pre-sizes
seenanduniquesprite vectors tosff.sprites.len(). - Filter-first zero-alloc movelist and AI command extraction:
loader::load_mugen_charfilters commands in-place witheq_ignore_ascii_casebefore 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_airprocesses text lines directly with case-insensitive ASCII byte matching (eq_ignore_ascii_case), removing 5,000 to 20,000 heap string allocations per character.airfile. - Stack-allocated collision box parser:
parse_clsn_boxparses four coordinates directly into a fixed[f32; 4]array on the stack, eliminatingVec<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 allocatingVec<&str>. - In-place flip and blend flag parsing:
flandblflags are evaluated in-place without uppercase string allocation.
HitDef zero-alloc shake parameters and in-place type matching
- Zero-alloc shake parameter resolution:
hitdef::builduses direct static parameter string lookups (parse_shake) instead of formatting 10 dynamic heapStringkeys ({prefix}.freq,{prefix}.time,{prefix}.ampl, etc.) perHitDefinstantiation. - In-place
animtypeandgroundtypeparsing:hitdef::animtypeandhitdef::groundtypematch standard MUGEN animation/ground tokens usingeq_ignore_ascii_casedirectly on borrowed&strwithout lowercase string allocations.
Zero-alloc INI section queries and stack-buffered CNS constant parsing
- Zero-alloc
Section::getandSection::get_all:ini::Section::getandini::Section::get_allcompare keys directly usingeq_ignore_ascii_casewithout allocating lowercaseStringinstances on every query. - Zero-alloc
find_section:ini::find_sectionuseseq_ignore_ascii_casedirectly on section names without allocating a lowercase string. - Stack-buffered CNS constant parsing:
cns::parse_constantsunpacks comma-separated numeric vectors into a stack-allocated[f64; 4]array, eliminatingVec<f64>allocations on every constant line. - Pre-allocated command definition vector:
cns::parse_cmdpre-allocatescmdscapacity tosecs.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 onself.anim(), eliminating repeated HashMap lookups per animated fighter and explod each tick. -
Empty size-override short-circuit:
fighter::cimmediately queries character constants whenself.size_overrides.is_empty(), bypassing linear slice scans. -
Stale target cleanup early continue:
Match::tickskips target vector moves and retain passes wheneverself.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 newStringinstances for unquoted and clean strings.loader::load_mugen_char: Convertedfgetfrom returningOption<String>toOption<&str>, eliminating ~20 heap allocations per character load.loader::local_size: Stack-based parsing viasplit_once(',')replacing dynamicnumsallocation.cns::parse_cmd: In-placeunquote_strfor command name and inputs.
-
Wave 44 - Zero-Alloc AssignKind State Dispatch & Case-Insensitive Bitmasks:
matchs::AssignKind: Replaced dynamicStringallocations in trigger variable assignments with a 1-byte enumAssignKind, 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 forvelocity.*.xconstants.
-
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 linearFighterscans 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)..nhalving 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 * sandsy * 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: Inlinedwith_joinedusing a 512-byte stack buffer forbase_dir/nameanddata/namepath candidates, completely eliminating candidate heap allocations on the direct hit path.- Replaced
format!("/{base}")heap strings with in-place byte boundary predicateis_match. - Used
ini::unquote_strdirectly instead of allocating ownedunquotestrings. - Sub-microsecond VFS folder fallback on 50k files (0.9 us/op) and reduced character load time (
kfm.defdown to 6.7 ms).
-
Wave 48 - Zero-Alloc HUD Frame Pipeline & Direct Texture Quads:
Hud::draw: Streamlinedmain_ofinto single-pass iterator scans avoiding dynamicVec<&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_exquad 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 singleCtxacrosstrigger_alland 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-placeEntry::Vacantinsertions avoiding redundant sound re-allocation.loader::load_mugen_char: Eliminated redundant second parse pass ofstcommonduring character loading.- Pre-allocated static palette keys
PAL_KEYSto avoid 12 dynamic string formatting allocations per character load. - Pre-allocated capacity for
HashSet,sprites,indexed, andcountsbased on decoded SFF sprite lengths. - Case-insensitive ASCII byte comparison (
eq_ignore_ascii_case) forai_commandsandmovelistfilters, 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 viarefresh_sizes.Fighter::c: Fast-path pattern match onsize.*keys avoiding dynamic string hashing andHashMaplookups on every physics, collision, and trigger query.Gfx::sprite_tex_for: Eliminated duplicatedef.sprites.getlookup per rendered frame across all fighters, shadows, helpers, and explods.Gfx::draw_sprite: Usesdef.scale_xanddef.scale_ydirectly, removing repeated per-framedef.c(...)table probes.- Reduced
kfm.defload 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: Cachedanim_total_timeandanim_loop_startupon animation switches, turninganim_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 repeatedself.anim()lookups.Fighter::anim_elem_time: Instant return foranimelemtime(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 viaHost::trigger0and bypassing virtual machine stack allocation.- Dropped
kfm720.defloading time to 8.7 ms andkfm.defto 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 bufferpendingstoring only fighter indices and coordinates, avoiding eagerHitDefDataheap clones on idle/no-hit frames.strucklist 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-allocatedVec<usize>with fixed stack array[Option<usize>; 8], eliminating allocation churn inTargetState,TargetLifeAdd,TargetPowerAdd,TargetFacing, andTargetBind.controllers::set_vars: Directly evaluatedparam.exprs.first()without duplicatesc.param(...)string search iterations.controllers::run: Replaced double parameter checks inchangestate/selfstatewith unifiedopt(...)queries forctrlandanim.- 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.
- sff::sprite_to_rgba: Allocated direct Vec
-
Wave 56 - Copy-Derived Binds, Lazy Fallbacks & Direct In-Place State Animations:
fighter::Bind: DerivedCopyandPartialEq, turning bind checks and updates inrebindandupdate_bindinto direct stack bit-copies with zero heap cloning.fighter::Fighter::change_anim_own: Added internal animation change helper from own definition, removing externaldef.clone()overhead inchangestate,changeanim, and auto-turn transitions.matchs::run_state: Convertedcommonlookup into a lazy fallback (let fallback;), bypassingself.common.clone()on all negative states (-3, -2, -1) and every character-defined state.matchs::change_state: Replaced eagerself.common.clone()with reference pointer equality&self.commonand lazy state definition fallback.matchs::tick: Replaced per-framef.st_def.clone()in physics override loop with scalarOption<char>extraction.
-
Wave 57 - Non-Allocating INI Parsing, Pre-Allocated Controllers & State Sizing:
ini::parse_ini_no_lines: Replaced line-allocating INI parsing inparse_states,parse_constants,parse_cmd, andloader.rscharacter DEF resolution withparse_ini_no_lines, avoiding tens of thousands of unusedStringline allocations per character.ini::parse_ini_opt: Pre-allocated section output vector withtext.len() / 256 + 4and section entries with capacity 8.cns::build_controller: Pre-allocated controllerparamswith capacity matchings.entries.len().cns::parse_states: Pre-allocatedStateDefwithcontrollerscapacity 16 andparamscapacity 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 invfs::resolve.commands::CmdSymbol: DerivedCopyandPartialEqfor 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: Evaluatednow & !prevbefore 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 dynamicsize.*string queries when no size overrides exist, readingdef.scale_xanddef.scale_ydirectly.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-frameVec<&str>heap allocation with a fixed 12-element stack array[""; 12], eliminating dynamic vector allocations across all animation frames.air::parse_air: Replacedto_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 forAS...D...alpha parameters.air::parse_air: Pre-allocated animation frames vector withVec::with_capacity(8)and the animation HashMap withtext.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()) forstatetype,movetype, andphysics, and reused parsed string slice incommandchecks.
-
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 forvar(X) = Y,fvar(X) > Y, andanimelemtime(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 likeanim = statenoortime > animtime.
-
Wave 63 - Lazy SND Cycle Detection & Zero-Alloc FNT Glyph Tokenization:
snd::decode_snd_checked: Replaced eagerHashSet<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 linesplit_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 toparse_ini_no_lines, avoiding unusedlines: Vec<String>collection.
-
Wave 64 - Zero-Alloc Command Charge Parsing & Pointer-Guarded Animation Switching:
commands::parse_command: ReplacedStringheap collection in release/charge command prefix parsing (~30) with zero-alloc byte slice indexing and ASCII byte matching for prefix symbols (/,$,>,~).fighter::change_anim: AddedArc::ptr_eqguard avoiding reference count bumps whenfromis already the activeanim_def.fighter::change_anim_own: Switched to direct immutable reference borrowing ofself.defwithout cloning theArc<CharDef>atomic counter.
-
Web select screen (
scripts/web-frame-probe.js,scripts/web-profile.js):- Native roster tiles draw
portrait.pngthroughCharEntry::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
wasm32a 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_regionuses 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.
- Native roster tiles draw
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) | Oboro | Kaito | Suzume | |
|---|---|---|---|---|
| Before | 11.40 / 11.76 / 11.79 s | 1674 ms | 1250 ms | 900 ms |
| After | 4.70 / 4.46 / 4.54 s | 551 ms | 405 ms | 319 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.
| Option | High | Medium | Low | Minimum |
|---|---|---|---|---|
| Render scale (fight scene, HUD stays sharp; also 35% and 25% by hand) | 100% | 100% | 75% | 50% |
Post-processing (fx) | High | Medium | Off | Off |
| Particles and effects | Full | Reduced | Reduced | Minimal |
| After image, glass HUD, animated backdrop, CRT | on | on (CRT off) | off | off |
| Shadows | on | on | on | off |
- 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 readscrate::lite::shadows(),afterimage(),backdrop(),glass(),crt(). - Auto adjust (default on for the web build):
lite::Monitoraverages 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=watchmatch in Chromium (web).
Measured on the 4-core cloud machine with software rendering (lavapipe for desktop, SwiftShader for web, 1280x720, Kaito vs Shion):
| Preset | Desktop frame avg | Web fps |
|---|---|---|
| High | 28.7 ms | 10.5 |
| Medium | 28.9 ms | 11.5 |
| Low | 19.5 ms | 18.7 |
| Minimum | 15.8 ms | 21.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
| Magic | Holds | Written by | Read by |
|---|---|---|---|
UML1 | one sprite: indexed (8-bit + palette) or RGBA | ume-tools pack-sprites (web fighter packs) | ume_formats::lz4_sprite, ume_native sprite loader |
UMSF | a whole .sff: palettes, sprite table, one UML1 block per distinct pixel buffer | ume-tools cook-sff | ume_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).
| Scenario | What it covers |
|---|---|
cpu-bot-best-of-3 | A scripted player closes in and mashes attacks against the CPU for at least two rounds |
watch-cpu-vs-cpu | No input: the match must still run to the results screen |
A scenario fails on any of:
- page error, Rust panic,
RuntimeErroror an unexpectedconsole.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:
| Shard | Scenarios |
|---|---|
ui | title to fight flow, Arcade click, story intro, epilogue |
mobile | touch menu, touch controls in a fight, in-engine smoke on a Pixel 7 viewport |
engine | in-engine smoke (?smoke=1): boot, menus, select, training, 5v5, story; plus the guard self-test |
loading | M.U.G.E.N import (kfm), native fighters with awakenings, power arena, audio unlock, fatal-trap screen (unreachable) |
match-1, match-2 | full 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 executedorrenderbufferStorageMultisamplein the console;gpu error:(the wgpu error handler inume-shell);- an uncaught
pageerroror 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
- Write
scripts/web-<name>-smoke.jsthat takes the dist folder as its first argument and exits non-zero on failure. - Add it to
scripts/web-qa.jsonwith a shard, or list it underexcludedwith 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
rustup target add wasm32-unknown-unknownandcargo install wasm-bindgen-cli --locked --version <Cargo.lock version>../scripts/build-web.shwritesweb/dist.node scripts/web-smoke.js web/distmust pass before any capture.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" }
]
}
keytaps a key forholdframes (default 2) and waitswaitms (default 900).holdwithmskeeps a key down for that long.shotsaves<shot>.pngafter the step;videorecords 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
| Area | Test | Command |
|---|---|---|
| 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 bounded | cargo test -p ume-engine --release --test it stress:: -- --nocapture |
| Hot paths | Built-in bench for SFF decode, AIR parse, CNS compile, char load, match tick with 2, 6 and 10 fighters | cargo run -p ume-engine --release --example hotpath_bench |
| Rollback under latency | crates/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)
| Path | Time |
|---|---|
| SFF decode | 1.1 ms |
| AIR parse | 1.0 ms |
| CNS parse and compile | 3.2 ms |
| Char load without images | 7.6 to 10 ms |
| Match tick, 2 fighters | 5 us |
| Match tick, 6 fighters | 15 us |
| Match tick, 10 fighters | 39 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_ggrsdocuments 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.pngimages 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 theirinline_<hash>frame rendered once. - Dedicated PNGs must be generated in arcade pixel art via
generate_imageusing a validated canonical anchor of the fighter (the deprecated vector-riggenerate_missing_spritestool has been removed). Write 400×400 RGBA frames with axis (200, 392) andrefHeight320 metadata, matching the existing convention. - Verification:
cargo run --release -p ume-engine --example native_sprite_audit -- <out.json> --require-completemust pass for every fighter, andcargo 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-movesis 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.jsonsprite-gen inspect-motion --source walk.json --out walk-report.jsonmeasures anchors, duplicate frames, bbox drift and edge contact; foot contact needs explicit--contactsand--foot-boxinputs.ume-tools preview-motionandume-tools preview-scenerender 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
| Package | Code size | Statedefs | Layout |
|---|---|---|---|
| Goku GT | ~31k lines | ~175 | cmd + cns + Especiales, Supers, SS1..SS4 (one file per form), IA for Statedef -2/-3 |
| Scorpion UMK3 | 23.6k | 221 | 1.cmd, 1.cns, Basic_Moves.st, Sp.st, Combos.st, finishers |
| Sub-Zero UMK3 | 28.4k | 324 | same plus 2.st, 3.st (alternate moves), Stage_Finishers.st |
| Liu Kang | 19.4k | 161 | Special_Punches.st for the kick/punch specials |
| Shao Kahn | 27.0k | 262 | Bmoves.st, Sp.st, helpers (100 Helper controllers) |
Patterns
- Short motion commands. MK characters use 2 to 3 step inputs (
B,B,a,D,F,x,F,F,b) instead of quarter circles, withtimewindows around 10 ticks. UMF accepts the same notation inmoves[].input. - Fast, long moves = helpers. Scorpion's spear is a
Helper(state 1010) spawned onanimelem = 4, withDestroySelfattime = 150, and the owner waits in state 1000 untilp2statenois the pull state (1020/1021), then switches to 1001 to pull. In UMF this is aprojectileplus athrowfollow-up. - Teleports. Scorpion's 1100 (behind) and 1200 (forward) are plain
PosSet/PosAddstates; UMF hasteleportframe orabilities.teleport. - Specials per button. One motion, a different button picks the variant (Liu Kang
F,Fplusx,a,bory: fireball, flying kick, bicycle kick, etc.). UMF equivalent: one move per button plus EX versions. - Heavy explod use. 440 to 530
Explodcontrollers per character for sparks, ice, fire and blood; UMF handles these throughspark,hitAnimandfx. - Combos stored in states.
Combos.stholds scripted chains. UMF models this withcancelsroutes. - 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. - 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,akick) 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,yrun 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:
| Package | Code files | Code lines | Statedefs | Common states redeclared | Controllers | Commands | AI commands | AIR actions |
|---|---|---|---|---|---|---|---|---|
| Goku GT (DBFZ style) | 11 | 35092 | 329 | 56 | 3114 | 78 | 2 | 529 |
| Goku UI (DBFZ style) | 7 | 27742 | 258 | 68 | 2241 | 78 | 2 | 294 |
| Kung Fu Man (bundled) | 6 | 10646 | 118 | 10 | 711 | 74 | 0 | 234 |
| Controller | Uses | Share | UMF equivalent |
|---|---|---|---|
changestate | 997 | 16% | generated from cancels, when and move kind |
playsnd | 813 | 13% | voice and per-level hit sounds |
explod | 552 | 9% | fx, spark, hitAnim |
velset | 352 | 6% | vel on frames |
helper | 311 | 5% | projectile, throw, abilities |
hitdef | 272 | 4% | hits[] |
changeanim | 249 | 4% | anim per move |
destroyself | 224 | 4% | projectile removeTime |
What the numbers say:
- 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.
- 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
statsandanims. - 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. - Nothing is shared between packages. Two Goku packages by the same author family share no file. UMF has
extendsand 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 TYBW | Gogeta SSJ4 | Goku SSJ GT | Goku SSJ4 | |
|---|---|---|---|---|
| Sprite format | SFF v2.01, 1380 sprites, 696 palettes, 29 MB | SFF v1, 523 images | SFF v1, 116 images | SFF v1, 198 images |
| Sounds | 272 (19 groups, up to 4 MB each) | 33 | 5 | 19 |
| AIR actions | 262 | 232 | 84 | 171 |
| Clsn1 / Clsn2 boxes | 83 / 1538 | 301 / 1202 | 115 / 477 | 309 / 1469 |
| CMD commands | 67 | 65 | 62 | 65 |
| Statedefs (own, no common) | 85 + 68 + 19 + 2 | 101 + 2 | 29 | 109 + 5 + 2 |
| Controllers (own) | 650 + 676 + 173 + 57 | 789 + 117 | 223 | 761 + 30 + 25 |
| Life / attack / defence | 2250 / 115 / 125 | 2600 / 110 / 140 | 2100 / 120 / 110 | 2400 / 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
| File | Role | Seen in |
|---|---|---|
.def | [Info] name and author, [Files] list, pal1..pal12, pal.defaults | all |
.cmd | [Remap], [Defaults] (command.time, command.buffer.time), [Command] list, [Statedef -1] input to state routing | all |
.cns | [Data], [Size], [Velocity], [Movement] constants then states | all |
st1..st3 extra state files | IA.cns (-2/-3 AI), Especials.cns, Supers.cns, -final, -story-intros | Aizen, Goku SSJ4 |
common1.cns | Copy of the shared states, overridden by redeclaring a state number | all |
.air | Actions: frames group,image,x,y,ticks[,flip,trans], Clsn1 (attack) Clsn2 (hurt), Clsn2Default, Loopstart | all |
.sff / .snd | Sprites and sound banks, referenced by group,image and group,index | all |
.act | 256-colour palettes, one per colour option | Gogeta, Goku SSJ4 |
Constants worth copying
- Walk 2.3 to 2.4 forward, run 4.6, jump
-8.1to-10.1,yaccel.43 to .44,airjuggle15, ground width 15 (10 for the thin Aizen), height 60,attack.dist160. The native roster already uses the same scale. fall.defence_up50,liedown.time60,sparkno-1 when the pack draws its own sparks.- Aizen sets
airjump.num = 6and 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,aand~60$B,F,a(Goku SSJ), double tapsFF,BB,~D,Ufor super jump, 3-button combosa+b. - Button routing:
/$B,x,/$D,ystyle commands hold a direction while pressing, giving command normals. - Buffers:
command.time = 10andbuffer.time1 in most packs, 15 to 30 for the packs that favour easy inputs. - Specials keyed off one motion, one button each: Aizen
D,DF,Fwith 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..ai13commands (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),movehitandmovecontact(165 uses in Aizen, 22 in Gogeta, 14 in Goku SSJ4). UMF names the same ideacancelsandrekka.
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:
| State | Gogeta | Goku SSJ | Goku SSJ4 | Aizen |
|---|---|---|---|---|
| 200 stand light | 20, pause 4,5, hit 11, juggle 4, power 22 | 23, pause 7,8, hit 11, juggle 1, power 20 | 23, pause 5,8, hit 7, juggle 1, power 20 | 20, pause 9,9, hit 15, juggle 2, power 40 |
| 210 stand heavy | 55, pause 4,5, hit 11 | 55, pause 11,11, hit 15, juggle 4, power 60 | 63, pause 12,12, hit 15, juggle 5, power 65 | 30, pause 9,9, hit 15 |
| 400 crouch light | 23, pause 10,11, guardflag = L | 23, pause 10,12, L | 23, pause 5,8 | 20, pause 0,15 |
| 410 crouch heavy | 37, pause 12,12, M | 62, trip, fall = 1, juggle 7 | 37, pause 12,12, M | 30, pause 0,60 |
| 600 jump light | 20, pause 7,8, HA | 12, pause 7,8, HA | 12, pause 7,8 | 30, pause 10,10 |
| 610 jump heavy | 72, pause 12,12, hit 17 | 70, pause 9,10 | same values as 600 | no 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
| Type | Example | How it is built |
|---|---|---|
| Fireball | Goku SSJ 1000 | Statedef movetype = A, Projectile at Time = 14 with ProjAnim, ProjHitAnim, velocity = 5.5,0, projpriority, own HitDef params, AnimTime = 0 back to 0 |
| Air fireball | Goku SSJ 1005 | Same, type = A, physics = N until the throw, ProjHeightBound to remove it on the floor |
| Beam super | Goku SSJ 1800 | poweradd = -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 rush | Goku SSJ 1050 | One long action, VelAdd pairs on alternating AnimElem (+4 then -4), EnvShake on the last element |
| Throw | Goku SSJ4 1601 | TargetBind every element, TargetLifeAdd at AnimTime = 0, TargetState to a wake-up state |
| Clone | Aizen 700 | A 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 spark | Aizen 995 | Helper on movehit = 1 && numhelper(995) = 0, postype = p2, scaled by Helper(999999) variables |
| Counter | Aizen Kyouka Suigetsu | ReversalDef or HitOverride window, then a state that teleports with PosSet |
| Teleport | Aizen Shunpo | PosAdd by p2dist x + 40 then Turn (the exact code UMF emits for teleport) |
| Form | Gogeta Kaio Ken | var(11) flag, -2 adds power each tick, AttackMulSet 1.2, DefenceMulSet 1.2, Explod aura every 10 ticks |
| Power up | Goku SSJ 730, 735, 740, 741 | Override 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
| Pack | Top controllers |
|---|---|
| Aizen | PlaySnd 142 + 122, ChangeState 68 + 46, Explod 57 + 57, Helper 37 + 41, DestroySelf 37 + 27, HitDef 30 + 28 |
| Gogeta | ChangeState 145, Explod 109, PlaySnd 95, HitDef 38, VelAdd 37, Projectile 32, EnvColor 21, SuperPause 18 |
| Goku SSJ | VelAdd 38, HitDef 37, ChangeState 34, Projectile 12 |
| Goku SSJ4 | PlaySnd 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..pal12in 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
- 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.
- 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).
- Frame data targets the table above: light 4 to 8 tick pause, heavy 11 to 12, ground hit time 11 to 15.
- 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)
| Fighter | Game | Defining tools | UMF take-away |
|---|---|---|---|
| Ken | Street Fighter | Fast run-in kicks, quick shoryuken, kara-cancel normals | Short dash attack that cancels into specials (lunge) |
| Chun-Li | Street Fighter | Lightning legs multi-hit, fast jab chain, strong air normals | Many-hit light specials, air kicks with forward drift |
| Cammy | Street Fighter | Spiral arrow dive, cannon strike, fast footsies | Diving air kick with angled velocity (falcondive) |
| Akuma | Street Fighter | Air fireball, demon flip, teleport, low health | Air versions of every special, teleport ability |
| Sol Badguy | Guilty Gear | Gunflame, Volcanic Viper, Roman Cancel | Cancelable specials, invuln uppercut |
| Ky Kiske | Guilty Gear | Stun Edge projectile, Vapor Thrust, toolbox | Projectile + anti-air pair |
| Chipp Zanuff | Guilty Gear | Teleport, wall cling, dash strings | Fast mobility with teleport and super speed |
| May | Guilty Gear | Dolphin ride, Beach Ball, command jump | Mixed mobility specials |
| Jack-O | Guilty Gear | Servants, install | Helper style projectiles |
| Ramlethal | Guilty Gear | Swords, long reach | Long-reach normals |
| Testament | Guilty Gear | Trap setups | trap projectiles |
| Goku | Dragon Ball FighterZ | Auto combo, super dash, Kamehameha, Instant Transmission | Light auto string, super speed, teleport |
| Vegeta | Dragon Ball FighterZ | Galick Gun, Final Flash, fast low pokes | Beam supers, rage |
| Gogeta | Dragon Ball FighterZ | Mixed beams and rushes | Multi-hit supers with invuln |
| Cell | Dragon Ball FighterZ | Beam, regenerate, Solar Flare | Life regeneration passive |
| Frieza | Dragon Ball FighterZ | Death Beam, Death Ball | Piercing multi-hit projectile |
| Kyo Kusanagi | King of Fighters | Rekka series, jump-in, fast pokes | Special that cancels into follow-ups |
| Iori Yagami | King of Fighters | Command dash, Scumgale, rage | Rage passive, forward lunge |
| Mai Shiranui | King of Fighters | Fan projectile, flying squirrel dive | Air dive and fan projectile |
| K' | King of Fighters | Fast mid-range kicks, flame | Fast pokes + projectiles |
| Athena | King of Fighters | Psycho Ball, teleport | Teleport |
| Terry Bogard | Fatal Fury | Power Wave, Burn Knuckle, Rising Tackle | Ground wave, command rush, invuln uppercut |
| Hyde | Under Night In-Birth | Fast gap close, strong lows | Run-in strikes |
| Yuzuriha | Under Night In-Birth | Evasive dashes, lone action | Evasive dash |
| Wolverine | Marvel vs Capcom 3 | Berserker Slash, Tornado Claw, Drill Claw | Dive and rush specials, regeneration |
| Zero | Marvel vs Capcom 3 | Rekkoha, Hyper Zero Rush | Many-hit rush super |
| Dante | Marvel vs Capcom 3 | Style cancels, juggling | Cancel routes between moves |
| Fox / Sheik | Smash Bros | Fast aerials, short hops | Air-first neutral |
| Scorpion | Mortal Kombat | Spear, teleport punch | Pull projectile, teleport |
| Sub-Zero | Mortal Kombat | Freeze ball, slide, clone | Slide low (slide) + freeze projectile |
| Peacock | Skullgirls | Trap projectiles, screen filling | Many small projectiles |
| Akira Yuki | Virtua Fighter | Single-hit heavy hits, strong throws | Strong launch hits, grabs |
| Jacky Bryant | Virtua Fighter | Fast kicks, juggles | Fast kick chains |
Strong fighters (power, armor, grabs)
| Fighter | Game | Defining tools | UMF take-away |
|---|---|---|---|
| Zangief | Street Fighter | Spinning Piledriver, command grabs, lariat | Command grab, lariat, armor |
| Sagat | Street Fighter | Tiger Shot, Tiger Uppercut | High/low projectile pair, invuln uppercut |
| M. Bison | Street Fighter | Psycho Crusher, Scissor Kick | Armored charge (shoulder) |
| Guile | Street Fighter | Sonic Boom, Flash Kick, charge | Charge motion, invuln anti-air |
| Broly | Dragon Ball FighterZ | Armor, Gigantic Meteor | armor, rage passive |
| Heihachi | Tekken | Electric wind god fist, launchers, power crush | Launcher normals, armored move |
| Kazuya | Tekken | Electric wind god fist, hellsweep | Fast mid launcher |
| Jin Kazama | Tekken | Mid launchers, Devil form | Forms |
| Law | Tekken | Dragon kicks, fast mids | Kick strings |
| Paul | Tekken | Deathfist, big launcher | Heavy single hit |
| Nina / Xiaoyu | Tekken | Fast pokes, stances | Stance-like follow-ups |
| Liu Kang | Mortal Kombat | Bicycle kick, flying kick | Dive kick special |
| Raiden | Mortal Kombat | Torpedo, lightning | Rush and projectile |
| Haohmaru | Samurai Shodown | Heavy slashes, rage | Few strong hits, rage |
| Nakoruru | Samurai Shodown | Hawk companion, fast attacks | Helper projectile |
| Ragna | BlazBlue | Gauntlet, Inferno Divider, life drain | Life drain passive |
| Magneto | Marvel vs Capcom 3 | Beams, flight | flight |
| Filia | Skullgirls | Hair projectiles | Hair rush |
| Hulk / Colossus | Marvel | Armored rushes, armor | armor hits |
| Ryu | Street Fighter | Fireball, uppercut, spinning kick | Canonical special set |
Patterns turned into engine features
- Dash attacks and armored charges (
lunge,shoulder) as command normals that still cancel into specials. - Air dives with angled velocity and ground bounce (
falcondive,meteordrop). - Specials that cancel into other specials through explicit
cancelsroutes. - Invulnerable anti-airs (
invuln) and one-hit armor on slow, heavy moves. - Fast fighters trade damage for mobility (low
hitstunnormals,superSpeed,teleport); strong fighters gainarmor,wallBounceand heavylevelhits.
Applied to the native roster
| Group | Fighters | New moves |
|---|---|---|
| Fast | Jin, Akio, Lian, Suzume, Kaname, Haruki, Kaito, Volta | lunge (F+y, dash strike, 115 % of the heavy punch, cancels into specials) and falcondive (air F+b, angled dive) |
| Strong | Bruno, Garan, Daichi, Valdric | shoulder (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
- Design the kit: normals (light, medium, heavy, crouching, air), 3-4 specials, 1-2 supers, throw, dash.
- 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.
- Package: Fighter Factory loads PCX/PNG into an SFF; a
.airfile sets frames and Clsn boxes;.cmdholds inputs;.cnsholds states. - Frame data: light normals startup 3-5 ticks, heavies 8-14; hitstop 9-13 ticks.
- 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
| Game | What it is known for |
|---|---|
| Dragon Ball FighterZ | Anime-fidelity visuals, 3v3 assists, simple auto-combo for beginners, ranked lobbies with arcade-style lobby avatars |
| Sparking! Zero | Large roster, destruction and arena feedback, a long tutorial and a battle-rules customizer |
| Melty Blood: Type Lumina | Moon 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 Battle | Simple 2-button layout, assist system, rollback after patching |
| Street Fighter 6 | Modern controls, Drive gauge HUD, in-game frame meter, replay sharing, Battle Hub, tutorial and character guides |
| Mortal Kombat 1 | Kameo assists, Krypt-style extras, training with tutorial for each character |
| Tekken 8 | Practice mode with heat and rage, ghost battle, replay and tips, character-specific guides |
| Them's Fighterz, Skullgirls | Rollback, training mode with strong tools (Skullgirls in particular), colorblind and visual options, in-game tutorial |
| Persona 4 Arena Ultimax | Hit-stop and cinematic supers, story presentation |
| The King of Fighters XV | Team select with order, 3v3 sequence matches, rollback, practice mode |
| Under Night In-Birth II | Compact 6-button layout, GRD system HUD, rollback, deep training |
| Ikemen GO and the M.U.G.E.N community | Open 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.
| Area | Today |
|---|---|
| Modes | Arcade, Versus CPU, 2 players, Training, CPU vs CPU, Team sequence, Team simul (Mode in src/app.rs) |
| Training | Dummy pilot (Pilot::Dummy), infinite meter, hitbox toggle in the pause menu |
| Pause menu | Continue, Hitboxes, Restart, Change fighters, Settings, Main menu |
| HUD | Glass panels, big portraits, combo counter, low-life pulse, MAX meter, urgent timer (PR #156) |
| Impact feedback | Particles, shake, hit-stop, KO slow motion, super cut-in, chromatic aberration, effect intensity setting |
| Settings | Tabs for Video, Audio, Controls, Gameplay, Language, About |
| Netplay | Rollback with GGRS over UDP through CLI flags only (--netplay, --peer); .umr replay files; no in-game lobby, no browser or mobile transport yet |
| Replays | Re-simulation of the last finished fight from recorded inputs; replay file format exists |
| Content | Marketplace from GitHub repos, .def/.zip import, native UMF fighters |
| Tutorial and trials | None. 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
| # | Opportunity | Rationale | Effort | Touches |
|---|---|---|---|---|
| 1 | Training 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 modes | Practice 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 view | M | Pilot::Dummy in src/session.rs, pause menu in src/app.rs, new HUD overlay in src/hud.rs |
| 2 | Input display and frame data overlay: scrolling input history with frame counts, plus last-move startup, active, recovery, advantage and damage | SF6 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 derive | M | src/hud.rs, crates/engine (read-only hooks on Match), src/session.rs |
| 3 | In-game online screen: host or join by code, direct IP, input delay and ping shown before the match, rematch button | Rollback 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 chose | L | src/netlink.rs, crates/netplay, new Screen::Online in src/app.rs |
| 4 | Netcode quality UI: connection graph (ping, jitter, rolled-back frames), per-match stats and a "poor connection" warning before accepting a match | Guilty Gear -Strive- and SF6 expose connection quality bars; the ROADMAP section 1 already lists this | S | src/hud.rs, crates/netplay (expose stats) |
| 5 | Guided tutorial: basics (move, block, special, super), then per-character move list with live input display | SF6, Tekken 8, Strive and Skullgirls ship tutorials; MUGEN-style engines normally have none, so newcomers have no onboarding | L | New Screen::Tutorial, src/app/cutscene.rs reuse for text panels |
P1: strong value, moderate cost
| # | Opportunity | Rationale | Effort | Touches |
|---|---|---|---|---|
| 6 | Combo trials from a per-character JSON list, with on-screen next-input prompts and success feedback | Guilty Gear, SF6, DBFZ and Melty Blood have trials; the ROADMAP already lists it. Fits UMF, where creators can ship trials with the fighter | M | New trial runner on top of Session, UMF schema in docs/CHARACTER_FORMAT.md |
| 7 | Simple (modern) control scheme: optional one-button specials and auto-combo, toggled per player, with a matching HUD marker | SF6 Modern, DBFZ, Melty Blood and BlazBlue Cross Tag all have simplified inputs, which matters for touch screens in particular | M | src/controls.rs, src/keybinds.rs, command layer in crates/engine |
| 8 | Accessibility 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 inputs | Several current fighters offer colorblind modes and reduced flash. The effect intensity setting exists but is a single knob | M | src/settings.rs, src/app/settings_screen.rs, src/vfx.rs, src/hud.rs |
| 9 | Replay viewer upgrade: replay list screen, playback speed, pause, frame step, camera control, "take over" a character mid-replay, save and share .umr | SF6, Tekken 8 and Strive allow replay browsing and sharing; the file format and re-simulation are already deterministic | M | src/app.rs (Replay), crates/netplay (.umr), new Screen::Replays |
| 10 | Ranked and matchmaking queue (server needed): rating, anonymous queue, rematch, win streak | Standard in every console fighter. Requires a small service, so it comes after lobbies prove stable | XL | New service plus Screen::Online |
| 11 | Select screen upgrades: character info card (moves, difficulty), stage preview, palette and color preview, random-select roll animation, shuffle favorites, filter by tag and source | KOF 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.rs | M | src/app.rs select code, src/menu_art.rs |
| 12 | Pause 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 exists | S | src/app.rs pause menu and Screen::Results |
P2: depth and polish
| # | Opportunity | Rationale | Effort | Touches |
|---|---|---|---|---|
| 13 | Training options page: infinite or regenerating life, meter modes, damage readout, hit-stun display, combo damage and scaling readout | Available in practically every training mode | S | Pause menu, src/hud.rs |
| 14 | Survival, boss rush and tower modes with rewards | Present in Mortal Kombat 1 (towers), Sparking! Zero and Tekken; ROADMAP section 5 | M | New Mode variants, Team reuse |
| 15 | Arcade ladder presentation: rival matches, character-specific intros and endings from storyboard files | Arcade ladders with rival encounters are standard in Tekken, MK and KOF; Cutscene screen already supports story scenes | M | src/app/cutscene.rs, storyboard loader |
| 16 | Spectator mode for rollback matches (watch a live room) | Tournament and community play on Strive and SF6 use this heavily | L | crates/netplay, Screen::Online |
| 17 | Per-match battle rules: round count, timer, damage scale, gravity, handicap | Sparking! Zero's custom rules, MK modifiers, and MUGEN community configs | S | Rules struct (Rules already exists in Replay) |
| 18 | Frame-meter and hit-box color legend drawn in real time (strike, hurt, throw, projectile) with a legend | Matches the frame meter in SF6 and the hitbox modes in Skullgirls training | M | src/render.rs debug draw |
| 19 | Controller UX: input latency test, gamepad button test, per-device profiles, dead-zone and SOCD choice | Needed for stick and pad players; a latency test page is common in fighters | S | src/controls.rs, src/gamepad.rs |
| 20 | Menu feel: sound and animation for every cursor change, hold-to-repeat navigation, mouse and touch parity, back-button behaviour on mobile | Polish seen across all surveyed games | S | src/ui.rs, src/app.rs |
P3: ecosystem and long term
| # | Opportunity | Rationale | Effort | Touches |
|---|---|---|---|---|
| 21 | Screenpack skin support for lifebars and select screens (fight.def, system.def) rendered on wgpu | The 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 done | XL | crates/formats/src/screenpack.rs, src/hud.rs, src/menu_art.rs |
| 22 | Mod and marketplace discovery: ratings, tags, screenshots, update notifications | Mod-friendly games (Ikemen GO, Skullgirls community tools) rely on discoverability; marketplace already ships | M | crates/market, src/app/market.rs |
| 23 | Character-specific tips and move guides authored by creators in UMF | Same idea as the guides in SF6 and Tekken 8 | S | UMF schema, tutorial screen |
| 24 | Tournament tools: bracket from .umr replays, offline match recorder, overlay for streamers | Fits the roadmap section 2 | L | New tooling crate |
| 25 | Localization expansion (Spanish, Japanese) and screen-reader labels | ROADMAP section 5 | M | src/i18n.rs |
Suggested sequence
- Training toolkit (1, 2, 13), because every other feature is easier to verify with it.
- Netcode UI and online screen (4, 3), then replays (9).
- Tutorial and trials (5, 6), then accessibility and modern controls (8, 7).
- Select and results polish (11, 12), then modes (14, 15).
- Ranked service and spectator (10, 16) once lobbies are stable.
- 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
Matchshould also be included inume_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
| Engine | Licence | UI relevance | What we can use |
|---|---|---|---|
| Macroquad | MIT OR Apache-2.0 | High. 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. |
| Fyrox | MIT | High. 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, style | Reference 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. |
| Bevy | MIT OR Apache-2.0 | Medium. 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. |
| Ambient | MIT OR Apache-2.0 | Low to medium. A UI element tree (element, element_component) built on its own runtime | Only the idea of composing small reusable elements (button, panel, label) with props. Its runtime is too large to borrow from. |
| GGEZ | MIT | Low. No UI layer; has a graphics text/glyph path and timers | Reference for a minimal loop and text rendering with glyph caching. Nothing to copy for UI chrome. |
| Tetra | not checked | Low (article only) | Nothing needed beyond what we have. |
| Amethyst | not checked | Low (article only). Project status should be checked before any reference | Skip. |
| Piston | not checked | Low (article only) | Skip. |
| Nannou | not checked | Low (article only; creative coding, not a game UI) | Skip. |
| Blue Engine | not checked | Low (article only) | Skip. |
| rend3 | not checked | Low (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.
- Loading screen with a progress bar and tips. Fyrox's
progress_barand Macroquad's simple panel style show the pattern. We already havesrc/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. - Keyboard and gamepad focus navigation with key-repeat. Macroquad's
key_repeat.rsand Fyrox'snavigation.rs. Holding up/down in menus should step smoothly, and focus should be visible on every screen. - Settings widgets: dropdown, tabs, scroll viewer. Fyrox's
dropdown_list,tab_control,scroll_viewerand Macroquad's combobox define the expected behaviour (open, close on outside click, keyboard selection). Put them in new files undersrc/ui/orsrc/app/, usingui_tokens. - Confirm dialogs and tooltips. Fyrox's
messageboxandpopupfor "quit match?", "delete replay?" and similar prompts. Keeps destructive actions explicit. - Theme struct for colours and sizes. Macroquad's
style.rsand Fyrox'sstylemodule. We already have 11 themes inmenu_art.rs; moving their values into oneThemestruct with tokens makes adding a theme a data change. - 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).
- Headless widget behaviour. Bevy's
bevy_ui_widgetsidea: 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.
| Item | Status |
|---|---|
| Loading screen with progress bar and tips | Already there: Ui::loading_screen, progress_bar, src/loading_tips.rs, real step labels in src/app/loading.rs. Keep. |
| Smooth menu focus | Already there: src/app/menu_focus.rs (frame-rate independent easing). Keep. |
| Confirm dialogs | Present for replay deletion in replay_browser.rs; pause has its own skin. Other destructive actions could reuse the pattern. |
| Screen transitions | Already there: diagonal wipe in src/app.rs. Keep. |
| Key repeat when a direction is held | Was 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 struct | Not 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.
Related
- Engine for the render and UI stack.
- Visual Effects for the effects pipeline.
- Portuguese version: Referencias-UI-Engines-Rust.
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
stringson the engine-module DLL. No binary was executed. - REA (
rea-agents6.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 decompileff.mugen.dllto 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
| Area | Finding |
|---|---|
| Editor modules | Sprites (SFF 1/2, onion skin, layers), Animations (visual and code), Palettes, Sounds, Commands, States, Definitions, Emulator and Debug workspaces |
| Scripting | Lua 5.3 scripts for editor automation (scripts/tool, scripts/project) |
| Engine module | One 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) |
| Emulator | An 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
- 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. - Aligned export with one common axis ("perfect axis") plus onion skin while aligning.
- Sprite explorer: create an animation straight from selected thumbnails.
- Per-frame loop point, scale, angle and interpolation flags.
- Variable usage list and log per state file (
var,fvar,sysvarcollisions between states and helpers). - 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_checkfrom 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_indexstyle names inimport_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.
| Artifact | Size | Role |
|---|---|---|
index.html | 11 KB | shell: boot, menu, select, options |
local-runtime.js | 342 KB | obfuscated bootstrap: holds the Go wasm_exec glue and the frame module as strings, plus the content catalog |
runtime-ui.js | 420 KB | the DOM UI (obfuscated, digest-gated) |
frame.html | 2.2 KB | engine host: one <canvas id="ikemen-canvas"> |
runtime-engine.bin | 5,887,387 B | gzip of a 25,343,508 B WebAssembly module |
content/catalog.shvd.json | 265 KB | 78 characters, 74 stages, pack URLs, sha256, sizes |
content/packs/*.zip | 1–24 MB each | unmodified 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):
| Structure | Fields that matter |
|---|---|
Animation | frames, loopstart, curtime, curelem, totaltime, looptime, interpolate_offset/scale/angle/blend, mask, transType, srcAlpha/dstAlpha |
AnimFrame | Group, 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:
Animation.Action()advancescurtime; attotaltimeit jumps toloopstartand setsnewframe.Animation.UpdateSprite()runs every tick but only does work whennewframeis 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'sRemappresets.- Rendering reads
frames[drawidx]for the transform and the cachedsprfor 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×1palette texture (newPaletteTexture()→newTexture(256, 1, 32, false)). Changingpal1…pal12orRemapPalre-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 onetexSubImage2Dper sprite that actually changes. palFX(add,mul,color,hue,invertall) is per-sprite uniforms on the same draw — no second pass, noRenderModeshader switching.- Trapezoid distortion (floor shadows /
xscaleskew) is computed in the same shader fromgl_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):
| Metric | Value |
|---|---|
| Canvas backing store | 640×480 (CSS 1280×720, object-fit: contain) |
drawArrays per rAF | p50 82–105, p95 113–163, max 172–224 |
bufferData per rAF | 82–125 (one small upload per sprite; runs of text share one) |
| Uniform calls per rAF | 322–397 |
useProgram per second | 30–76 (a handful per frame) |
bindTexture per second | 1.4k–6.2k |
| Engine frames per rAF | 0.78–0.89 (fixed 60 Hz, gated) |
| JS heap in a match | 9–74 MB |
| Boot → menu | 1.9 s |
| Menu → select | 4.0 s |
| Select → first fight | 37 s (core + 2 fighter packs + stage over the network, then SFF decode) |
| Long tasks during a match | 50–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 onejs.CopyBytesToJS+ oneInvokeof a JS interpreter built with theFunctionconstructor.- 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:
| Concern | Ikemen web build | Ultimate MUGEN |
|---|---|---|
| Draw calls | 1 per sprite (82–172/frame) | batched: quads merged per blend state + scissor into one vertex/index buffer |
| Bind state | per-sprite texture binds, 16-unit LRU | one bind group; atlases + palette texture bound once |
| Palette | 256×1 texture per sprite, per-sprite upload on change | 1024 palette rows in one texture, row index per vertex, RemapPal swaps the row |
| Atlas | none for sprites (per-sprite textures) | RGBA atlas + 8-bit index atlas, reset independently |
| Simulation | whole fighter state machine in WASM | hotpath_bench (below) |
| Frame pacing | rAF gate at Video.Framerate | ume_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 | |
|---|---|
| before | 212.8 ms in 'fight:prefetch' (one frame) |
| after | 2.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 port | State here | How to verify |
|---|---|---|---|
| 1 | Never pay a whole match inside one frame | done: App::warm_step + Gfx::prefetch_step, 512 KiB per frame, VS step and start_fight both spread | UME_WATCHDOG=1 label load:sprites; F3 up/KB |
| 2 | Keep the transition frame free in the paths with no VS screen | done: start_fight yields a frame per chunk | UME_WATCHDOG=1 worst frame at the transition |
| 3 | Draw-call budget is a first-class number | done: DRAW_CALL_BUDGET + batch test | cargo test -p ume-render |
| 4 | Palette rows as a scarce resource | done for duplicates: PaletteRows shares rows by content | cargo test -p ume-render |
| 5 | Sprites are never atlased on the web build | not 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 sprites | atlas {} fill in the F3 overlay |
| 6 | One shader for every sprite effect | already true (sprite.wgsl: flat/RGBA/indexed/palFX/tint in one pass) | cargo test -p ume-render --test shader |
| 7 | Yield while decoding | load:character already runs one character per step; keep new decoders inside that budget | UME_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 port | Ultimate MUGEN | |
|---|---|---|
| Draw calls for the same kind of scene | one per sprite, 82–105 per frame | merged by blend + scissor, budget 24, test-enforced |
| Palette changes | 1 KB upload per sprite that changes palette | palette rows deduplicated by content, shared across fighters |
| Simulation cost | whole state machine inside one WASM thread | 4–20 µs per tick (0.03–0.12 % of a frame) |
| Warm-up / transition | uploads spread by luck (per-sprite textures) | explicitly budgeted per frame, rematch copies nothing |
| Hitch observability | none | UME_WATCHDOG=1 with per-phase labels, F3 with uploads/KB and atlas fill |
| Content licensing/portability | bundles third-party M.U.G.E.N characters | loads the player's own mugen/ folder, UMF, or the marketplace |
Not better (yet):
| Browser port | Ultimate MUGEN | |
|---|---|---|
| Shipped in a browser | yes, 78 fighters, 74 stages, netplay via GGPO rollback | wasm build exists but the roster ships as packs; no equivalent catalogue |
| Content volume | 78 fighters, 74 stages, per-match lazy packs | whatever the player installs |
| Cross-device reach | phones, tablets, desktop | desktop, 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).
| Parameter | Applies to | Mechanism |
|---|---|---|
| Life | MUGEN and UME | data.life |
| Damage dealt | MUGEN and UME | data.attack (fighter attack multiplier) |
| Damage taken | MUGEN and UME | tuning.defence read by the fighter defence multiplier |
| Walk, run, jump | MUGEN and UME | velocity.* constants |
| Gravity | MUGEN and UME | movement.yaccel |
| Power bar | MUGEN and UME | data.power |
| Energy cost | MUGEN and UME | negative 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 |
|---|---|
| 1 | 3 hits |
| 2 | 5 hits |
| 3 | 8 hits |
| 4 | 25% of the rival's life in one combo |
| 5 | 6 or more hits finishing with a super (at least 1000 power spent) |
| 6 | 10 or more hits without spending any meter |
| 7 | 45% 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: pureTracker, fed once per frame with the player'scombo_count,combo_damage,powerand the rival'slife_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::demoreplaces 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)
| Feature | Status | Notes |
|---|---|---|
| SFF v1.01, PCX RLE sprites | Implemented | sff.rs, pcx.rs |
| SFF v1, PCX uncompressed rows | Implemented | bytes_per_line honored |
| SFF v1, 8-bit PCX (256-colour trailer palette) | Implemented | |
| SFF v1, 1/4-bit or 24-bit PCX | Missing | Header bit depth is ignored; such files decode as garbage. Rare in real packs |
SFF v1, shared palette (same pal flag) | Implemented | Inherits the previous sprite's palette |
SFF v1, linked sprites (length = 0) | Implemented | |
| SFF v2.00 / 2.01, raw 8-bit | Implemented | |
| SFF v2, raw 24-bit and 32-bit | Implemented | Converted to RGBA |
| SFF v2, RLE8 / RLE5 / LZ5 | Implemented | sff/codecs.rs |
| SFF v2, PNG 8 / 24 / 32 | Implemented | Broken PNG gives an empty, transparent sprite |
| SFF v2, palettes (RGB and RGBA, linked palettes) | Implemented | |
| SFF v2, palette-per-sprite selection | Implemented |
SND (sounds)
| Feature | Status | Notes |
|---|---|---|
ElecbyteSnd container, group/index keys | Implemented | First duplicate key wins, as in M.U.G.E.N |
| Subfile chain with corrupt-link guard | Implemented | |
| WAV PCM 8 / 16-bit (the normal case) | Implemented | Decoded by symphonia in the audio layer |
| WAV ADPCM, 24-bit and other WAV codecs | Partial | Depends on what symphonia accepts; not verified per codec |
AIR (animations)
| Feature | Status | Notes |
|---|---|---|
[Begin Action N], frames, time | Implemented | Duplicate actions: first wins |
Frame flips H / V | Implemented | |
Blending A, A1, AS<n>D<n>, S | Implemented | |
Clsn1 / Clsn2 and Clsn1Default / Clsn2Default | Implemented | |
xscale, yscale, angle per frame | Implemented | |
Loopstart | Implemented | |
Interpolate (blend, offset, angle, scale) | Missing | Line accepted and ignored (air.rs); no interpolation between frames |
ACT (palettes)
| Feature | Status | Notes |
|---|---|---|
| 768-byte RGB palette | Implemented | Index 0 transparent, order reversed as in MUGEN |
| Short files (fewer than 256 colours) | Implemented | Missing entries stay black |
DEF and CNS (characters and stages)
| Feature | Status | Notes |
|---|---|---|
Character .def ([Info], [Files], localcoord) | Implemented | |
localcoord 320x240 and 640x480 and 1280x720 | Implemented | Positions and distances are converted per player |
Stage .def ([Info], [StageInfo], [Camera], [Player], [Bound]) | Implemented | |
Stage [BG] layers: normal, anim, parallax, trans, mask, maskwindow | Implemented | |
[BGCtrlDef] / [BGCtrl]: null, visible, enable, velset, veladd, posset, posadd, anim, sinx, siny | Implemented | |
Stage zoffset, autoturn | Implemented | Used by the engine (stagevar.rs, matchs.rs) |
Stage resetbg | Missing | Not read anywhere in the workspace |
Screenpacks
| Feature | Status | Notes |
|---|---|---|
system.def [Info] localcoord (4:3 and 16:9 packs) | Implemented | Converted to the HUD space |
system.def [Files], [Music], [Title Info], [Select Info] | Implemented | |
system.def [<name>BGdef] / [<name> N] backgrounds | Implemented | |
select.def [Characters], [ExtraStages], [Options] | Implemented | |
fight.def [Files], pN.* bars, element prefixes | Implemented | |
Storyboards ([SceneDef], [Scene N], fades, layers, bgm) | Implemented | |
.fnt v1 (embedded PCX, [Def], [Map]) | Implemented | |
.fnt v2 (bitmap and truetype) | Partial | Parsed in fnt.rs; truetype rendering not verified |
[Versus Screen], [Victory Screen], [Round Info] | Partial | Read through the generic element prefixes; not every key has a dedicated renderer; not verified on packs |
| WinMUGEN and MUGEN 1.0 / 1.1 quirks | Partial | Unknown keys are ignored, not rejected; no per-version switch |
Known gaps (next PRs)
Small PRs, in order:
- AIR
Interpolate(keyword currently ignored). - Stage
resetbg. - SFF v1 low bit depth (1 and 4-bit PCX). Needs a header palette path in
sff/;sff.rsis on the file-size baseline, so move the v1 code into its own module first. - Verify WAV codecs beyond PCM 8/16-bit with real packs.
- 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
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.
| Fighter | Move | Input | Style |
|---|---|---|---|
| Valdric | Sovereign | hold back 40 ticks, forward + y | Charge (zone control) |
| Volta | Tesla | hold back 40 ticks, forward + y | Charge (zoner) |
| Bruno | Lariat | 360° motion + y | Grappler, command throw |
| Daichi | Aura Rush | 360° motion + x | Grappler 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.
| Fighter | Air dashes |
|---|---|
| Suzume, Jin, Akio, Lian, Kaito | 2 |
| Bruno | 0 |
| Everyone else | 1 |
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
| Area | Official names checked | Implemented | Notes |
|---|---|---|---|
| State controllers | 90 | 90 | Guarded by a test. |
| Triggers (value form) | 92 | 92 | Guarded by a test. |
Triggers (comparison form, e.g. StateType = S, MoveType = A, AnimElem = 3, Command = "x", Name = "...") | 10 | 10 | Parsed in the expression layer, covered by mugen11_triggers.rs. Not in the probe list. |
Redirections (enemy, enemynear, partner, helper, parent, root) | 6 | 6 | Covered by enemy_selection.rs and helper_parity.rs. |
| Ikemen GO extensions | many | most | Listed in CNS-Scripts.md. |
Known partial items
DestroySelf:recursivealso destroys the helpers it spawned, andremoveexplodsremoves the explods it owns (semantics follow the Ikemen GO documentation).Helper:inheritjuggleandsize.xscale/sprpriorityparameters are not read by the spawn path.Explod:layerno = 1behaves likeontop(per the Ikemen GO wiki).layerno = -1andshadoware not read.PlaySnd,Pause,VarsetandTrans: parameter-level checks in the probe are inconclusive; these need a manual pass against the MUGEN docs before claiming full parameter coverage.MakeDust:spacingis honoured (dust appears everyspacingticks, default 1).
How to check a new name
- Add it to the matching list in
mugen_coverage_matrix.rs. - Run
cargo test -p ume-engine --test it mugen_coverage_matrix::. - 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
Model::from_glbparses a.glb(own parser overserde_json, PNG textures throughpng): nodes, skins, meshes, materials, animations.StateMap(JSON) maps native anim names (anims) or MUGEN state ranges (states) to a clip, loop flag and speed.- The pose is a pure function of
anim_no/anim_elapsed(orstateno/statetime), skinned on the CPU, so it is rollback safe. Model::projectuses an orthographic camera on the fight plane, flat Lambert shading and back-to-front triangles, drawn throughume_shell::quad::draw_meshbatched by texture. No GPU pipeline change.
In the game
src/model3d.rsis the facade (draw,draw_fit,is_3d,portrait);src/model3d/specs.rslists the models.- Fight: one line in
render.rs. Select, versus and results panels:draw_fitinsidedraw_char_fit. Tiles and loading useportrait. - The select screen has a
3Dcategory. - The awakened form swaps to the second model (Ichigo: Hollow Total).
src/model3d/aura.rsdraws the 3D-only effects: theAfterImagetrail 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 inclips.jsononto a rig fromrigs.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 ofkeyposes.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);bladeRis solved byblade_solve.pyinto the wrist rotation that aims Zangetsu, andkeys_<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 tovoices.bankand 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 bypython3 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,emissiveFactormarks 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-bufferRasterused by the fighters.src/model3d/airport.rsrenders 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.
| Field | Default | Range | Effect |
|---|---|---|---|
gravity | 1.0 | 0.25 to 4.0 | Scales 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
- Pause the fight (
P,Esc,Enteror the pause button). In a replay, pause withSpace. - Press
C. The pause menu disappears and the camera is yours. Esc,PorCleaves photo mode and returns to the pause menu.
Photo mode is not available in online matches, where the simulation can never stop.
Controls
| Key | Action |
|---|---|
W A S D / arrows | Pan the camera (slower the closer you are) |
+ / -, PageUp / PageDown, mouse wheel | Zoom between 0.6x and 2.5x |
F | Cycle the filter: Natural, Cinema, Noir, Vivid, Retro |
H | Show or hide the HUD (hidden by default) |
. | Advance one frame to find the exact moment |
R | Recenter the camera |
Enter / Space | Take 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.rsis 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::hiddenskips 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
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 }
}
| Key | Meaning |
|---|---|
intro | First-speaker line at the round start, used instead of the generic intro. |
taunt | Answer line, used instead of the generic taunt. |
attack | Attack 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)
| Flag | Meaning |
|---|---|
--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 N | audit only the first N characters / stages |
--fights N | fights per character (each against a different opponent and stage, default 2) |
--stage-fights N | opponent rotation step when a stage is the subject |
--only, --only-stage, --opponent | substring filters for characters, stages and the forced opponent |
--no-fights, --quiet | static 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:
| Code | Severity | Meaning |
|---|---|---|
fight-panic | critical | the match panicked while ticking (the message is kept in the report) |
fight-non-finite | critical | position, velocity, life or power became NaN/inf |
fight-life-range, fight-power-range | major | life or power left its own bounds |
fight-below-floor-p1/p2 | major | the fighter stayed more than 12 px under the floor for more than 20 ticks |
fight-stuck-p1/p2 | major | 420 ticks without control outside the lying states |
fight-endless-attack-p1/p2 | major | 240 ticks stuck inside one attack state |
fight-no-contact | major | the pair never landed a hit in 30 seconds |
fight-off-camera-p1/p2 | major | the fighter sat outside the view for more than 3 ticks |
fight-watchdog-rescue | major | the character's own hit/getup script never returned control |
fight-camera-nan | critical | the camera position or zoom became non-finite |
fight-engine-warning | minor | a warning the engine raised during the fight (missing anim, missing state) |
What the static pass checks
| Code | Severity | Meaning |
|---|---|---|
char-load-fail, char-load-panic | critical | the pack cannot be loaded at all |
char-no-anims, char-no-states, char-no-commands | critical | the .air/.cns/.cmd produced nothing |
char-web-quarantine | critical | the browser import refuses the pack (ume_formats::health), so it never shows up on the web |
char-unsupported-controller, char-unknown-trigger | major | a controller or trigger the engine does not run |
char-sprite-missing | major | an animation frame references a sprite the .sff does not have |
char-sprite-transparent | minor | the frame exists but every pixel is transparent |
char-sound-missing | major | PlaySnd asks for a sample the .snd does not have |
char-unknown-parameter | minor | a controller parameter the engine never reads |
char-wasm-atlas-overflow, char-wasm-atlas-pressure | major/minor | the sprite pixels cannot fit the 2048 browser atlas (4.2 M pixels), so it has to evict and re-upload |
char-load-slow | minor | loading 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.mdranks the characters and stages with the worst findings, and lists the slowest loading packs and the slowest simulation ticks.report.jsoncarries the summary, every finding and every fight (hits, damage, distinct states, tick cost).summary.jsonis the compact form (counts by code plus the first examples), small enough to keep in the repository.issues.csvis 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
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 }
]
}
}
| Key | Meaning |
|---|---|
max | Meter size, 1 to 200. |
gainHit, gainSpecial, gainHurt | Gain when a move connects, a special or super starts, and when hit. |
decayDelaySeconds, decayPerSecond | Idle time before the meter drains, and the drain rate. |
drainOnSuper | Spends the meter when a super ends, so the super benefits from it. |
riskPerSecond | Life lost per second while the meter is full. Never kills. |
tiers | Up 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
| Target | Command | Output |
|---|---|---|
| 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 |
| Web | node scripts/smoke-web.js web/dist <dir> | same files |
| Web mobile | SMOKE_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 id | Checks |
|---|---|
boot | fighters and stages registered, nothing quarantined, no import errors, title renders |
screens | menu, settings, controls, MUGEN import, market, replays, player card and tuning render |
select | fighter select (1P and 2P) and stage select render |
fight_1v1 | fight loads, round intro ends, combat deals damage, KO ends the match, results screen follows |
training | training mode loads and the simulation advances |
team_5v5 | ten fighters load and render |
story | story 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 nodown.bounce,wall.bounceor tripground.type, nop2stateno, and noforcenofall; - 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
| Scope | Covers | Why |
|---|---|---|
| Native (default) | hits from UMF native fighters | their fall is derived from level: heavy / launch, not authored per move |
| Everyone | also M.U.G.E.N fighters | M.U.G.E.N HitDefs set fall on purpose (sweeps, launchers); opt-in only |
| Classic | nobody | exact 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
UME_STORY_SCRIPT=<path>environment variable (if set and readable).story/campaign.tomlin the working directory or next to the game executable.- 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.tomlwith:
[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."]
titleandbeatsaccept either a plain string / string list (used in all languages) or a{ en, pt, es }table.alt_bossis used automatically when the player picks the stage's primaryboss.
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.
| Step | Name (pt-BR / en) | Cost | Duration | Effect |
|---|---|---|---|---|
| 1st | Potencial Liberado / Unleashed Potential | half a power bar | 12 s | attack x1.2, damage taken x0.9 |
| 2nd | Modo Fúria / Fury Mode | full power bar | 9 s | attack 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) andume_vpad_nav()(menuOK/BACK/START). The stick andA/Balso 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 andpagehide. 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=1forces 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
- Copy
0000-template.mdtoNNNN-short-title.mdwith the next free number. - Fill the sections; keep it under one page.
- Open it in the same pull request as the change, with status
Proposed; setAcceptedwhen it merges. - Never edit an accepted ADR to change its decision: add a new ADR that supersedes it and update the old status line.
Index
| ADR | Decision | Status |
|---|---|---|
| 0001 | Own wgpu renderer and winit shell, no game framework | Accepted |
| 0002 | One bytecode for CNS, ZSS and UMF; no Lua | Accepted |
| 0003 | Deterministic single-thread simulation for rollback | Accepted |
| 0004 | Wiki rendered with mdBook under /wiki/ on GitHub Pages | Accepted |
| 0005 | Crate dependency boundaries enforced in CI | Accepted |
| 0006 | Content is data first, with a documented extension table | Accepted |
| 0007 | UMF 2: JSON kept, compact frames, canonical layout, quality floor | Accepted |
| 0008 | UMF JSON Schema checked in CI; JSON + PNG kept after measuring alternatives | Accepted / Proposed |
| 0009 | LZ4 sprite container for native and M.U.G.E.N. sprites | Accepted |
| 0010 | Exact M.U.G.E.N. migration: original data in UMF, same load path, parity tool | Accepted |
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:
"format": "umf/2".umf/1files still load, so marketplace and imported fighters keep working.- A frame with only a pose name and a tick count is written
"pose*ticks". Frames withhit,effect,sprite,hurtoroffsetstay objects. Both forms can mix in one list. - 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. - 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. - The migration is lossless: the deserialized fighter of all 21 shipped files is identical before and after, apart from the
formatfield.
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
docs/schema/umf-2.schema.json(JSON Schema 2020-12) describes fighters andumf-kit/1kits and rejects unknown keys.scripts/umf-schema.mjsvalidates with a small in-repo validator (no dependency) andscripts/umf-schema.test.mjsruns it on every shipped fighter, kit and example in therelease-scriptsCI job. Packs outside the repo runnode scripts/umf-schema.mjs <file>.- Keep JSON for fighter definitions. Keep PNG as the authoring and interchange texture format.
- 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:
| Format | Bytes | gzip | Parse native / wasm (ms) |
|---|---|---|---|
| JSON as shipped | 1,158,382 | 191,011 | 12.9 / 12.5 |
| JSON minified | 907,786 | 167,811 | 9.9 / 10.7 |
| MessagePack | 656,470 | 175,755 | 8.3 / 11.1 |
| CBOR | 664,551 | 173,171 | 14.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:
| Format | MB | gzip MB | Decode native / wasm (ms) |
|---|---|---|---|
| PNG, own decoder | 7.89 | 5.58 | 102 / 134 |
PNG, png crate | 7.89 | 5.58 | 70 / 122 |
| WebP lossless | 5.44 | 4.94 | 91 / 191 |
| QOI | 4.84 | 3.00 | 28 / 32 |
| LZ4 raw RGBA | 7.27 | 5.16 | 35 / 38 |
| PNG, trimmed | 4.53 | 4.52 | 44 / 89 |
| QOI, trimmed | 4.63 | 2.98 | 21 / 27 |
| One atlas, PNG / QOI | 5.35 / 5.41 | 5.25 / 3.39 | 96 / 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
pngcrate 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:
| Codec | Pack MB | µs per sprite |
|---|---|---|
Original .sff (RLE8/LZ5) | 854 | 61 |
| LZ4 | 618 | 28 |
| zstd level 3 (C) | 412 | 48 |
| zstd level 19 (C) | 341 | 55 |
| deflate 6 | 378 | 73 |
PNG8, png crate / own decoder | 502 | 92 / 130 |
| QOI RGBA | 968 | 84 |
| ruzstd (pure Rust) | 412 | 140 |
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
- LZ4 (
lz4_flex0.14, safe mode) is the one compression for stored sprite pixels, for M.U.G.E.N. and native fighters alike. - Two containers share it:
UML1per sprite andUMSFper.sff(see the wiki page Sprite Container). Readers detect the magic, so PNG and classic.sffstill load. - Web fighter packs now carry
UML1indexed sprites instead of PNG8. - 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-sffverifies 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
UML1readers. - New dependency:
lz4_flex(MIT, pure Rust, nounsafein 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
mugenblock 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.jsonin SFF order). - The engine loader is split into
read_mugen_sourcesandassemble_mugen_char(MugenSources);ume_native::exactrebuildsMugenSourcesfrom 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
moveson 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 structuralCharDefdiff plus everyStatedef -1route 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ágina | Para quem | O que ensina |
|---|---|---|
| Instalação e execução | Jogadores | Baixar, compilar, rodar no PC, navegador e celular |
| Atualização automática | Jogadores | Auto-atualização pelas releases do GitHub, como desligar e flags |
| Configuração e controles | Jogadores | Arquivo .cfg, flags de linha de comando, variáveis de ambiente, controles |
| Adicionar conteúdo M.U.G.E.N | Jogadores | Instalar personagens e cenários .def/.zip e validar |
| Mercado GitHub | Jogadores | Instalar personagens, cenários e músicas de qualquer repositório do GitHub |
| Lutadores 3D (protótipo) | Contribuidores | Lutador glTF com esqueleto desenhado no plano 2D da luta |
| Seleção de personagem | Jogadores | Tela de seleção, retratos, equipes e atalhos |
| Modos de jogo | Jogadores | Arcade, equipes (Sequência, Paralelo, Tag) e suas regras |
| Easter Eggs durante as lutas | Jogadores | Marcos secretos de combate, cameos de cenário e interações de lore |
| Objetos de cenário | Jogadores, criadores | Caixotes, barris e carros quebráveis, comida, fases bônus e seus dados em TOML |
| Universo e Lore | Jogadores e Criadores | Cosmologia, facções, sistemas de energia e a Grande Convergência |
| Dossiê dos Personagens | Jogadores e Criadores | Fichas biográficas, retratos, golpes, rivalidades e cenários associados |
| Replays | Jogadores | Lutas gravadas, navegador de replays, velocidade de reprodução |
| Decisões de compatibilidade | Criadores | Recursos rejeitados por decisão e o motivo |
| Scripts Lua | Criadores | Para que serve Lua em pacotes M.U.G.E.N e as alternativas sem Lua |
| Arquivos de rota | Criadores | Rotas de arcade e regras de desbloqueio em TOML |
| Criar um personagem (guia rápido) | Criadores | Um lutador funcionando em dez linhas, herdado de outro |
| Criar personagem UMF | Criadores | Referência completa: todos os campos de um lutador em um único JSON |
| Passivos | Criadores | Fúria, acúmulos de habilidade e regeneração por dados |
| Potencial Liberado | Jogadores | Transformação genérica para personagens importados: Potencial, depois Fúria |
| Câmera de Replay | Jogadores | Enquadramento cinematográfico do replay: aproxima em lutas próximas e acompanha o ataque |
| Modo Foto | Jogadores | Câmera livre, filtros e captura PNG limpa em luta pausada ou replay |
| Desafios de Combo | Jogadores | Sete metas de combo no treino, salvas por lutador |
| Mutadores | Criadores | Mudanças de regra por partida; gravidade é o primeiro mutador |
| Golpes em pé | Jogadores, Criadores | Golpes leves empurram sem derrubar; limiar por % de vida |
| Rush Cancel | Jogadores e Criadores | Gaste energia para cancelar um golpe conectado, Overdrive e a apresentação |
| Níveis de Combo | Jogadores e Criadores | Selos de combo, marca de energia, air dashes e rebotes |
| Kits inspirados em Bleach | Jogadores | Ideias de Byakuya, Yoruichi e Zaraki em tres nativos |
| Quadros de efeito | Criadores | Efeitos de projétil e faíscas |
| Scripts CNS | Criadores | Estados, controllers, triggers e comandos suportados |
| Flags do AssertSpecial | Criadores | As 77 flags do Ikemen e o efeito de cada uma |
| Vida vermelha, tontura e defesa | Criadores | RedLife, DizzyPoints, GuardPoints, estados 5300/5400 e padrões do HitDef |
| Screenpacks | Criadores | Suporte a screenpacks de menu e HUD |
| Matriz de formatos | Criadores | Status de SFF, SND, AIR, ACT, DEF e screenpacks |
| Estudo de screenpacks | Criadores | Diferenciais de screenpacks e o que o motor adotou |
| Dissecação de quatro lutadores | Desenvolvedores | Aizen, Gogeta, Goku SSJ e SSJ4: arquivos, comandos, normais e padrões de golpe |
| Recriar um lutador M.U.G.E.N | Criadores | Receita e mapeamento para UMF, com a reconstrução do Captain Marlow Reyes |
| Checklist de conversão MUGEN | Criadores | O que o conversor MUGEN para UMF migra, o que é parcial e o que falta |
| Biblioteca de habilidades | Criadores | Blocos reutilizáveis (blink, vfx, quake, projectile.repeat, kit abilities) e o mapa de lacunas do MUGEN |
| Importar sprite atlas | Criadores | Transformar uma folha de sprites em lutador |
| Ferramentas de desenvolvimento | Contribuidores | Ferramentas Rust de build e auditoria (ume-tools) |
| Auditoria de elenco | Desenvolvedores | Lutar com cada personagem e cenário e ler um relatório por severidade |
| Ferramentas de sprites | Criadores | Fatiar folhas, variantes de paleta, caixas de colisão automáticas |
| Gerador de golpes | Criadores | TOML para AIR, CNS, CMD e Statedef -1 |
| Criar um cenário (guia rápido) | Criadores | Cenário a partir de um .def, dados do modo história e o que ainda precisa de código |
| Criar cenários | Criadores | Referência completa: cenário M.U.G.E.N .def e cenário nativo |
| Arquitetura | Desenvolvedores | Mapa de crates, direção das dependências, onde o código novo entra |
| Contribuindo | Contribuidores | Compilar, verificações, regras e fluxo de pull request |
| Pontos de extensão | Criadores, Contribuidores | Qual arquivo define cada tipo de conteúdo e se precisa de Rust |
| Decisões de arquitetura | Contribuidores | ADRs: por que o engine é feito assim |
| Customizar a engine | Desenvolvedores | Arquitetura, novo controller, novo trigger, testes |
| Smoke da partida web | Desenvolvedores | Teste de CI que joga partidas completas no navegador e pega travamentos |
| Layout de arquivos | Desenvolvedores | A regra de 250 linhas, uma responsabilidade por arquivo, dividir arquivos, PRs paralelos |
| Desempenho | Desenvolvedores | Carga paralela, ritmo de quadros, benchmarks |
| Engenharia reversa do port para navegador | Desenvolvedores | Como uma build de M.U.G.E.N com 78 lutadores roda no navegador, e o que copiamos dela |
| Pesquisa de jogos de luta | Desenvolvedores | Pesquisa de outros lutadores e lista priorizada de melhorias |
| Auditoria de animações nativas | Desenvolvedores | Cobertura de poses do elenco nativo |
| Smoke test (modo debug) | Desenvolvedores | Um comando valida as features principais no desktop e na web, com prints e relatório |
| Pipeline de QA web | Desenvolvedores | Shards paralelos no CI jogam o build wasm no Chromium, com prints e logs em toda falha |
| Estresse e resiliência | Desenvolvedores | Fuzzing, limites de spawners e números do caminho quente |
| Solução de problemas | Todos | Erros comuns e ferramentas de diagnóstico |
Formatos aceitos
| Formato | Uso | Arquivos |
|---|---|---|
| UMF | Lutador nativo, declarativo | assets/chars/<id>.json |
| M.U.G.E.N | Lutadores 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âmetro | Vale para | Mecanismo |
|---|---|---|
| Vida | MUGEN e UME | data.life |
| Dano causado | MUGEN e UME | data.attack (multiplicador de ataque) |
| Dano recebido | MUGEN e UME | tuning.defence lido pelo multiplicador de defesa |
| Andar, correr, pular | MUGEN e UME | constantes velocity.* |
| Gravidade | MUGEN e UME | movement.yaccel |
| Barra de poder | MUGEN e UME | data.power |
| Custo de energia | MUGEN e UME | valores 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
| Crate | Responsabilidade | Pode depender de |
|---|---|---|
ume-formats | INI, SFF, AIR, SND, ACT, PCX, PNG, FNT, cenários, VFS (pastas e zips) | nada do workspace; compila para wasm32 |
ume-engine | VM do lutador, expressões, triggers, controllers, HitDef, regras de partida, compilador UMF | ume-formats |
ume-netplay | Rollback com ggrs, checksum de estado, formato de replay | ume-engine |
ume-render | Pipelines de sprites e pós-processamento em wgpu | somente wgpu |
ume-shell | Adaptador, superfície, janela, entrada, API quad, saída de áudio, ritmo de quadros | ume-render |
ume-market | Mercado no GitHub: listagem, pacotes, limites de segurança | ume-formats |
ume-charforge, ume-devtools | Ferramentas de criação e auditoria | formats, engine |
ultimate-mugen (src/) | Telas, HUD, cenários, VFX, mixagem de áudio, opções, registro | tudo 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
ume-formatslê arquivos de personagem e cenário, ou o JSON nativo UMF, para dados simples.ume-enginecompila CNS, ZSS e UMF para um único bytecode e executaMatch::ticka 60 Hz fixos. Nunca lê relógio, threads ou GPU.ume-netplayclona e calcula checksum deMatchpara rollback e replays.src/lê o estado deMatcha cada quadro e desenha porume_shell::quad, que agrupa em lotes noume-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 adicionar | Coloque em |
|---|---|
| Um controller ou trigger | crates/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 parser | crates/formats |
| Um lutador, cenário ou rota | Só dados: JSON UMF, .def, TOML; sem Rust |
| Uma tela ou elemento de HUD | src/app/<tela>.rs ou a pasta da funcionalidade em src/ |
| Um efeito de GPU | crates/render, exposto por ume_shell::quad |
| Uma regra do mercado | crates/market |
Pontos de extensão sem código no engine
- Lutadores nativos:
assets/chars/*.json(Personagem UMF). - Cenários:
.defdo M.U.G.E.N ou dados nativos (Cenários), objetos de história em TOML (Objetos de cenário). - Rotas de arcade e desbloqueios: TOML (Arquivos de rota).
- Passivos: dados no lutador (Passivos).
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
| Arquivo | Uso | Origem |
|---|---|---|
route_<id do lutador>.toml | Rota de arcade daquele lutador | Pasta de dados (ao lado do executável, armazenamento do app no Android, armazenamento do navegador na web) |
unlocks.toml | Regras de desbloqueio e ocultação de lutadores e cenários | Mesmo 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.
| Chave | Significado |
|---|---|
fight | order (1 pega o próximo oponente comum, 2 ou mais pega o chefe), p2 (ids ou nomes, vale o primeiro que existir), stage, winscreen |
stage | ID 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. |
storyboard | Exibe 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 |
action | clear encerra a rota |
repeat | De 1 a 99 vezes; when é verificado a cada repetição |
when | Condição; o passo só roda se for verdadeira |
else | Mesmas 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ável | Valor |
|---|---|
stats.arcade.clear | Arcades concluídos salvos |
consecutive_wins, match_no | Lutas já planejadas nesta partida |
mode | arcade, story, survival, cpu, versus, training, watch ou team |
netplay | 1 em partida online, senão 0 |
team_size | 1 ou 2 (só em rotas) |
player | Id 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):
| Artefato | Função |
|---|---|
ultimate-mugen-v<versão>-<plataforma>.zip / .tar.gz | Pacote para instalação manual (binário + README) |
ultimate-mugen-v<versão>-<plataforma>[.exe] | Executável puro baixado pelo atualizador |
latest.json | Manifesto de atualização lido pela build em execução |
SHA256SUMS.txt | Hashes 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
- Na inicialização o jogo busca
releases/latest/download/latest.jsonpor HTTPS (timeout de 8 s, ignorado em silêncio quando offline). - Uma
versionmais nova com entradabinarypara 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". - 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. - O download só é aceito se o
sha256e o tamanho em bytes baterem com o manifesto e se o executável baixado responder--versioncomultimate-mugen <versão>. - Verificado o pacote, ele substitui o executável instalado (no Windows o executável em uso é renomeado para
.oldantes) e o jogo reinicia com--no-update-check, para que um manifesto ruim não cause laço de reinícios. - O
.oldanterior é 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
| Flag | Efeito |
|---|---|
--check-update | Mostra se existe release mais nova e sai |
--update | Baixa, verifica e instala a release mais nova, depois sai |
--no-auto-update / UME_NO_AUTO_UPDATE=1 | Mantém o aviso no rodapé e nunca mostra a pergunta (então nunca baixa nem instala) |
--no-update-check / UME_NO_UPDATE_CHECK=1 | Nenhuma 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.pngdos 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 derrotasdf*e as poses de dano baixo que antes reutilizavam idle. Poses inline têm o quadroinline_<hash>renderizado uma única vez. - Os PNGs dedicados devem ser gerados em pixel art arcade via
generate_imageusando uma âncora canônica validada do próprio personagem (a ferramenta depreciadagenerate_missing_spritesbaseada no rig vetorial foi removida). Escreva quadros 400×400 RGBA com eixo (200, 392) e metadadorefHeight320, seguindo a convenção existente. - Verificação:
cargo run --release -p ume-engine --example native_sprite_audit -- <out.json> --require-completedeve passar para todos os lutadores, ecargo run --release -p ume-devtools --bin ume-tools -- audit-sprites --out <report.json>deve ficar limpo em geometria e bordas alfa. Ocargo 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.jsonsprite-gen inspect-motion --source walk.json --out walk-report.jsonmede âncoras, quadros duplicados, deriva da caixa e contato com as bordas; contato de pé exige--contactse--foot-boxexplícitos.ume-tools preview-motioneume-tools preview-scenerenderizam 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)
| Flag | Significado |
|---|---|
--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 N | audita só os N primeiros personagens / cenários |
--fights N | lutas por personagem (cada uma contra outro oponente e cenário, padrão 2) |
--stage-fights N | passo de rotação de oponentes quando o cenário é o alvo |
--only, --only-stage, --opponent | filtros por substring para personagens, cenários e oponente forçado |
--no-fights, --quiet | só 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ódigo | Severidade | Significado |
|---|---|---|
fight-panic | crítica | a partida entrou em pânico durante o tick (a mensagem fica no relatório) |
fight-non-finite | crítica | posição, velocidade, vida ou poder virou NaN/inf |
fight-life-range, fight-power-range | maior | vida ou poder saiu dos próprios limites |
fight-below-floor-p1/p2 | maior | o lutador ficou mais de 12 px abaixo do chão por mais de 20 ticks |
fight-stuck-p1/p2 | maior | 420 ticks sem controle fora dos estados deitados |
fight-endless-attack-p1/p2 | maior | 240 ticks preso dentro de um mesmo estado de ataque |
fight-no-contact | maior | o par não acertou nenhum golpe em 30 segundos |
fight-off-camera-p1/p2 | maior | o lutador ficou fora da câmera por mais de 3 ticks |
fight-watchdog-rescue | menor | a rede de segurança do motor interveio (o script não devolve o controle) |
fight-camera-nan | crítica | posição ou zoom da câmera virou não-finito |
fight-engine-warning | menor | aviso que o motor levantou durante a luta (anim ou estado ausente) |
O que a passada estática verifica
| Código | Severidade | Significado |
|---|---|---|
char-load-fail, char-load-panic | crítica | o pacote não carrega de jeito nenhum |
char-no-anims, char-no-states, char-no-commands | crítica | .air/.cns/.cmd não produziu nada |
char-web-quarantine | crítica | a importação do navegador recusa o pacote (ume_formats::health), então ele nunca aparece na web |
char-unsupported-controller, char-unknown-trigger | maior | controller ou trigger que o motor não executa |
char-sprite-missing | maior | um quadro de animação aponta para um sprite inexistente no .sff |
char-sprite-transparent | menor | o quadro existe mas todos os pixels são transparentes |
char-sound-missing | maior | PlaySnd pede uma amostra que o .snd não tem |
char-unknown-parameter | menor | parâmetro de controller que o motor nunca lê |
char-wasm-atlas-overflow, char-wasm-atlas-pressure | maior/menor | os pixels de sprite não cabem no atlas 2048 do navegador (4,2 M pixels), então ele precisa expulsar e reenviar |
char-load-slow | menor | carregamento 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.mdranqueia 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.jsontraz 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 pacote | Bloco UMF | Situação |
|---|---|---|
Helper de bola de fogo, Projectile | projectile | existente |
Rajada de ki (vários Projectile, um por quadro) | projectile.repeat | novo |
Teleporte atrás ou até o rival (PosAdd p2dist, Turn) | blink (behind, front, above, back) e o antigo teleport | novo |
Flash de carga, explosão de aura, Explod de animação | vfx | novo |
EnvShake fora de um golpe | quake | novo |
Raio com vários golpes (projhits) | projectile.hits | existente |
Voo, clone, forma (var) | abilities.fly, helpers.clones, abilities.forms | existente |
Rush com vários HitDef | hits[] e moves[].vel | existente |
Helper com IA própria, Statedef -2/-3, Lua/ZSS | scripts, ou ficar no formato legado | nã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 } } }
| Campo | Significado |
|---|---|
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.repeat | Abre 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
atcontra 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ção | Chaves 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:
| Chave | Significado |
|---|---|
scalestart = x, y | Escala base do sprite, ancorada no eixo dele (padrão 1, 1). |
scaledelta = x, y | Variaçã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). |
angle | Rotação em graus em torno do eixo do sprite, anti-horária para valores positivos. |
xshear | Cisalhamento horizontal: cada linha é deslocada por xshear vezes a distância dela ao eixo. |
window = x1, y1, x2, y2 | Retângulo de recorte em unidades do cenário. |
maskwindow = x1, y1, x2, y2 | Segundo retângulo de recorte; com os dois presentes a camada é recortada pela interseção. |
windowdelta = x, y | Quão rápido a janela de recorte acompanha a câmera (padrão: o delta da camada). |
spacing = x, y | Espaç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
| Chave | Padrão | Significado |
|---|---|---|
bgmusic | nenhum | Arquivo da faixa (.ogg, .mp3, .flac ou .wav) |
bgmvolume | 100 | Percentual do volume normal da música |
bgmloopstart, bgmloopend | 0 | Pontos 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:
| Tipo | Aparência |
|---|---|
aurora | Faixas verde-azuladas de luz que derivam para os lados no alto da tela |
godrays | Raios de luz saindo do centro do alto da tela |
stars | Campo de estrelas que cintilam |
clouds | Nuvens suaves que atravessam a parte de cima da tela |
| Chave | Padrão | Significado |
|---|---|---|
color | 255, 255, 255 | Tom, r, g, b de 0 a 255 |
intensity | 0.6 | Opacidade no ponto mais forte, de 0 a 1 |
speed | 1 | Velocidade 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.
| Nome | Valor |
|---|---|
info.name, info.displayname, info.author, info.mugenversion | texto, comparado com StageVar(info.author) = "nome" (sem diferenciar maiúsculas) |
camera.startx, camera.starty, camera.boundleft, camera.boundright, camera.boundhigh, camera.boundlow | números |
camera.verticalfollow, camera.tension, camera.zoomin, camera.zoomout | números |
playerinfo.p1startx, playerinfo.p2startx, playerinfo.leftbound, playerinfo.rightbound | números |
playerinfo.autoturn | 1, a menos que o cenário defina autoturn = 0 |
stageinfo.zoffset, stageinfo.localcoord.x, stageinfo.localcoord.y, stageinfo.roundtime | números (localcoord sozinho é a largura; roundtime é -1 quando o cenário não define) |
shadow.intensity, shadow.yscale, reflection.intensity | nú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.
| Chave | Padrão | Efeito |
|---|---|---|
verticalfollow | 0.2 | Fração da altura do lutador mais alto que a câmera acompanha para cima |
tension | 50 | Zona 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 |
verticalfollowdelta | 0 | Zona morta em pixels do cenário: o alvo vertical só muda quando se moveu pelo menos isso, evitando tremor em pequenos pulos |
yscrollspeed | 0.3 | Parcela da distância vertical restante percorrida por tick (limitada a 0..1) |
zoominspeed, zoomoutspeed | 0.04 | Parcela 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) |
lowestcap | 0 | Com 1 a câmera nunca desce abaixo de starty |
dynamicboundhigh | 0 | Com 1 o boundhigh sobe boundhighdelta por unidade de zoom-out acima de 1x, mantendo o céu alcançável com a câmera afastada |
boundhighdelta | 0 | Usado 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.
- Escreva uma função
fn meu() -> Stagemontando as camadas comlay(...)e as primitivas deume_engine::raster(rect,lin, gradientes) etexgen(blobs,grain,haze). Usedojo()como modelo. - 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) }, }
- Para efeitos reativos (poeira, multidão, água), adicione uma variante em
StageKinde trate emstagefx.rs. - 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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)

- 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,Psorteia 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 emultimate-mugen.cfg(pal1,pal2) e nos replays. - Navegação pela grade por coluna:
CimaeBaixomantê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/PgDnandam uma página,Home/Endvão aos extremos, a roda rola por linha eRsorteia um quadro. - Tamanho uniforme:
draw_char_fitencaixa 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,Escou um clique limpa. A busca procura nome, id, autor e série. Na página de busca, as setas ePgUp/PgDnescolhem um resultado eEnterleva o cursor até ele. - O rodapé mostra a página (
pág 3/15) ao lado da posição. Fou 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+Uou 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=1forç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;Esclimpa a busca. - Nomes cortados na largura do tile com reticências;
Home/Endvão para as pontas; o rodapé mostra posição e página. Aleatóriosorteia 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
| Área | No pacote |
|---|---|
| Estados e controllers | mugen.cns, mugen.st, mugen.stcommon sem alteração (CNS e ZSS), incluindo helpers, Statedef -2/-3, IA e agarrões próprios |
| Comandos | mugen.cmd sem alteração: [Defaults], todos os [Command] e as rotas do Statedef -1 |
| Constantes | lidas de [Data], [Size], [Velocity], [Movement] originais, com a mesma escala de localcoord |
| Animações | mugen.anims: cada action com offset, ticks, flip, blend e alpha, escala, ângulo, todas as caixas Clsn1/Clsn2, loopstart |
| Sprites | um 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 |
| Paletas | paletas do SFF (sffpal_<k>.png) e pal1.act..pal12.act: troca de paleta e RemapPal/PalFX veem as mesmas cores |
| Sons | cada entrada do .snd como snd_g_i.wav |
| Campos só do UMF | profile (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
| Área | Nomes oficiais verificados | Implementados | Observações |
|---|---|---|---|
| Controllers de estado | 90 | 90 | Coberto por teste. |
| Triggers (forma de valor) | 92 | 92 | Coberto por teste. |
Triggers (forma de comparação, ex.: StateType = S, MoveType = A, AnimElem = 3, Command = "x", Name = "...") | 10 | 10 | Tratados na camada de expressões, cobertos por mugen11_triggers.rs. Fora da lista do teste. |
Redirecionamentos (enemy, enemynear, partner, helper, parent, root) | 6 | 6 | Cobertos por enemy_selection.rs e helper_parity.rs. |
| Extensões do Ikemen GO | muitos | a maioria | Listadas em CNS-Scripts.md. |
Itens parciais conhecidos
DestroySelf:recursivetambém destrói os helpers que ele criou, eremoveexplodsremove os explods que ele possui (semântica conforme a documentação do Ikemen GO).Helper: os parâmetrosinheritjuggleesize.xscale/sprprioritynão são lidos no caminho de criação.Explod:layerno = 1se comporta comoontop(conforme a wiki do Ikemen GO).layerno = -1eshadownão são lidos.PlaySnd,Pause,VarSeteTrans: 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 cadaspacingticks, padrão 1).
Como verificar um nome novo
- Adicione o nome à lista correspondente em
mugen_coverage_matrix.rs. - Rode
cargo test -p ume-engine --test it mugen_coverage_matrix::. - 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.
| Entrada | Golpe | Função |
|---|---|---|
B+x | string_a | Abertura. Também sai do cancel do jab no contato |
B+a | string_b | Elo do meio. Cancel de string_a no contato |
B+y | string_c | Finalizador: 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.
| Tecla | Cadeia |
|---|---|
x | jab > jab2 > jab3 (finalizador com empurrão leve, cancela nos dois especiais) |
a | lkick > lkick2 > lkick3 |
y | strong > strong2 |
x agachado | cjab > cjab2 |
x no ar | ajab > 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.
| Chave | Valores | Efeito |
|---|---|---|
fullscreen | 0 / 1 | Tela cheia |
res | 0 1280×720, 1 1920×1080, 2 2560×1440, 3 3840×2160, 4 5120×2880 | Tamanho da janela |
quality | 0 automática, 1 3×, 2 4,5×, 3 6× | Densidade da arte vetorial |
fps | 0 / 1 | Mostra FPS |
fx | 0 a 2 | Pós-processamento (bloom, vinheta etc.) |
impact_lv | 0 mínimo (fotossensibilidade), 1 reduzido, 2 normal, 3 intenso | Força dos efeitos de impacto |
version | 2 | Versão do formato (arquivos antigos sem ela continuam válidos) |
vsync | 0 / 1 | V-Sync (nativo) |
fps_cap | 0 sem limite, 1 30, 2 60, 3 120, 4 144 | Limitador de quadros (nativo) |
master music sfx | 0 a 10 | Níveis de volume |
mute | 0 / 1 | Silencia tudo |
difficulty | 1 a 8 | Nível da CPU |
round_time | 0 99 s, 1 60 s, 2 30 s, 3 infinito | Tempo do round |
rounds | 0 primeiro a 1, 1 primeiro a 2, 2 primeiro a 3 | Rounds para vencer |
life | 0 50%, 1 75%, 2 100%, 3 150%, 4 200% | Multiplicador da barra de vida |
lang | en / pt / es | Idioma de toda a interface |
keep_aspect | 1 (padrão) / 0 | 1 coloca barras pretas e mantém a imagem 16:9 em qualquer janela; 0 estica a imagem até preencher a janela |
filter | nearest (padrão) / linear | Amostragem dos sprites ao ampliar: pixels nítidos ou suavização bilinear |
window | LARGURAxALTURA, 0x0 sem valor | Tamanho 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
| Flag | Efeito |
|---|---|
--res 2560x1440 | Resolução da janela |
--4k | Janela 3840×2160 |
--fullscreen | Tela cheia |
--touch | Força os controles de toque |
--mute | Sem áudio |
--shots <pasta> | Tour automático salvando capturas |
--shots-audio | Ativa som durante o tour de capturas; --mute continua tendo prioridade |
--version | Mostra a versão |
--check-update | Mostra se existe release mais nova e sai |
--update | Baixa, verifica e instala a release mais nova, depois sai |
--no-auto-update / --no-update-check | Mantém só o aviso, sem pergunta / não procura atualização |
Variáveis de ambiente
| Variável | Efeito |
|---|---|
UME_MUGEN_DIR | Pasta de conteúdo M.U.G.E.N alternativa |
UME_MARKET_HOME | Pasta dos downloads e do estado do mercado |
UME_GITHUB_TOKEN / GITHUB_TOKEN | Token opcional do GitHub para o mercado (aumenta o limite da API) |
UME_NO_UPDATE_CHECK=1 | Não procura atualizações |
UME_NO_AUTO_UPDATE=1 | Mantém o aviso, mas nunca pergunta, baixa ou instala |
UME_NOFX=1 | Desliga 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.rsguarda a tabela por chave (inglês e português) esrc/i18n/es_catalog.rsa coluna em espanhol;i18n::t(chave)procura idioma atual → inglês → nome da chave.- Textos avulsos usam
i18n::tr3(pt, en, es); o antigoi18n::tr(pt, en)acha o espanhol emsrc/i18n/es_phrases.rs, indexado pelo texto em inglês. Marcadores usami18n::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.languagena web,LC_ALL/LC_MESSAGES/LANGno 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ção | Teclado P1 | Teclado P2 | Gamepad | Toque |
|---|---|---|---|---|
| Mover | setas | I K J L | D-pad / analógico | analógico virtual |
Socos x y z | Q W E | Num 4 5 6 | □ △ | LP HP |
Chutes a b c | A S D | Num 1 2 3 | ✕ ○ | LK HK |
| Especiais rápidos | V B N | Num 7 8 9 | — | ESPECIAL, SUPER |
| Atalhos de golpe (slots 1-4) | 1 2 3 4 | — | L1, L2, R1, R2 | — |
| Despertar (transformar) | T | Num 0 | L3 + R3 / SELECT | — |
| Troca (modo Tag) | F | Num Enter | L3 + R3 / SELECT | botão de despertar |
| Carregar ki | R | Num Decimal | R3 (sozinho) / START | — |
| Pausa / hitboxes | Esc / F2 | Esc / F2 | START | ❚❚ |
| Tela cheia / FPS | F11 / 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ção | Chave | Efeito |
|---|---|---|
[theme] | background | Cor base do fundo do menu |
[theme] | glow_bottom, glow_left, glow_right | Brilhos 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] | accent | Cor de seleção: destaque do menu principal, botões da pausa e das configurações, controles deslizantes |
[theme] | title, info, muted, text | Tí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, damage | Preenchimento 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] | fight | Arquivo 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_tint | Cor de destaque das barras por lado |
[hud] | bar_offset_y | Desce as barras de vida (-4 a 40) |
[accessibility] | hud_opacity | Multiplicador de opacidade do HUD (0.3 a 1.0) |
[accessibility] | colorblind | true usa azul/laranja nas cores dos lados em vez dos tons padrão |
[accessibility] | hud_scale | Multiplicador do tamanho do HUD (0.8 a 1.25) |
[accessibility] | reduce_motion | true desliga o tremor da tela |
[accessibility] | title_crt | false 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
| Magic | Contém | Gerado por | Lido por |
|---|---|---|---|
UML1 | um sprite: indexado (8 bits + paleta) ou RGBA | ume-tools pack-sprites (packs web dos lutadores) | ume_formats::lz4_sprite, carregador de sprites de ume_native |
UMSF | um .sff inteiro: paletas, tabela de sprites, um bloco UML1 por buffer de pixels distinto | ume-tools cook-sff | ume_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
- Coloque a pasta em
mugen/chars/<nome>/com o.defdentro, ou jogue o.zipdireto emmugen/. - Abra o jogo: o personagem aparece na seleção.
Tabfiltra 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
| Item | Situação |
|---|---|
.sff v1 e v2 (PCX, RLE8, RLE5, LZ5, PNG 8/24/32) | Suportado |
.air, .cmd, .cns, .st, .snd (WAV PCM 8/16 bits), .act | Suportado |
localcoord (personagens HD 720p) | Suportado |
| ~80 state controllers e mais de 100 triggers | Ver Scripts CNS |
ReversalDef, HitOverride, RemapPal, SndPan, VictoryQuote | Planejado |
[BGCtrl] em cenários, screenpacks, lifebars fight.def, fontes .fnt | Planejado |
| 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
- Escolha uma issue com o rótulo
good first issueou abra uma descrevendo a mudança antes de escrever código grande. - Leia uma vez a visão de arquitetura e as regras de layout de arquivos; elas dizem onde cada código deve ficar.
- Personagens, cenários e dados não precisam de Rust: veja Criar um personagem e Criar um cenário.
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ção | Comando |
|---|---|
| Testes Rust | cargo test --workspace --release |
| Limite de 250 linhas por arquivo | node scripts/file-size.mjs |
| Fronteiras entre crates | node scripts/crate-boundaries.mjs |
| Testes dos scripts | node --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.mdedocs/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 deMatch::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çãocom tipo emfeat|fix|perf|refactor|docs|test|build|ci|chore|style|revert; ocommit-lintrejeita 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,fixeperfsã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) eume_vpad_nav()(OK/VOLTAR/STARTdos menus). O analógico eA/Btambé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 epagehide. 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=1forç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ê quer | Precisa de código? | Vá para |
|---|---|---|
| Um fundo novo com a sua arte, no formato M.U.G.E.N | Não | Cená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ão | Cenários do modo história |
| Um cenário novo no modo história ou um cenário embutido novo | Sim, Rust | O que precisa de código |
1. Um cenário M.U.G.E.N
- Coloque dois arquivos em
mugen/stages/:meu-cenario.defemeu-cenario.sff(a arte). - Parta de
docs/examples/stage/my-stage.def.
O .def é texto simples com seções:
| Seção | O 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 que | Onde | Observações |
|---|---|---|
| Faixa de fundo | assets/stages/story/<cenário>.png | Um segmento por luta (quatro ondas e o chefe). Regere com python3 tools/story_segments.py |
| Fundo animado | assets/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ônus | assets/story/objects.toml, tabela [stages.<cenário>] | Formato completo em Objetos de cenário |
| Música da luta | tweaks.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 quadro0. - Arenas ampliadas: os cenários embutidos agora cobrem de
bound_left = -680abound_right = 680(bound_high = -140,zoom_out = 0.62,zoom_in = 1.05) com paralaxe panorâmica0.21emillustration_layout. - Piso reativo e objetos interativos: todos os 21 cenários ilustrados (incluindo
brazile as 14 Maravilhas do Mundo viaStageKind::Arena) renderizam rachaduras, marcas de impacto, ondas e destroços doStageReact. Em lutas Versus/Arcade,src/stages/interactive.rsposiciona 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). UseUME_STAGE_PROPS=0para 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 emsrc/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ó dotweaks.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:
| Linha | Significado |
|---|---|
format | Sempre umf/1 |
id | Único, minúsculo, sem espaços. É também o nome interno do arquivo |
name, author, color | O que a tela de seleção mostra. color é a cor do cartão |
extends | Herda tudo de kaito (vale qualquer lutador ou kit carregado) |
palettes | Recoloração. As chaves são os nomes de cor da arte do pai (top, trim, hair) |
moves | Altera 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 oidemassets/chars/index.jsonse quiser uma ordem fixa na seleção, e rodecargo 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 }]
}
]
inputusa a sintaxe de comandos:D, DF, F, xé o quarto de círculo maisx;x+ysignifica as duas teclas juntas.kindénormal,specialousuper. Um normal cancela em especiais e supers ao acertar ou bloquear.animprecisa ser o nome de uma animação do pai (galeaqui). 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 adicioneawakeningPalettepara 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 emmugen/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.
| Controller | Decisão | Motivo |
|---|---|---|
Storyboard | Planejado | Depende do runtime de screenpack/storyboard; anda junto com o trabalho de screenpacks |
Dialogue | Planejado | Mesmo runtime do Storyboard |
MatchRestart | Planejado | Depende das opções de regras e de um reinício determinístico |
LifebarAction | Planejado | Depende do renderizador de lifebars do fight.def |
ChangeMovelist | Planejado | Precisa de uma move list por luta; a lista de debug é somente leitura hoje |
LoadFile | Rejeitado por decisão | Personagens rodam dentro de uma luta determinística; leitura de disco por script não é permitida |
SaveFile | Rejeitado por decisão | Mesma regra de sandbox do LoadFile |
SaveState | Rejeitado por decisão | A engine não tem snapshot de rollback; reproduzir o stream de inputs é o caminho suportado |
LoadState | Rejeitado por decisão | Igual ao SaveState |
ShaderSet | Rejeitado por decisão | Shaders 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
| Comportamento | M.U.G.E.N | Ultimate MUGEN | Motivo |
|---|---|---|---|
Estado de hit aéreo com physics = N | Sem gravidade: um lutador atingido por golpes repetidos com yvel = 0 fica suspenso no ar | O lutador cai, como se o estado tivesse gravidade | Impede 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 |
|---|---|
| 1 | 3 acertos |
| 2 | 5 acertos |
| 3 | 8 acertos |
| 4 | 25% da vida do rival em um combo |
| 5 | 6 ou mais acertos terminando com super (ao menos 1000 de energia gasta) |
| 6 | 10 ou mais acertos sem gastar barra |
| 7 | 45% 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:Trackerpuro, alimentado a cada quadro comcombo_count,combo_damageepowerdo jogador elife_maxdo 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::demosubstitui 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
| Etapa | O que acontece | Threads |
|---|---|---|
| Decodificação SFF v1 | Cabeç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 v2 | Os 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 Zip | Diretório central escaneado, entradas descompactadas em paralelo com barra visual de progresso ZipProgress e indicador de threads de hardware | Todos os núcleos (máx. 32) |
| Sprites do personagem | A 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 GPU | Todos os núcleos (máx. 8) |
| Sprites do cenário | Mesma conversão RGBA em paralelo; o buffer RGBA é movido para o cenário, nunca copiado | Todos os núcleos (máx. 8) |
| Cache e reuso de cenários | src::registry | Instâ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 única | ume_formats::stage | O .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 comuns | ume_engine::common | common_def() cacheado via OnceLock<Arc<CharDef>>, eliminando ~4 ms de parsing duplicado de common1.cns por partida |
| Parsing CNS e CMD em passada única | ume_engine::loader, cns | Seçõ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âmetros | ume_engine::chardef | safe_expr e Param::new cacheiam AST e bytecode compilados para triggers e parâmetros idênticos via armazenamento thread-local |
| Consultas INI sem alocação | ume_formats::ini | Section::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ção | load_mugen_portrait decodifica só os sprites 9000,0, 9000,1 e o primeiro quadro parado (mais as origens dos links) via decode_sff_only | 1 |
| Sprites e efeitos nativos (UMF) | Cada quadro único é decodificado ou rasterizado em paralelo | Todos os núcleos (máx. 8) |
| Personagem inteiro | Carregado numa thread char-load enquanto a tela de VS aparece | 1 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écnica | Onde | Efeito |
|---|---|---|
| Ritmo de quadros | ume_shell::Pacer | Tempos 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 fixo | Session::update | Simulação a 60 Hz com tolerância mínima e no máximo 5 ticks por quadro (sem espiral de atraso) |
| Pré-carga de texturas | Gfx::prefetch, Texture2D::prefetch | Os 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 sons | Audio::preload_match | Todos 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 bytecode | ume_engine::bytecode | Expressõ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ção | commands, matchs, triggers, ai, ikemen | Chaves 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 quads | ume_render::Batch, ume_shell::quad | push_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ção | commands, matchs, triggers, ai, ikemen | Chaves 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 identidade | ume_engine::palette | A 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ção | commands, matchs, triggers, ai, ikemen | Chaves 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ção | commands, matchs, triggers, ai, ikemen | Chaves 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ção | commands, matchs, triggers, ai, ikemen | Chaves 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ência | ume_formats, ume_engine::matchs | Decodificadores 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écnica | Onde | Efeito |
|---|---|---|
| Paleta no shader | Gfx::sprite_tex, IndexedTexture, Palette | Sprites 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 atlas | ume_shell::quad | O 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ção | post.wgsl fs_composite | Sem 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
| Comando | Mede |
|---|---|
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_bench | Tempo 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ário | Passo p50 | Desenho p50 | Quadro p50 | RSS após carregar |
|---|---|---|---|---|
| Kaito vs Shion | 0,03 ms | 0,09 ms | 5,52 ms (vsync 180 Hz) | 380 MB |
| 2v2 paralelo (4 lutadores nativos) | 0,05 ms | 0,13 ms | 5,52 ms | 533 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ção | Onde | Efeito |
|---|---|---|
Compartilhar o buffer RGBA entre ImageData e Texture2D | chardef::ImageData, Texture2D::from_rgba_shared | Remove 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 muda | App::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 cache | Registry::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écnica | Onde | Efeito |
|---|---|---|
ControlFlow::Wait na web | ume_shell::run | O 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 atlas | Renderer::new | Texturas de atlas e paleta são inicializadas uma vez, então texSubImage2D não força mais limpeza lazy (aviso do Firefox) |
| Retry da surface | Shell::redraw | Falha em get_current_texture pede novo frame em vez de travar o laço (tela preta) |
| Loader + cache | web/index.html, web/sw.js | Progresso 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 demanda | src/web_sprites.rs, ume-tools pack-sprites | Cada 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 web | Cargo.toml [profile.web], scripts/build-web.sh | O 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 recorte | native::recolor, native::pixel_fit | O 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.
| Trabalho | Onde roda agora |
|---|---|
| Preview e retrato MUGEN na seleção | CharEntry::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 luta | Audio::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ória | usa 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écnica | Onde | Efeito |
|---|---|---|
| Índice de pasta preguiçoso | ume_formats::vfs::add_dir | Percorre 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 pequenas | vfs::File | Leituras 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 amostrada | vfs::File::signature | A 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 paralelo | find_char_defs, find_stage_defs, Registry::add_vfs_inner | Cabeçalhos de def e chaves de conteúdo são calculados com ume_formats::par::map (até 8 workers) |
| Roster fora da thread principal | App::new | Registry::new + scan_folders + dedupe + sort_mugen rodam na thread registry-scan enquanto a tela de boot continua desenhando quadros |
| Deduplicação por conjunto | Registry::add_vfs_inner | Ids e chaves do roster ficam em HashSet; a varredura linear por lutador era quadrática |
| Thumbnail de cenário assíncrono | Registry::stage_preview | O 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 thread | Registry::prepare_stage | O 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 thread | Registry::drop_off_thread | Descartar uma definição de lutador (centenas de MB de sprites) acontece no worker char-free, não dentro de um quadro |
| Carregamento que bombeia quadros | App::start_fight | Revanche 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::assignsregistra mutações de variáveis usando o enum compactoVarKind(Var,FVar,SysVar,SysFVar) em vez de alocar chavesStringdinâmicas por atribuição.state_mask,attr_kind_maskeguardflag_bitsprocessam fatias de string byte a byte comto_ascii_uppercase()em linha, eliminando alocações temporárias deStringmaiúscula em avaliações dehitbyattr.- 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_startpara 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:
- Implementa Fighter::fill_boxes utilizando buffers scratch fornecidos pelo chamador, eliminando alocações contínuas de Vec
- Substitui desvios aninhados em
input::rel_dirspor deslocamento binário branchlessud | (4 << (is_back ^ 1)). - Substitui casamento de strings em
button_bitpor 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 emadd_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.
- Implementa descompressão em blocos com escopo multi-thread (
Decodificação SIMD de paletas ACT e fast-path de limites de câmera
- Decodificação vetorizada ACT: decode_act e
encode_actutilizam 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_indicesretorna buffer em pilhaVec<usize>em vez deVec<usize>, eliminando alocações em controladores de alvo (targetstate,targetlifeadd,targetpoweradd,targetfacing,targetbind, etc.). - Resolução de flags AssertSpecial sem alocação:
flags::names_ineflags::lookupoperam diretamente em fatias&strcom 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_valformata a chave em um buffer de 64 bytes para buscar sufixos.xsem alocação no heap viaformat!("{k}.x"). - Atribuições de variáveis tipadas:
Match::assignsarmazena o enumAssignKindem vez de alocar umaStringna 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: Comovec![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 índicej. 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 quandoc == 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 viacopy_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 imediatamentevec![]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: EmMatch::tick, alvos específicos emprestam a fatia&d_boxes[req..req + 1]diretamente em vez de alocar umVecno heap. - Despacho de comandos de IA indexado: Em
ai::Ai, comandos são indexados comoVec<usize>emfighter.def.commandsem vez de clonar árvoresCommandDef. Ataques próximos e à distância são separados na inicialização, tornando a seleção emO(1)sem varreduras lineares. - Conversão vetorizada de pixmap para straight alpha:
raster::pixmap_to_imageevita divisões inteiras em pixels opacos (alpha == 255) e transparentes (alpha == 0) utilizandoas_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_checkedlimita a capacidade emcount.min(8192)e pré-aloca as tabelasouteseen, 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_charresolve substituições de paletas (pal1..pal12) usando uma tabela estática de fatiasPAL_KEYSem vez de formatar 12 strings no heap por personagem. - Deduplicação de sprites pré-alocada: Pré-dimensiona os vetores
seeneuniquepara o tamanho desff.sprites.len(). - Extração de lista de golpes e comandos de IA com zero alocações:
loader::load_mugen_charfiltra comandos no local usandoeq_ignore_ascii_caseantes 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_startpara ignorar instanciação de iteradores nas consultas mais frequentes de tempo de quadros de animação.
- Implementa Fighter::fill_boxes utilizando buffers scratch fornecidos pelo chamador, eliminando alocações contínuas de Vec
- Onda 30 - Direções Relativas de Entrada Sem Desvios e Tabela de Salto em Bytes:
- Substitui desvios aninhados em
input::rel_dirspor deslocamento binário branchlessud | (4 << (is_back ^ 1)). - Substitui casamento de strings em
button_bitpor 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.
- Substitui desvios aninhados em
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_airprocessa 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_boxanalisa quatro coordenadas diretamente em um array fixo[f32; 4]na pilha, eliminando alocações deVec<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 alocarVec<&str>. - Análise de flags de flip e blend no local: Flags
fleblsã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::buildusa 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 deHitDef. - Análise de
animtypeegroundtypeno local:hitdef::animtypeehitdef::groundtypecomparam tokens padrão de animação/chão do MUGEN usandoeq_ignore_ascii_casediretamente em fatias&strsem alocar strings em minúsculas.
Consultas de seções INI sem alocação e análise de constantes CNS em pilha
Section::geteSection::get_allsem alocação:ini::Section::geteini::Section::get_allcomparam chaves diretamente comeq_ignore_ascii_casesem alocar instâncias deStringem minúsculas a cada consulta.find_sectionsem alocação:ini::find_sectionutilizaeq_ignore_ascii_casediretamente no nome da seção sem alocar strings em minúsculas.- Análise de constantes CNS em pilha:
cns::parse_constantsdesempacota vetores numéricos separados por vírgula em um array[f64; 4]na pilha, eliminando alocações deVec<f64>em cada linha de constantes. - Vetor de comandos pré-alocado:
cns::parse_cmdpré-aloca a capacidade decmdsparasecs.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 aself.anim(), eliminando buscas repetidas em HashMap por lutador e explod animado a cada tick. -
Atalho para substituições de tamanho vazias:
fighter::cconsulta diretamente constantes do personagem quandoself.size_overrides.is_empty(), pulando varreduras lineares na fatia. -
Limpeza de alvos obsoletos com atalho:
Match::tickpula movimentações de vetores e chamadas de retenção sempre queself.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 deStringpara strings limpas ou entre aspas.loader::load_mugen_char: Conversão defgetpara retornarOption<&str>ao invés deOption<String>, eliminando cerca de 20 alocações na heap por carregamento de lutador.loader::local_size: Análise em pilha viasplit_once(',')substituindo a alocação dinâmica denums.cns::parse_cmd:unquote_strin-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 deStringem atribuições de variáveis por um enum de 1 byteAssignKind, 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 constantesvelocity.*.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)..nreduzindo 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 * sesy * 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_joinedem buffer de pilha de 512 bytes para caminhos candidatosbase_dir/nameedata/name, eliminando alocações na heap no caminho direto de busca.- Substituição de strings dinâmicas
format!("/{base}")por predicado de bytes in-placeis_match. - Uso direto de
ini::unquote_strsem 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.defcaiu para 6.7 ms).
-
Onda 48 - Pipeline de HUD Zero-Alloc e Quads de Textura Diretos:
Hud::draw: Otimização demain_ofem varredura única de iterador sem alocarVec<&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 deCtxentretrigger_alle 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-placeEntry::Vacantevitando realocações redundantes.loader::load_mugen_char: Eliminação da segunda passagem redundante de parsing dostcommondurante o carregamento de personagens.- Chaves de paletas estáticas pré-alocadas
PAL_KEYSevitando 12 alocações de formatação de string dinâmica por carga. - Pré-alocação de capacidade para
HashSet,sprites,indexedecountscom 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 deai_commandsemovelist, 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 viarefresh_sizes.Fighter::c: Casamento de padrões em caminho rápido para chavessize.*, evitando hashing de strings dinâmicas e consultas aHashMapa cada tick de física, colisão e avaliação de gatilhos.Gfx::sprite_tex_for: Eliminação da consulta duplicada dedef.sprites.getpor quadro renderizado em todos os lutadores, sombras, ajudantes e explods.Gfx::draw_sprite: Uso direto dedef.scale_xedef.scale_y, removendo consultas repetidas à tabeladef.c(...)a cada quadro.- Redução no tempo de carregamento de
kfm.defpara 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 deanim_total_timeeanim_loop_startem mudanças de animação, convertendoanim_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 aself.anim().Fighter::anim_elem_time: Retorno instantâneo paraanimelemtime(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 viaHost::trigger0e ignorando alocações na pilha da máquina virtual.- Redução do tempo de carregamento de
kfm720.defpara 8.7 ms e dekfm.defpara 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 pilhapendingarmazenando apenas índices e coordenadas de lutadores, eliminando clones prematuros na heap deHitDefDataem frames sem impacto.- Lista de
struckmigrada 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 deVec<usize>alocado na heap por array fixo em pilha[Option<usize>; 8], eliminando alocações repetidas emTargetState,TargetLifeAdd,TargetPowerAdd,TargetFacingeTargetBind.controllers::set_vars: Avaliação direta deparam.exprs.first()sem iterações duplicadas de busca por stringsc.param(...).controllers::run: Substituição de checagens duplas de parâmetros emchangestate/selfstatepor consultas unificadasopt(...)paractrleanim.- 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.
- sff::sprite_to_rgba: Alocacao direta em Vec
-
Onda 56 - Binds com Semantica Copy, Fallbacks Preguicosos e Animacoes Diretas:
fighter::Bind: Implementacao deCopyePartialEq, convertendo verificacoes e atualizacoes emrebindeupdate_bindem 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 dedef.clone()emchangestate,changeanime transicoes de auto-turn.matchs::run_state: Conversao da consulta acommonem fallback preguicoso (let fallback;), ignorando clones deself.commonem todos os estados negativos (-3, -2, -1) e estados definidos pelo personagem.matchs::change_state: Substituicao do clone ansioso deself.commonpor igualdade de ponteiro&self.commone fallback sob demanda.matchs::tick: Eliminacao do clone por quadro def.st_defno loop de override de fisica atraves de extracao escalar deOption<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 emparse_states,parse_constants,parse_cmde na resolucao de DEF doloader.rsporparse_ini_no_lines, evitando dezenas de milhares de alocacoes deStringdescartadas por personagem.ini::parse_ini_opt: Pre-alocacao do vetor de secoes comtext.len() / 256 + 4e das entradas de cada secao com capacidade 8.cns::build_controller: Pre-alocacao deparamsdo controlador com a capacidade exata des.entries.len().cns::parse_states: Pre-alocacao deStateDefcom 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 devfs::resolve.commands::CmdSymbol: Implementacao deCopyePartialEqpara 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 denow & !prevantes 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 stringsize.*quando nao ha overrides de tamanho, lendodef.scale_xedef.scale_ydiretamente.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 deVec<&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 alocacoesStringviato_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 alfaAS...D....air::parse_air: Pre-alocacao do vetor de quadros comVec::with_capacity(8)e do HashMap de animacoes comtext.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()) parastatetype,movetypeephysics, e reutilizacao de fatias de string em checagens decommand.
-
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 comovar(X) = Y,fvar(X) > Yeanimelemtime(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 comoanim = statenooutime > animtime.
-
Onda 63 - Deteccao Lazy de Ciclos em SND e Tokenizacao Sem Alocacao de Glifos FNT:
snd::decode_snd_checked: Substituicao da alocacao antecipada deHashSet<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 desplit_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 paraparse_ini_no_lines, evitando a coleta desnecessaria delines: 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 deStringna 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 guardaArc::ptr_eqevitando incremento de contagem de referencia quandofromja e a definicao ativaanim_def.fighter::change_anim_own: Migracao para emprestimo direto por referencia imutavel deself.defsem clonar o contador atomicoArc<CharDef>.
-
Tela de selecao na web (
scripts/web-frame-probe.js,scripts/web-profile.js):- Os quadros dos personagens nativos desenham
portrait.pngporCharEntry::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_regionusa 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.
- Os quadros dos personagens nativos desenham
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) | Oboro | Kaito | Suzume | |
|---|---|---|---|---|
| Antes | 11,40 / 11,76 / 11,79 s | 1674 ms | 1250 ms | 900 ms |
| Depois | 4,70 / 4,46 / 4,54 s | 551 ms | 405 ms | 319 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=perfno desktop ou a luta?e2e=1&modo=watchno 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 TYBW | Gogeta SSJ4 | Goku SSJ GT | Goku SSJ4 | |
|---|---|---|---|---|
| Sprites | SFF v2.01, 1380 sprites, 696 paletas, 29 MB | SFF v1, 523 imagens | SFF v1, 116 imagens | SFF v1, 198 imagens |
| Sons | 272 (19 grupos, até 4 MB cada) | 33 | 5 | 19 |
| Ações AIR | 262 | 232 | 84 | 171 |
| Caixas Clsn1 / Clsn2 | 83 / 1538 | 301 / 1202 | 115 / 477 | 309 / 1469 |
| Comandos CMD | 67 | 65 | 62 | 65 |
| Life / ataque / defesa | 2250 / 115 / 125 | 2600 / 110 / 140 | 2100 / 120 / 110 | 2400 / 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
| Arquivo | Papel |
|---|---|
.def | [Info], [Files], pal1..pal12, pal.defaults |
.cmd | [Remap], [Defaults] (command.time, command.buffer.time), lista [Command], [Statedef -1] roteando entrada para estado |
.cns | Constantes [Data], [Size], [Velocity], [Movement] e depois os estados |
st1..st3 | IA.cns (-2/-3), Especials.cns, Supers.cns, -final, -story-intros |
common1.cns | Cópia dos estados comuns, sobrescritos ao redeclarar o número |
.air | Frames grupo,imagem,x,y,ticks[,flip,trans], Clsn1 (ataque), Clsn2 (corpo), Clsn2Default, Loopstart |
.sff / .snd / .act | Sprites, sons e paletas de 256 cores |
Constantes que valem copiar
- Andar 2,3 a 2,4, correr 4,6, pulo
-8,1a-10,1,yaccel0,43 a 0,44,airjuggle15, largura de chão 15, altura 60,attack.dist160. O elenco nativo já usa essa escala. - O Aizen usa
airjump.num = 6e 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,ae~60$B,F,a(Goku SSJ), toque duploFF,BB,~D,Upara super pulo, botõesa+b. /$B,x,/$D,y: direção segurada com botão, gerando golpes de comando.- Buffers:
command.time = 10ebuffer.time1 na maioria; 15 a 30 nos pacotes de entrada fácil. - Um movimento, um botão por golpe: no Aizen,
D,DF,Fcom 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),movehitemovecontact(165 usos no Aizen, 22 no Gogeta, 14 no Goku SSJ4). Na UMF:cancelserekka.
Números dos golpes normais
Valores: dano, pausetime de atacante e defensor, ground.hittime, pontos de juggle e poweradd.
| Estado | Gogeta | Goku SSJ | Goku SSJ4 | Aizen |
|---|---|---|---|---|
| 200 leve em pé | 20, pausa 4,5, hit 11, juggle 4, power 22 | 23, pausa 7,8, hit 11, juggle 1, power 20 | 23, pausa 5,8, hit 7, juggle 1, power 20 | 20, pausa 9,9, hit 15, juggle 2, power 40 |
| 210 forte em pé | 55, pausa 4,5, hit 11 | 55, pausa 11,11, hit 15, juggle 4, power 60 | 63, pausa 12,12, hit 15, juggle 5, power 65 | 30, pausa 9,9, hit 15 |
| 400 leve agachado | 23, pausa 10,11, guardflag = L | 23, pausa 10,12, L | 23, pausa 5,8 | 20, pausa 0,15 |
| 410 forte agachado | 37, pausa 12,12, M | 62, trip, fall = 1, juggle 7 | 37, pausa 12,12, M | 30, pausa 0,60 |
| 600 leve no ar | 20, pausa 7,8, HA | 12, pausa 7,8, HA | 12, pausa 7,8 | 30, pausa 10,10 |
| 610 forte no ar | 72, pausa 12,12, hit 17 | 70, pausa 9,10 | mesmos valores do 600 | sem 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
| Tipo | Exemplo | Construção |
|---|---|---|
| Bola de energia | Goku SSJ 1000 | Projectile em Time = 14 com ProjAnim, ProjHitAnim, velocity = 5.5,0, projpriority, HitDef embutido, AnimTime = 0 volta ao 0 |
| Bola no ar | Goku SSJ 1005 | Igual, type = A, ProjHeightBound remove no chão |
| Super de raio | Goku SSJ 1800 | poweradd = -2000, SuperPause no AnimElem = 1, AfterImage, três Projectile no mesmo frame: visual, longo com projhits = 30, projmisstime = 5, damage = 19,4 |
| Ataque múltiplo | Goku SSJ 1050 | Uma ação longa, pares de VelAdd (+4 e -4) em AnimElem alternados, EnvShake no último |
| Agarrão | Goku SSJ4 1601 | TargetBind a cada elemento, TargetLifeAdd em AnimTime = 0, TargetState para o levantar |
| Clone | Aizen 700 | Helper com anim = 9999, DestroySelf em time = 15 ou sem o root, e numhelper(700) como trigger de cancel |
| Faísca de hit | Aizen 995 | Helper em movehit = 1 && numhelper(995) = 0, postype = p2 |
| Contra-ataque | Aizen Kyouka Suigetsu | Janela de ReversalDef ou HitOverride e estado que teleporta com PosSet |
| Teleporte | Aizen Shunpo | PosAdd de p2dist x + 40 e Turn (o mesmo código que a UMF gera em teleport) |
| Forma | Gogeta Kaio Ken | Flag var(11), -2 soma power por tick, AttackMulSet 1.2, DefenceMulSet 1.2, aura Explod a cada 10 ticks |
| Power up | Goku SSJ 730 a 741 | Sobrescreve 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..pal12no.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
- 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.
- Caixas de acerto e de corpo seguem o membro: no mínimo 3 caixas de corpo.
- 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.
- 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ê
&Matchapenas 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 comFilterMode::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)
- QUENTINHO! — Cameo clássico do árbitro no canto inferior direito em lançamentos pesados (
dano >= 115). - EMPATE ÉPICO! — Nocaute duplo simultâneo.
- PIXEL MÁGICO! — Vencer um round ou lançar um Super com menos de 5–6% de vida.
- INTOCÁVEL! — Vitória perfeita com 100% de vida e coroa dourada.
- CHOQUE DE TITÃS! — Troca simultânea de golpes em até 3 ticks.
- PROVOCOU, LEVOU! — Levar golpe até 90 ticks após provocar.
- RESPEITO MÚTUO! — Ambos os lutadores provocam em até 120 ticks.
- NO MESMO RITMO! — Ambos pulam juntos duas vezes no mesmo round.
- AGACHAMENTO TÁTICO! — Sequência rápida de 4+ agachamentos à distância.
- SPEEDRUN K.O.! — Vencer um round em menos de 10 segundos.
- NO ESTOURAR DO RELÓGIO! — Round decidido nos últimos 3 segundos.
- SEM GRAVIDADE! — Combo aéreo de 5+ acertos.
- MURALHA DE FERRO! — Defender 6+ golpes seguidos sem quebrar a guarda.
- DEFESA EM PEDAÇOS! — Quebra de guarda (
state_no == 5300). - COLISÃO DE SUPERS! — Ambos os lados disparam um Super em até 90 ticks.
- DESPERTAR DUPLO! — Ambos os lutadores despertam/transformam na mesma partida.
- CHEGA, JÁ DEU! — Combo monstruoso de 15+ acertos com cameo do árbitro.
- FUGA DE MESTRE! — Virar o jogo com golpe pesado após ficar preso no canto.
- DUELO DE OLHARES... — Ambos parados se encarando por 3 segundos fazem um arbusto seco rolar pela arena.
- 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)
- Dojo — Grou de Origami: Um grou de papel animado cruza o pôr do sol sobre o telhado.
- Dojo — Telhas Trêmulas: Impactos pesados fazem o velho telhado do dojo tremer.
- Neo-Metrópole 2099 — OVNI em Neo-Metrópole: Um disco voador neon piscante cruza o horizonte cibernético.
- Neo-Metrópole 2099 — Sobrecarga // 2099: Disparar um Super sobrecarrega a rede neon.
- Bambuzal ao Luar — Espíritos do Bambuzal: Máscaras espirituais surgem entre os bambus em combos.
- Planalto Rochoso — El Viento Salado: O galeão voador de Marlow cruza as nuvens ao fundo.
- Portão dos Espíritos — Aparição Kitsune: Uma máscara kitsune brilhante flutua sobre o torii em Supers ou Despertares.
- Cratera Vulcânica — Erupção Sísmica: Golpes pesados provocam um rugido sísmico da caldeira.
- Praça do Interior (Brasil) — Capivara de Boa: Uma capivara em pixel art com uma tangerina na cabeça passeia tranquilamente pela praça.
- Praça do Interior (Brasil) — Caramelo na Área: O guardião oficial da praça dá as caras no Round 2+.
- Cristo Redentor (Corcovado) — Tucano no Corcovado: Um tucano colorido cruza os céus do Rio de Janeiro.
- Grande Muralha da China — Dragão de Papel: Uma pipa sobrevoa as montanhas da Grande Muralha.
- Petra (Al-Khazneh) — Escaravelho de Petra: Um escaravelho dourado brilha no cânion em golpes pesados.
- Texas — Meio-Dia no Texas: Um arbusto seco rola pela rua principal ao meio-dia.
- Chichén Itzá — Sombra de Kukulcán: O brilho esmeralda da serpente emplumada surge em Supers.
- Coliseu de Roma — Ave Gladiator!: O Imperador aplaude combos de 6+ acertos com louros dourados.
- Taj Mahal — Pombas de Agra: Pombas brancas levantam voo sobre o mármore no Round 2+.
- Pirâmides de Gizé — Olho de Hórus: Encher a super barra desperta o escaravelho dourado de Gizé.
- Jardins Suspensos da Babilônia — Plumas da Babilônia: Voo colorido sobre os jardins durante combos aéreos.
- 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)
- Espelho (Mirror Match): Qualquer lutador enfrentando a si mesmo solta uma fala de "impostor".
- Suzume vs Oboro: Banner de vingança do clã Kagerou com emblema do Eclipse Escarlate.
- Sylene vs Garan: Gelo ártico de Borealia contra as chamas violetas do Submundo.
- Kaito vs Oboro: Tempestade de Izu contra o arquiteto do Eclipse Escarlate.
- Bruno no Brasil / Corcovado: A torcida da casa vibra pelo tricampeão de Minas Gerais.
- Volta em Neo-Metrópole 2099: Fala de livre-arbítrio ao retornar à cidade onde foi construído.
- Akio Empolgado (<30% de vida): Otimismo do Dojo Queda Estelar com ícone de ramen fumegante.
- Desculpas do Haruki: O arquivista gentil pede desculpas no meio da luta após um combo de 5+ acertos.
- Marlow vs Valdric: O pirata dos céus provoca o príncipe sobre sua coroa imperial.
- Kaito vs Jin: Corrida contra o vento entre os Penhascos de Izu e as Montanhas Azuis.
- Shion vs Kaname: Lâmina de meteorito contra a katana espiritual (
crossed_blades). - Lian na Grande Muralha: A grã-mestra da Lanterna de Jade defende a Grande Muralha.
- Bruno vs Daichi: Choque de gigantes entre o Ringue de Ferro e o Lobo de Altai.
- Garan na Cratera Vulcânica: O Portão de Cinzas se abre onde os 99 monges o selaram.
- Valdric vs Oboro: Duas coroas, um trono — Império Rubro contra Eclipse Escarlate.
- Suzume vs Jin: Duelo de velocidade entre Huế e o Vale do Vento.
- Volta vs Haruki: O androide pergunta ao arquivista o que torna um coração corajoso.
- Akio vs Kaito: Rivalidade clássica — "Quem perder paga o ramen!"
- Papagaio do Marlow: O imediato do El Viento Salado cruza a tela em Supers ou combos de 6+ acertos.
- 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]: listasopening_pt/en/eseanswer_pt/en/esdas provocações de abertura e resposta.[[matchup]]:fighters = [a, b]oumirror = true,style,sprite,sfx,color,title_*esub_*.[[stage_interaction]]:fighter+stage_contains = [...].[[fighter_trigger]]:fighteroufighter_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!) eaizen*(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 }
type | Formato |
|---|---|
orb (padrão), burst | Bola de energia / explosão |
dragon | Dragão de energia voltado para frente, com corpo em movimento |
beam (length) | Raio horizontal |
pillar (length) | Coluna vertical |
shockwave | Onda no chão |
slash, wave, water | Corte em arco |
kunai, shuriken | Arremessáveis |
ice, fire, darkfire, lightning, petal | Elementos |
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.
| Artefato | Tamanho | Papel |
|---|---|---|
index.html | 11 KB | casca: boot, menu, seleção, opções |
local-runtime.js | 342 KB | bootstrap 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.js | 420 KB | a UI em DOM (ofuscada, protegida por digest) |
frame.html | 2,2 KB | hospeda o motor: um <canvas id="ikemen-canvas"> |
runtime-engine.bin | 5.887.387 B | gzip de um módulo WebAssembly de 25.343.508 B |
content/catalog.shvd.json | 265 KB | 78 personagens, 74 cenários, URLs dos pacotes, sha256, tamanhos |
content/packs/*.zip | 1–24 MB cada | arquivos 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):
| Estrutura | Campos que importam |
|---|---|
Animation | frames, loopstart, curtime, curelem, totaltime, looptime, interpolate_offset/scale/angle/blend, mask, transType, srcAlpha/dstAlpha |
AnimFrame | Group, 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:
Animation.Action()avançacurtime; emtotaltimesalta paraloopstarte marcanewframe.Animation.UpdateSprite()roda em todo tick mas só faz trabalho quandonewframeestá 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 presetsRemapdo personagem.- O desenho lê
frames[drawidx]para a transformação e osprem 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)). Trocarpal1…pal12ouRemapPalreenvia 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 umtexSubImage2Dpor 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 porRenderMode.- Distorção trapezoidal (sombras de chão / skew de
xscale) é calculada no mesmo shader a partir degl_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étrica | Valor |
|---|---|
| Backing store do canvas | 640×480 (CSS 1280×720, object-fit: contain) |
drawArrays por rAF | p50 82–105, p95 113–163, máx 172–224 |
bufferData por rAF | 82–125 (um upload pequeno por sprite; sequências de texto compartilham um) |
| Chamadas de uniform por rAF | 322–397 |
useProgram por segundo | 30–76 (poucas por quadro) |
bindTexture por segundo | 1,4 mil–6,2 mil |
| Quadros do motor por rAF | 0,78–0,89 (60 Hz fixo, com portão) |
| Heap JS em uma luta | 9–74 MB |
| Boot → menu | 1,9 s |
| Menu → seleção | 4,0 s |
| Seleção → primeira luta | 37 s (core + 2 pacotes de lutador + cenário pela rede, depois decode SFF) |
| Long tasks durante a luta | 50–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 umjs.CopyBytesToJS+ umInvokede um interpretador JS criado com o construtorFunction.- 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:
| Aspecto | Build web do Ikemen | Ultimate MUGEN |
|---|---|---|
| Draw calls | 1 por sprite (82–172/quadro) | agrupado: quads fundidos por estado de blend + scissor num único buffer de vértices/índices |
| Estado de bind | bind por sprite, LRU de 16 unidades | um bind group; atlas + textura de paleta vinculados uma vez |
| Paleta | textura 256×1 por sprite, upload por sprite quando muda | 1024 linhas de paleta numa textura, índice de linha por vértice, RemapPal troca a linha |
| Atlas | nenhum para sprites (textura por sprite) | atlas RGBA + atlas de índices de 8 bits, com reset independente |
| Simulação | máquina de estados inteira em WASM | hotpath_bench (abaixo) |
| Ritmo de quadros | portão de rAF em Video.Framerate | ume_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 | |
|---|---|
| antes | 212.8 ms em 'fight:prefetch' (um quadro) |
| depois | 2.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 port | Estado aqui | Como verificar |
|---|---|---|---|
| 1 | Nunca pagar uma luta inteira dentro de um quadro | feito: App::warm_step + Gfx::prefetch_step, 512 KiB por quadro, tanto no passo de VS quanto em start_fight | UME_WATCHDOG=1 rótulo load:sprites; F3 up/KB |
| 2 | Manter o quadro de transição livre nos caminhos sem tela de VS | feito: start_fight cede um quadro por pedaço | pior quadro do UME_WATCHDOG=1 na transição |
| 3 | Orçamento de draw calls é número de primeira classe | feito: DRAW_CALL_BUDGET + teste do batch | cargo test -p ume-render |
| 4 | Linhas de paleta são recurso escasso | feito para duplicatas: PaletteRows compartilha por conteúdo | cargo test -p ume-render |
| 5 | Sprites nunca vão para atlas na build web | nã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 nativos | atlas {} no overlay F3 |
| 6 | Um shader para todo efeito de sprite | já é verdade (sprite.wgsl: flat/RGBA/indexado/palFX/tint numa passada) | cargo test -p ume-render --test shader |
| 7 | Ceder controle ao decodificar | load:character já roda um personagem por passo; manter decoders novos dentro desse orçamento | pior 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 navegador | Ultimate MUGEN | |
|---|---|---|
| Draw calls no mesmo tipo de cena | um por sprite, 82–105 por quadro | fundidos por blend + scissor, teto 24, garantido por teste |
| Troca de paleta | upload de 1 KB por sprite que muda de paleta | linhas de paleta deduplicadas por conteúdo, compartilhadas entre lutadores |
| Custo de simulação | máquina de estados inteira numa thread WASM | 4–20 µs por tick (0,03–0,12 % de um quadro) |
| Aquecimento / transição | uploads espalhados por sorte (textura por sprite) | orçamento explícito por quadro, revanche não copia nada |
| Observabilidade de hitch | nenhuma | UME_WATCHDOG=1 com rótulo por fase, F3 com uploads/KB e ocupação do atlas |
| Licenciamento/portabilidade do conteúdo | empacota personagens M.U.G.E.N de terceiros | carrega a pasta mugen/ do jogador, UMF, ou o mercado |
Não melhores (ainda):
| Port para navegador | Ultimate MUGEN | |
|---|---|---|
| Entregue no navegador | sim, 78 lutadores, 74 cenários, netplay com rollback GGPO | a build wasm existe, mas o elenco vem em pacotes; sem catálogo equivalente |
| Volume de conteúdo | 78 lutadores, 74 cenários, packs sob demanda por luta | o que o jogador instalar |
| Alcance de dispositivos | celulares, tablets, desktop | desktop, 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
| Caminho | Responsabilidade |
|---|---|
crates/formats | Leitura 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/engine | Má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/chars | Lutadores 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
- Em
crates/engine/src/controllers.rs, dentro derun, 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.
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.- Crie o campo em
fighter.rsse precisar de estado novo. - Escreva um teste em
crates/engine/tests/combat_logic.rschamandoume_engine::controllers::run. - Liste o nome em
CNS-Scripts.mdept-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. Devolvatruenorundo 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
| Comando | Cobre |
|---|---|
cargo test --workspace --release | Tudo |
cargo test -p ume-engine --test kfm | Kung Fu Man de referência |
cargo test -p ume-engine --test it combat_logic:: | Regras de combate |
cargo test -p ume-formats | Decoders |
cargo clippy --workspace -- -D warnings | Lint |
node scripts/web-smoke.js web/dist | Versão web no Chromium |
node scripts/web-match-smoke.js web/dist | Partida 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 deMatch::random, para manter replays e rollback. - Nada de alocação dentro de
Match::tickem 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 porscripts/commit-lint.mjs.
Decisões de arquitetura
| Tema | Escolha |
|---|---|
| Render | wgpu (Vulkan, Metal, DX12, WebGPU, WebGL2), paleta aplicada em shader |
| Scripts | CNS e ZSS para lutadores, UMF JSON para o formato nativo; sem Lua |
| Expressões | Bytecode de pilha |
| Áudio | kira + symphonia |
| Rede | ggrs (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
common1devolve o controle em vez de deixar o lutador preso à definição compartilhada. - Estados do
common1.cnssão do próprio jogador: os estados-1do 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-1assim. - 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_panelregistra 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ívelfx0) 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
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
| Área | Definição |
|---|---|
| Identidade e perfil | id (^[a-z0-9][a-z0-9_-]*$), profile com textos en, pt, es, element, alignment |
stats, passives, abilities | Números tipados, fly, teleport, superSpeed, charge, forms |
anims | frames como "pose*ticks" ou objetos com pose, sprite, effect, hit, hurt, offset, ticks |
moves | kind, 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, scripts | Stand, clones, fases de chefe, ganchos ZSS e CNS |
Kits e extends | Lutador 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
| Área | Teste | Comando |
|---|---|---|
| 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 tick | Custo do tick continua limitado | cargo test -p ume-engine --release --test it stress:: -- --nocapture |
| Caminhos quentes | Bench embutido: SFF, AIR, CNS, carga de personagem, tick com 2, 6 e 10 lutadores | cargo run -p ume-engine --release --example hotpath_bench |
| Rollback com latência | crates/netplay/tests/rollback.rs | cargo 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)
| Caminho | Tempo |
|---|---|
| Decodificar SFF | 1,1 ms |
| Parse de AIR | 1,0 ms |
| Parse e compilação de CNS | 3,2 ms |
| Carga do personagem sem imagens | 7,6 a 10 ms |
| Tick com 2 lutadores | 5 us |
| Tick com 6 lutadores | 15 us |
| Tick com 10 lutadores | 39 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
| Área | Diferencial | Ultimate MUGEN |
|---|---|---|
| Estrutura | system.def aponta para select.def, fight.def, sprites, sons e fontes, com fallback para o motif padrão | Igual, veja Screenpacks |
| Seleção | Grid e cursor por parâmetros, retratos animados, stage por personagem | Já nativo, veja Character-Select |
| Versus | Order select na tela de versus, retratos animados | Pendente (order select) |
| Vitória | Retrato, nome e frase do vencedor | Pose e nome existiam; frase pendente |
| Resultados | Tempo, combo e dano, melhores tempos no time attack | Novo painel de estatísticas |
| Resolução | Packs 4:3 e 16:9 via localcoord | localcoord 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
- Order select na tela de versus em modos de time.
- Frase de vitória sob o nome do vencedor.
- Nota (S a D) por tempo, vida restante e combo.
- 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
- Golpes de avanço e investidas com armadura (
lunge,shoulder), que ainda cancelam em especiais. - Mergulhos aéreos com velocidade angular e quique no chão (
falcondive,meteordrop). - Especiais que cancelam em outros por
cancelsexplícito. - Anti-aéreos com invulnerabilidade e armadura de um golpe em golpes lentos e pesados.
- Rápidos trocam dano por mobilidade (
superSpeed,teleport); fortes ganhamarmor,wallBouncee golpesheavy.
Como são feitos do zero
- 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:
| Comando | Substitui | O que faz |
|---|---|---|
ume-tools pack-sprites [out] [--sprites dir] | scripts/pack_sprites.py | Empacota 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.py | Grava miniaturas 240x135 (Lanczos) em <stages>/thumbs |
ume-tools audit-moves [dir] [--json] | scripts/audit_native_moves.py | Auditoria estática do elenco: inputs, cancels, throws, hit boxes |
ume-tools audit-sprites --out report.json | scripts/audit_native_sprites.py | Inventário de PNGs por arquivo com limites alfa |
ume-tools mugen-census <zip-ou-pasta>... | novo | Conta 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
| Ferramenta | O que faz |
|---|---|
slice | Detecta 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 |
palettes | Gera variantes .act (matiz, saturação, brilho) a partir de um .act base; o índice 0 e os de --keep não mudam |
air | Gera 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)
| Flag | Efeito |
|---|---|
Intro | Segura o round na introdução (limite de 10 s) |
RoundNotOver | Segura o estado de fim de round (limite de 15 s) |
TimerFreeze | O cronômetro do round para |
RoundFreeze | O cronômetro e o relógio do estado do round param |
RoundNotSkip | O atalho de pular o face-off do primeiro round com um botão de ataque fica desligado |
CameraFreeze | A câmera não se move |
GlobalNoKO | Ninguém leva KO; a vida para em 0 e o round continua |
GlobalNoShadow | Sem sombras nem reflexos |
NoKOSlow | Sem câmera lenta no KO |
NoKOSnd | Sem som de KO |
NoMusic | A música é silenciada |
NoBG / NoFG | As camadas de trás / da frente do cenário não são desenhadas |
NoBarDisplay | Todo o HUD da luta (barras, cronômetro, quadros dos parceiros, contador de combo) some |
NoTimeDisplay | O cronômetro some |
SkipFightDisplay / SkipRoundDisplay / SkipKODisplay / SkipWinDisplay | O anúncio "FIGHT!", "ROUND n", "K.O." ou de vitória não aparece |
Flags por personagem (58 + Immovable)
| Flag | Efeito |
|---|---|
Invisible, NoShadow | O sprite ou a sombra não é desenhado |
Unguardable | Os ataques do jogador não podem ser defendidos |
NoStandGuard, NoCrouchGuard, NoAirGuard | O jogador não defende nesse tipo de estado e não entra no estado de defesa |
NoJuggleCheck | Os pontos de juggle não são cobrados dos golpes do jogador |
NoAutoTurn, NoWalk, NoJump, NoAirJump, NoCrouch, NoStand | Desligam as transições embutidas de virar, andar, pular, pulo duplo, agachar e levantar |
NoHardcodedKeys | Desliga todas as transições embutidas por tecla (andar, pular, agachar, defender) |
AutoGuard | Defende como se "trás" estivesse pressionado |
NoKO | O 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, NoGuardDamage | Golpes / golpes defendidos não tiram vida do jogador |
NoRedLifeDamage | Golpes não aumentam a vida vermelha do jogador |
NoDizzyPointsDamage | Golpes não reduzem os pontos de tontura do jogador |
NoGuardPointsDamage | Golpes defendidos não reduzem os pontos de defesa do jogador |
NoScore | Golpes não alteram a pontuação do jogador |
NoGuardKO | Um golpe defendido não mata o jogador |
NoKOFall | O golpe que dá KO não força a queda |
NoKOVelocity | O golpe que dá KO não soma a velocidade extra de KO |
NoFallHitFlag | O jogador ignora o hitflag F enquanto cai |
NoCornerPush | O jogador não é empurrado para trás após acertar um oponente no canto |
Immovable | Extensão da engine: a pushbox do oponente não consegue mover o jogador |
AnimateHitPause | A animação continua durante o hit pause |
AnimFreeze | A animação para |
NoInput | Botões e direções são zerados |
PostRoundInput | Os comandos são lidos depois do fim do round |
RunFirst, RunLast | Os estados do jogador rodam antes / depois dos demais no próximo tick |
NoDestroySelf | DestroySelf não faz nada |
NoMakeDust | O efeito de poeira embutido não é criado |
NoAILevel | AILevel retorna 0 para o jogador |
DrawUnder | O jogador é desenhado atrás dos outros lutadores |
NoLifeBarDisplay, NoPowerBarDisplay, NoFaceDisplay, NoNameDisplay, NoWinIconDisplay, NoComboDisplay | A 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
| Chave | Significado |
|---|---|
[defaults] | sprite_manifests, clsn1_height (altura em pé, aumenta a caixa de ataque), hitsound, guardsound, super_sound, voice_channel |
kind | normal, crouch, air, special, air_special, super, projectile, throw (define dano, pausa, poder e atributo padrão) |
state, anim | Número do estado e da animação (padrão: o estado) |
command, command_name, command_time | Notaçã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 |
hit | Lista 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, voice | PlaySnd, velocidade, Explod, Helper, cancelamentos e controladores brutos |
power, superpause | Custo de poder e SuperPause para supers |
phases | Estados 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 temdown.bounce,wall.bouncenemground.typetrip, nemp2stateno, nemforcenofall; - 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
| Escopo | Cobre | Motivo |
|---|---|---|
| Nativos (padrão) | golpes de lutadores UMF | o fall vem de level: heavy / launch, não é escrito golpe a golpe |
| Todos | também lutadores M.U.G.E.N | HitDefs M.U.G.E.N definem fall de propósito (rasteiras, lançadores); opcional |
| Clássico | ninguém | comportamento 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
| Alvo | Comando |
|---|---|
| Desktop | cargo run --release |
| Testes | cargo 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 |
| Android | cargo install cargo-apk --version 0.9.6 --locked e cargo apk build -p ultimate-mugen --lib --release --target aarch64-linux-android |
| iOS | cargo 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.mde 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 --updateno mesmo PR que o dividiu. - Nunca regenere o baseline para aumentar um número.
--updatesó é 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:
| Pergunta | Mesma responsabilidade | Responsabilidades diferentes |
|---|---|---|
| Por que ele mudaria? | duas funções mudam quando o formato muda | uma muda com o formato, a outra com a câmera |
| Que dados ele possui? | uma struct e seus auxiliares | várias structs que conversam entre si |
| Quem revisa? | o mesmo revisor com o mesmo contexto | um especialista diferente |
| Dá para testar sozinho? | sim, pela API pública da crate | só 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.rsguarda os tipos compartilhados por todas as partes e as funções que o resto da crate chama.feature/<assunto>.rsguarda um assunto cada. O Rust permite uma pasta ao lado do arquivo de mesmo nome, então não é precisomod.rsdentro dela.mod.rsé fachada: declarações de módulo epub use, nada mais. Mire em 60 linhas;mod.rscom 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.rsmanté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:
| Arquivo | Responsável por |
|---|---|
mode.rs, screen.rs, team.rs | Tipos Mode, Screen e Team (reexportados por app) |
title_screen.rs, menu_screen.rs, menu_focus.rs | Título, menu principal, foco suavizado do menu |
stage_select.rs | Grade de cenários |
load_plan.rs, vs_screen.rs | Quem carrega com qual paleta, tela de VS, start_fight |
fight_screen.rs | Frame da luta e rotação de equipe |
results_screen.rs | Tela de resultados |
netplay_session.rs | Início do netplay, overlay e captura de replay |
fighter_draw.rs | Desenho 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
- Liste as responsabilidades do arquivo. Se a lista não é óbvia, leia os chamadores primeiro; o arquivo ainda não foi entendido.
- Crie
feature/e mova uma responsabilidade por PR, um commit por extração. - Não mude comportamento durante a extração. Os testes passam antes e depois, e o diff é quase todo movimento de código.
- Extraia primeiro a menor unidade coesa (a de menos chamadores). Reescrita total conflita com todo PR aberto.
- Atualize esta página se o novo layout for diferente do descrito aqui.
Trabalhar em paralelo
- Prefira arquivos novos. Uma feature adiciona
feat/<coisa>.rse 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.rsetriggers.rs, declarações emmod.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.
| Arquivo | Linhas | Divisão sugerida |
|---|---|---|
crates/native/src/effects.rs | 1711 | effects/canvas.rs, effects/raster.rs, effects/kinds.rs |
crates/engine/src/matchs.rs | 1751 | matchs/round.rs, matchs/collision.rs, matchs/camera.rs, matchs/tick.rs |
src/app.rs | 2238 | Nove 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.rs | 1069 | stages/load.rs, stages/layers.rs, stages/motion.rs |
src/stagefx.rs | 704 | stagefx/scenes.rs já existe; extraia stagefx/particles.rs, stagefx/weather.rs |
src/market.rs | 700 | market/install.rs, market/listing.rs; a crate mantém a lógica |
crates/formats/src/screenpack.rs | 610 | screenpack/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
- Customizar a engine - arquitetura, novo controller, novo trigger ou formato.
- Desempenho - onde ficam os caminhos quentes.
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:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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)
| Recurso | Status | Notas |
|---|---|---|
| SFF v1.01, sprites PCX RLE | Implementado | sff.rs, pcx.rs |
| SFF v1, linhas PCX sem compressão | Implementado | bytes_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 bits | Ausente | A profundidade do cabeçalho é ignorada; esses arquivos saem errados. Raro em packs reais |
SFF v1, paleta compartilhada (flag same pal) | Implementado | Herda a paleta do sprite anterior |
SFF v1, sprites ligados (length = 0) | Implementado | |
| SFF v2.00 / 2.01, 8 bits sem compressão | Implementado | |
| SFF v2, 24 e 32 bits sem compressão | Implementado | Convertidos para RGBA |
| SFF v2, RLE8 / RLE5 / LZ5 | Implementado | sff/codecs.rs |
| SFF v2, PNG 8 / 24 / 32 | Implementado | PNG quebrado vira sprite vazio e transparente |
| SFF v2, paletas (RGB e RGBA, paletas ligadas) | Implementado | |
| SFF v2, escolha de paleta por sprite | Implementado |
SND (sons)
| Recurso | Status | Notas |
|---|---|---|
Contêiner ElecbyteSnd, chaves grupo/índice | Implementado | Vence a primeira chave repetida, como no M.U.G.E.N |
| Cadeia de subarquivos com proteção contra links corrompidos | Implementado | |
| WAV PCM 8 / 16 bits (o caso normal) | Implementado | Decodificado pelo symphonia na camada de áudio |
| WAV ADPCM, 24 bits e outros codecs WAV | Parcial | Depende do que o symphonia aceita; não verificado por codec |
AIR (animações)
| Recurso | Status | Notas |
|---|---|---|
[Begin Action N], quadros, time | Implementado | Ações repetidas: vence a primeira |
Espelhamento H / V | Implementado | |
Blending A, A1, AS<n>D<n>, S | Implementado | |
Clsn1 / Clsn2 e Clsn1Default / Clsn2Default | Implementado | |
xscale, yscale, angle por quadro | Implementado | |
Loopstart | Implementado | |
Interpolate | Ausente | A linha é aceita e ignorada (air.rs); sem interpolação entre quadros |
ACT (paletas)
| Recurso | Status | Notas |
|---|---|---|
| Paleta RGB de 768 bytes | Implementado | Índice 0 transparente, ordem invertida como no MUGEN |
| Arquivos curtos (menos de 256 cores) | Implementado | Entradas faltando ficam pretas |
DEF e CNS (personagens e stages)
| Recurso | Status | Notas |
|---|---|---|
.def de personagem ([Info], [Files], localcoord) | Implementado | |
localcoord 320x240, 640x480 e 1280x720 | Implementado | Posições e distâncias convertidas por jogador |
.def de stage ([Info], [StageInfo], [Camera], [Player], [Bound]) | Implementado | |
Camadas [BG]: normal, anim, parallax, trans, mask, maskwindow | Implementado | |
[BGCtrlDef] / [BGCtrl]: null, visible, enable, velset, veladd, posset, posadd, anim, sinx, siny | Implementado | |
Stage zoffset, autoturn | Implementado | Usados pelo motor (stagevar.rs, matchs.rs) |
Stage resetbg | Ausente | Não é lido em nenhum lugar do workspace |
Screenpacks
| Recurso | Status | Notas |
|---|---|---|
system.def [Info] localcoord (packs 4:3 e 16:9) | Implementado | Convertido 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 elementos | Implementado | |
Storyboards ([SceneDef], [Scene N], fades, camadas, bgm) | Implementado | |
.fnt v1 (PCX embutido, [Def], [Map]) | Implementado | |
.fnt v2 (bitmap e truetype) | Parcial | Lido em fnt.rs; renderização truetype não verificada |
[Versus Screen], [Victory Screen], [Round Info] | Parcial | Lidos pelos prefixos genéricos; nem toda chave tem renderizador próprio; não verificado em packs |
| Particularidades de WinMUGEN e MUGEN 1.0 / 1.1 | Parcial | Chaves desconhecidas são ignoradas, não rejeitadas; sem seletor por versão |
Lacunas conhecidas (próximos PRs)
Pequenos PRs, nesta ordem:
- AIR
Interpolate(palavra-chave hoje ignorada). - Stage
resetbg. - SFF v1 com profundidade baixa (PCX de 1 e 4 bits). Precisa de um caminho de paleta do cabeçalho;
sff.rsestá na linha de base do tamanho de arquivo, então o código v1 deve ir antes para um módulo próprio. - Verificar codecs WAV além de PCM 8/16 bits com packs reais.
- 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
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
- Aperte
U(ou clique em + Adicionar) e informe o link:https://github.com/dono/repo,dono/repoou link de subpasta comohttps://github.com/dono/repo/tree/main/mugen. - O jogo lê a árvore do repositório e mostra tudo o que encontrou.
- Marque os itens desejados (
Espaço, clique ou Todos) e aperte Instalar (I). Os downloads rodam em paralelo com barra de progresso. - 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.
Navegação: lista, grade, formatos e itens desatualizados
- 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/PageDowne 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_SS4eGoku_SSJ4_UMFcontam 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 mostramPACOTE · Ne 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/outhumbs/com o mesmo nome do item (previews/umf/Goku_SSJ4_UMF.pngparaumf/Goku_SSJ4_UMF.zip). Só os cards visíveis são baixados (3 por vez, doraw.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
| Repositório | Personagens | Stages | Músicas | Packs |
|---|---|---|---|---|
| juninmd/ultimate-mugen | — | — | — | elecbyte.zip |
| Carlmundo/NooksVsCrans | chars | stages | sound | Rayman.zip |
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
| Tipo | Regra | O que é instalado |
|---|---|---|
| Personagem | pasta com .def e .sff, .air e .cns/.cmd na árvore | a 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 | .zip | o 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
| Plataforma | Estado 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 |
| Android | armazenamento interno do app, pasta market/ |
| Web | banco 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
httpsparagithub.com,api.github.com,raw.githubusercontent.com,media.githubusercontent.comecodeload.github.comsã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
| Plataforma | Adicionar repositório |
|---|---|
| Desktop | digitar no próprio jogo (colar não funciona na janela do jogo; digite dono/repo) |
| Web e celular | prompt 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.
| Tipo | Link |
|---|---|
| Repositório | zinclee123/mugen_chars |
| Personagens | Hinako · K' · Lin · MasterRyu · Rugal2nd · kusanagi-XIII |
| Stages | nenhum no repositório |
| Músicas | nenhuma no repositório |
| Packs | nenhum 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
Model::from_glblê o.glb(parser próprio sobreserde_json, texturas PNG viapng).StateMap(JSON) liga nomes de anim nativos (anims) ou faixas de estado MUGEN (states) a um clipe, loop e velocidade.- A pose é função pura de
anim_no/anim_elapsed(oustateno/statetime), skinning na CPU, seguro para rollback. Model::projectusa câmera ortográfica no plano da luta, sombreamento Lambert e triângulos de trás para frente, desenhados comume_shell::quad::draw_meshagrupados por textura.
No jogo
src/model3d.rsé a fachada (draw,draw_fit,is_3d,portrait);src/model3d/specs.rslista os modelos.- Luta: uma linha em
render.rs. Painéis de seleção, versus e resultado:draw_fitdentro dedraw_char_fit. Tiles e loading usamportrait. - A seleção tem a categoria
3D. - A forma despertada troca para o segundo modelo (Ichigo: Hollow Total).
src/model3d/aura.rsdesenha os efeitos só do 3D: rastro doAfterImageem 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 porpython3 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 mesmoRastercom z-buffer dos lutadores.src/model3d/airport.rsrenderiza 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
- Pause a luta (
P,Esc,Enterou o botão de pausa). No replay, pause comEspaço. - Aperte
C. O menu de pausa some e a câmera é sua. Esc,PouCsai 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
| Tecla | Ação |
|---|---|
W A S D / setas | Move a câmera (mais devagar quanto mais perto) |
+ / -, PageUp / PageDown, roda do mouse | Zoom entre 0,6x e 2,5x |
F | Troca o filtro: Natural, Cinema, Noir, Vívido, Retrô |
H | Mostra ou esconde o HUD (escondido por padrão) |
. | Avança um quadro para achar o momento exato |
R | Recentraliza a câmera |
Enter / Espaço | Tira 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.rssó 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
Lookde 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::hiddenpula 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.
| Modo | Lutadores em campo | O round acaba quando |
|---|---|---|
| Equipe · Sequência | 1 por lado, o próximo entra após um KO; o vencedor mantém a vida | um lado fica sem lutadores |
| Equipe · Paralelo | a 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óximo | todos os membros de um lado caem |
| Equipe · Tag | 1 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.
- Tier 0 (Primeira Jornada): O vilão supremo Mikazuki Oboro (
- 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 bannerCHEFE 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: 4e 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.
- Fase 1: Oboro utiliza voo, teletransporte sombrio, super velocidade e sua primeira forma (Véu Desperto,
- 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.jsonao 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.rse o desenho emsrc/render/story_loop.rs; a faixa estática continua como reserva. Evidências emscreenshots/story-loop/, geradas comUME_TOUR=storyloop(eUME_TOUR_BURST=1para os GIFs). - Vida dos vilões e chefes. Os capangas das ondas têm cerca de 10 % da vida máxima do protagonista (
9 %a12 %viavillain_life_ratioemsrc/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.
ScoreTotaldo 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, P2Num -/Num +, reconfiguráveis em Controles; os bits do motor sãoLANE_UP/LANE_DOWN). Só anda no chão e com controle, e cada fase limita a faixa ao chão real (lane_far/lane_nearemsrc/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, P2Num *, 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
FIMcom 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.OKrevela a fala e depois avança,ESCpula para o cartão final. Os textos ficam emassets/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*:tale1a*: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 comostory-epilogues.jsonao lado do executável (ou no armazenamento do navegador): as entradas dele substituem as embutidas lutador por lutador. Evidências emscreenshots/story-epilogues/, geradas comUME_TOUR=epilogue; o teste no navegador énode scripts/web-epilogue-smoke.js web/dist. - Capangas (
assets/chars/npc_*.json, gerados porume-tools gen-story-npcs). Lutadores com sprites próprios emassets/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 emassets/chars/sprites/npc_*/e refaça os packs web comume-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/ScoreTotalda engine para o seu lado mais um bônus de1000 × 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 comoP1/P2pelo 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 (
Rno 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_maxticks (padrão 180, três segundos). O HUD mostra uma barra e a marcaTAGsob o retrato de cada parceiro. - Janela de tag cancel. A troca só é aceita quando o lutador ativo tem controle, ou nos primeiros
tag_cancel_windowticks (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,EnemyNearos 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.
TeamModeretorna3neste modo.TagOut/TagIntrocam os lutadores de verdade (veja Extensões Ikemen);Standbyvale1para quem espera eNumPartnerconta 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:
| Plano | O que o boneco segura |
|---|---|
| Parado | Nada |
| Agachado | Baixo |
| Pulando | Cima a cada aterrissagem |
| Defendendo | Trás, só enquanto o rival ataca ou há projétil vivo (ele não sai andando) |
| Defesa baixa | Baixo, mais trás enquanto ameaçado |
| Gravar meus comandos | Nada; tudo que você aperta é gravado (até 10 s) |
| Reproduzir gravação | Seus 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 emsrc/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.
| Campo | Padrão | Faixa | Efeito |
|---|---|---|---|
gravity | 1.0 | 0.25 a 4.0 | Escala 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).
| Golpes | Selo |
|---|---|
| 3-5 | GOOD |
| 6-9 | GREAT! |
| 10-14 | SUPERB! |
| 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, Jingustdash, Kaitotempest, Garanascent, Brunobullrush, Shioncleave, Daichidaybreak. - Ground bounce: Garan
brimstone, Daichilandslide.
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.

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.
| Item | Efeito | Pontos |
|---|---|---|
| Maçã | +12 % de vida | 100 |
| Fatia de pizza | +25 % de vida | 200 |
| Assado | +50 % de vida | 400 |
| Gema | só pontos | 1500 |
| Bateria | +34 % de energia | 150 |

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
Breakabletem posição no chão, faixa (lane), caixa de dano (half_width,height), vida e umPickupSpecopcional. 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 + depthda faixa do objeto. - Um acerto por golpe: depois de um acerto o objeto ignora novos acertos por
REHIT_TICKS(10). O atacante recebeMoveContact/MoveHite 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 delife_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
| Arquivo | Papel |
|---|---|
crates/engine/src/stage_objects.rs | Estado, relógio do objetivo, corpos sólidos |
crates/engine/src/stage_objects/strikes.rs | Golpes e projéteis contra quebráveis, itens soltos |
crates/engine/src/stage_objects/pickups.rs | Física e coleta dos itens |
src/story/objects.rs | Catálogo TOML, criação por fase e por fase bônus |
src/story/objects_art.rs | Sprites, sombras, flash de impacto, ordem de profundidade com os lutadores |
src/vfx/stage_objects.rs | Destroços, faíscas, fumaça, texto flutuante, sons |
src/app/story/bonus.rs, src/app/story/hud.rs | Fluxo 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: dano1 + damageGain * acúmulos.defenceGain: defesa1 + defenceGain * acúmulos(máximo 3x).speedGain: velocidade horizontal1 + 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
- Copie um lutador pronto como base:
cp assets/chars/kaito.json assets/chars/meu.json. - Troque
id(único, minúsculo, sem espaço),name,series,authorecolor. - Opcional: coloque o
idemassets/chars/index.jsonpara definir a ordem na seleção. Os ausentes entram em ordem alfabética depois. - Rode
cargo run --release. Obuild.rsembute todos os.jsonda pasta no executável. - Teste no Treino com
F2ligado 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": []
}
| Campo | Obrigatório | Descrição |
|---|---|---|
format | sim | umf/2 (umf/1 ainda carrega) |
id, name, series, author, color | sim | Identidade; color é a cor do cartão na seleção |
boss | não | true esconde da seleção e coloca como chefe final do Arcade |
profile | não | Nacionalidade e biografia, ver Perfil |
speed | não | Multiplicador de velocidade das animações (>1 = golpes mais rápidos) |
stats | não | Atributos, tabela abaixo |
art | sim | Arte: style.colors guia a recoloração das paletas nos sprites PNG e poses nomeia as chaves de pose |
palettes | não | Cores alternativas; cada item sobrescreve chaves de art.style.colors |
awakeningPalette | não | Cores aplicadas sobre a paleta selecionada durante o despertar; sprites de efeitos não mudam |
anims | sim | Animações por nome |
moves | sim | Golpes |
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):
| Recurso | Onde | O que faz |
|---|---|---|
"extends": "kaito" | raiz | Herda 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 golpe | Clona 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 emanimssubstitui a herdada por inteiro. O valornullremove a chave herdada. movescasam porid. 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,bossenpcnunca são herdados de um lutador. spriteSetreaproveita o pacote de pixel art do pai. Recolora compalettese deixeart.style.colorsherdado: 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 deextendscom 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 porid. Um campoprofiledentro do arquivo do lutador vence essa tabela, então lutadores UMF importados levam o próprio perfil. countryescolhe a bandeira desenhada ao lado da nacionalidade:jp,br,no,us,cn,es,mn,de,kr,ar,au,ru,fr, além das fictíciasunderworldeeclipse. As bandeiras são formas vetoriais emsrc/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=flagssalva 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-callervira STORM CALLER). A lista fica emsrc/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 profileconfere que todo arquivo de lutador emassets/charstem perfil completo nos três idiomas.
stats
| Campo | Padrão de exemplo | Significado |
|---|---|---|
life | 1000 | Vida |
power | 3000 | Barra máxima de super (1000 por nível) |
attack / defense | 100 | Multiplicadores 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 |
airDashes | 1 | Air dashes por pulo (movement.airdash.num) |
height | 100 | Altura 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 quadro | Descrição |
|---|---|
pose | Nome de uma pose em art.poses ou a pose inline (objeto) |
ticks | Duração em ticks (60 por segundo); -1 = infinito |
hit | Hitbox ativa: part (membro ou arma) + radius, ou box [x1, y1, x2, y2] |
hurt | "none" remove a hurtbox (invencível no quadro) |
effect | Desenha um efeito em vez do corpo (projéteis, faíscas), ver Quadros de efeito |
offset | Deslocamento [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
Clsn1do M.U.G.E.N, a caixa vai do corpo até a ponta: começa no máximo0.10 Hà frente da origem e alcança pelo menos0.60 H(a mediana do M.U.G.E.N é0.72 Hnos socos e0.80 Hnos chutes); - pelo menos
0.36 Hde altura, nunca acima de0.95 Hnem abaixo do chão (socos do M.U.G.E.N ficam entre-0.75 He-0.33 H, chutes descem até-0.05 H); - a hurtbox em pé tem
0.46 Hde largura (mediana do M.U.G.E.N0.46 H) e a agachada0.67 Hde altura (mediana0.67 H); - um
boxexplí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.
| Nome | Ação | Nome | Ação |
|---|---|---|---|
idle | 0 | guardHit | 150 |
turn | 5 | crouchGuardHit | 152 |
crouchTurn | 6 | airGuardHit | 154 |
crouchStart / crouch / crouchEnd | 10 / 11 / 12 | lose / draw / win | 170 / 175 / 181 |
walk / walkBack | 20 / 21 | intro | 190 |
jumpStart / jumpUp / jumpFwd / jumpBack / jumpDown | 40–44 | taunt / powerUp | 195 / 196 |
land | 47 | defeat1…defeat4 | 197–200 |
run / hop | 100 / 105 | hitLight / hitMedium / hitHeavy | 5000–5002 |
guardStart / crouchGuardStart / airGuardStart | 120–122 | hitLowLight / hitLowMedium / hitLowHeavy | 5010–5012 |
guard / crouchGuard / airGuard | 130–132 | hitCrouch / hitAir | 5020 / 5030 |
guardEnd | 140 | airRecover / fall / trip | 5040 / 5050 / 5070 |
bounce / bounceAir / lieDown / getUp / dead | 5100 / 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 } }
| Campo | Valores | Efeito |
|---|---|---|
id, name | texto | Identificador e nome na lista de golpes |
input | sintaxe de comando, abaixo | Comando |
simple | sp1 sp2 sp3 super | Atalho de um botão (teclas 1/2/3, toque) |
kind | normal special super | Prioridade e cancelamento: normal → especial → super em acerto ou defesa |
when | stand (padrão) crouch air | Estado de onde o golpe sai |
anim | nome em anims | Animação do golpe |
hits | lista | Um HitDef por item |
moves | [{ "at": quadro, "vel": [x, y] }] | VelSet no quadro; use null para manter um eixo |
projectile | objeto ou lista | Projéteis |
cost | número | Barra consumida; super usa 1000 por padrão |
invuln | [início, fim] | Quadros invencíveis |
teleport | quadro, 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 |
fx | aura | Efeito 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 |
voice | 1000, 0 | Grupo e índice do som do personagem tocado no início do golpe, quando o áudio estiver incluído |
airPhysics | true | Mantém a física aérea |
cancels | lista de ids | Este 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 |
timestop | ticks | Congela todos os outros |
burst | true | Quebra 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 |
flight | true | Pairar 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
cancelssegue o gênero: um normal cancela em qualquer normal mais forte (light<medium<heavypelo 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 porcancelsexplícito; supers cancelam a partir de qualquer golpe. - Rotas explícitas.
"cancels": ["strong", "rush"]nojabfazstrongerushaceitarem ojabno contato. Um especial de projétil pode ser cancelado quando o projétil toca o oponente. Um especialairpode 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 elementoat(dê uma caixahita esse frame), a vítima fica presa emat + 1, leva o dano emat + 2e é lançada, então a animação precisa de pelo menosat + 2frames. Agarrões ignoram defesa e falham fora do alcance.armor(hitsabsorvidos,thresholdopcional = 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 oshits, o próximo golpe derruba normalmente.- Cola de multi-hit. Golpes com três ou mais
hitsempurram 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. Definaknockbackpara 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[]
| Campo | Padrão | Descrição |
|---|---|---|
at | — | Quadro (1 = primeiro) em que o HitDef é ativado |
damage | — | Dano |
guardDamage | damage / 8 | Dano na defesa |
level | medium | light (hitstop 9, hitstun 12), medium (11, 16), heavy (13, 20) |
guard | mid | high, low, mid ou unblockable |
knockback / airKnockback | pelo nível | Velocidade [x, y] aplicada ao oponente |
launch | false | Derruba |
hitstop, hitstun, spark, shake | pelo nível | Ajuste fino |
projectile
| Campo | Descrição |
|---|---|
at | Quadro em que sai |
anim / hitAnim | Animação em voo / ao acertar |
speed / accel | Velocidade e aceleração [x, y] |
offset | Posição de saída [x, y] relativa ao lutador |
damage, level, launch, knockback | Como em hits |
hits | Número de acertos |
removeTime | Ticks até sumir |
priority | Prioridade 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ímbolo | Significado | Exemplo |
|---|---|---|
F B U D / DF DB UF UB | Direções (relativas ao lado) | D, DF, F, x |
x y z a b c | Botões (s = start) | x |
, | Em sequência | F, F |
+ | Ao mesmo tempo | x+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 passos | F, >F |
N | Direçã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:
| Bloco | Substitui no M.U.G.E.N / ZSS | Recursos principais |
|---|---|---|
helpers.stand | Helper(keyctrl=1) + BindToParent + HitOverride manuais | Stand 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.clones | Helpers autônomos de IA | Clones 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-etapa | p2Anim (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[].cinematic | Direção cinematográfica em golpes/supers | letterbox, 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 |
bossRules | Quebra de UI em [StateDef -4] via AssertSpecial / Text / ModifyPlayer | hideHud, hideLifeBar, hidePowerBar, hideTimer, freezeTimer, texts[], modifyPlayer[] ("enemy" ou próprio chefe), phases[] (lifeBelowRatio, when, once, attackMul, defenceMul) |
scripts | Arquivos .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:F4alternaOverview/Vars & Maps/Clipboard & HitDef(DisplayToClipboard) /Console & Engine(PrintToConsolee avisos);F5congela a simulação;F6ou.avança+1 frame;F7alterna velocidade (1x/0.5x/0.25x/0.1x);F8alterna 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,consolee 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).
| Arquivo | Poses que o usam |
|---|---|
01_idle | idle0, andar, correr, agachar, defender, pular e toda pose sem arte própria |
02_attack1 … 06_victory | poses de soco, chute, especial, projétil e vitória / provocação |
07_idle1, 08_idle2 | os outros quadros de respiração do idle (idle3 reaproveita 07_idle1) |
09_hit1, 10_hit2, 11_hit3 | hitH1, hitH2, hitH3 (dano) |
12_fall1, 13_fall2 | hitAir1/fall1/trip e hitAir2/fall2/bounce (lançado ao ar) |
14_lie | lie, dead, lose e toda pose df* (nocauteado, com hurtbox baixa e larga) |
15_power0, 16_power1, 17_power2 | powerup0, 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.deforiginal.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>.pngcom as paletas do SFF,pal1.act..pal12.act, todos os sons comosnd_g_i.wavemeta.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)
| ID | Nome | País | Alinhamento | Papel / Arquétipo | Cenário Natal | Forma Desperta |
|---|---|---|---|---|---|---|
kaito | Kaito Arashi | Japão | Herói | Karateca Andarilho da Tempestade | Telhado do Dojo — Pôr do Sol (dojo) | Olho da Tempestade |
shion | Shion Kurogane | Egito | Anti-Herói | Espadachim Exilado da Lua Pálida | Bambuzal ao Luar (bamboo) | Lua Cheia |
akio | Akio Hoshi | México | Herói | Lutador Impetuoso da Queda Estelar | Telhado do Dojo — Pôr do Sol (dojo) | Luz Estelar |
suzume | Suzume Kagerou | Vietnã | Anti-Herói | Kunoichi das Sombras do Lótus Carmesim | Bambuzal ao Luar (bamboo) | Lótus Sombrio |
bruno | Bruno "Bulldozer" Volk | Brasil | Herói | Campeão Invicto Peso-Pesado | Praça do Interior — Brasil (brazil) | Fúria do Ringue |
sylene | Sylene Vashti | Noruega | Neutro | Soberana Exilada da Coroa Glacial | Planalto Rochoso (plains) | Rainha do Inverno |
volta | VX-9 Volta | Estados Unidos | Herói | Androide Cibernético Senciente | Neo-Metrópole 2099 (neon) | Sobrecarga |
lian | Lian Feng | China | Herói | Grã-Mestra dos Chutes da Lanterna de Jade | Bambuzal ao Luar (bamboo) | Dragão de Jade |
garan | Garan the Ashen Oni | Submundo | Vilão | Calamidade Demoníaca Ancestral | Cratera Vulcânica (volcano) | Oni Desperto |
marlow | Capitão Marlow Reyes | Espanha | Anti-Herói | Corsário Aéreo do Galeão Tempestuoso | Planalto Rochoso (plains) | Capitão Tempestade |
kaname | Kaname Fuyutsuki | Suíça | Neutro / Leal | Juiz Samurai do Inverno Eterno | Portão dos Espíritos (spirit) | Lâmina Espiritual |
jin | Jin Kazaguruma | Jamaica | Herói | Shinobi Acrobata do Vendaval | Bambuzal ao Luar (bamboo) | Tufão |
daichi | Daichi Ginrou | Mongólia | Herói | Lobo dos Picos Celestes de Ki Dourado | Planalto Rochoso (plains) | Instinto Lupino |
valdric | Valdric Morn | Alemanha | Vilão | Príncipe Senhor da Guerra Imperial | Neo-Metrópole 2099 (neon) | Dominância Escarlate |
haruki | Haruki Sumi | Coreia do Sul | Herói | Erudito Relutante / Portador dos Titãs | Portão dos Espíritos (spirit) | Fúria Contida |
oboro | Mikazuki Oboro | Dimensão Eclipse | Vilão Supremo (Chefe) | Soberano das Ilusões e Chamas Negras | Portão dos Espíritos / Vulcão (spirit/volcano) | Véu Desperto |
Dossiês Individuais
1. Kaito Arashi (嵐 海斗)
| Identidade Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Crônicas da Estrada da Tempestade ID: kaito | Autor: Ultimate MUGENOrigem: 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) |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Réquiem da Lua Pálida ID: shion | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Dojo da Queda Estelar ID: akio | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Shinobi do Lótus Carmesim ID: suzume | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Federação do Ringue de Ferro ID: bruno | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Saga da Coroa Glacial ID: sylene | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Protocolo Grade Neon ID: volta | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Contos da Lanterna de Jade ID: lian | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Lendas do Portão de Cinzas ID: garan | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Corsários do Vento Salgado ID: marlow | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Crônicas da Lâmina do Inverno Eterno ID: kaname | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Ventos da Vila Escondida no Vale ID: jin | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Lendas do Punho do Pico Celeste ID: daichi | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Crônicas do Império da Estrela Rubra ID: valdric | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Arquivos da Biblioteca do Crepúsculo ID: haruki | Autor: Ultimate MUGENOrigem: 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 |
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 Visual | Perfil de Combate |
|---|---|
Retrato de Seleção / HUD | Série: Eclipse Escarlate — Chefe Final ID: oboro | Autor: Ultimate MUGENOrigem: 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 |
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ção | Comando | Notas |
|---|---|---|
| Projétil EX | movimento do projétil + x+y | 250 de barra, tiro mais forte com mais acertos |
| Anti-aéreo EX | movimento do uppercut + y+b | 500 de barra, invulnerabilidade maior |
| Overhead | x+b | golpe médio que exige defesa alta |
| Launcher agachado | agachado + y | inicia combos aéreos |
| Golpe mergulho | y no ar | quica o oponente no chão |
| Hyper nível 3 | movimento do super + x+y | gasta a barra inteira (3000) |
| Especial despertado | movimento do projétil + a+b | só transformado, leque de três tiros |
| Transformação | L3+R3 / despertar | consome energia, aumenta ataque e movimento, libera golpes da forma e aumenta o dano recebido sem guarda |
| Slide baixo | F+a | golpe baixo que lança, mixup contra o overhead |
| Escape burst | x+a+b | 500 de barra, escapa do hit-stun |
| Forma ascendida | segunda transformação | 2000 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.xmldescreve o formato.def/.cns/.cmd/.aircomo dados: tipos,required,minver,deprecated. Ex.:StateDefexigetype,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 devar/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
statetypedo 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
| Jogo | Conhecido por |
|---|---|
| Dragon Ball FighterZ | Fidelidade ao anime, 3v3 com assists, auto-combo para iniciantes, lobbies ranqueados |
| Sparking! Zero | Elenco grande, destruição de cenário, tutorial longo, regras de batalha personalizáveis |
| Melty Blood: Type Lumina | Estilos 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 Battle | Layout simples de 2 botões, assists, rollback |
| Street Fighter 6 | Controles modernos, HUD do Drive, medidor de frames, replays compartilháveis, Battle Hub, tutorial |
| Mortal Kombat 1 | Kameos, torres, treino com tutorial por personagem |
| Tekken 8 | Modo prática, ghost battle, replays e dicas, guias por personagem |
| Them's Fighterz, Skullgirls | Rollback, treino muito completo, opções para daltônicos, tutorial |
| Persona 4 Arena Ultimax | Hit-stop e supers cinematográficos, apresentação de história |
| The King of Fighters XV | Seleção de time com ordem, 3v3 em sequência, rollback, prática |
| Under Night In-Birth II | Layout compacto de 6 botões, HUD do GRD, rollback, treino profundo |
| Ikemen GO e comunidade M.U.G.E.N | Screenpacks 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.
| Área | Hoje |
|---|---|
| Modos | Arcade, Versus CPU, 2 jogadores, Treino, CPU vs CPU, Equipe sequência, Equipe paralelo (Mode em src/app.rs) |
| Treino | Boneco (Pilot::Dummy), barra infinita, hitboxes no menu de pausa |
| Menu de pausa | Continuar, Hitboxes, Reiniciar, Trocar personagens, Configurações, Menu principal |
| HUD | Painéis de vidro, retratos grandes, combo, pulso de vida baixa, medidor MAX, timer urgente (PR #156) |
| Feedback de impacto | Partículas, tremor, hit-stop, câmera lenta no KO, corte de super, aberração cromática, intensidade configurável |
| Configurações | Abas Vídeo, Áudio, Controles, Jogabilidade, Idioma, Sobre |
| Netplay | Rollback GGRS via UDP só por flags (--netplay, --peer); replays .umr; sem lobby no jogo, sem transporte para web e celular |
| Replays | Re-simulação da última luta a partir dos controles gravados; formato de arquivo existe |
| Conteúdo | Mercado via GitHub, importação .def/.zip, lutadores UMF |
| Tutorial e desafios | Nenhum. 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
| # | Oportunidade | Motivo | Esforço | Toca em |
|---|---|---|---|---|
| 1 | Treino 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 barra | SF6, Tekken 8, Strive e Skullgirls têm gravação do boneco e resets. Sem isso o treino é só ver hitbox | M | Pilot::Dummy em src/session.rs, pausa em src/app.rs, overlay em src/hud.rs |
| 2 | Histórico de comandos e dados de frame: entradas rolando com contagem de frames, e startup, ativo, recuperação, vantagem e dano do último golpe | SF6 e Strive mostram isso no treino; é como o jogador aprende matchups. A simulação já é determinística a 60 Hz | M | src/hud.rs, crates/engine (hooks só leitura), src/session.rs |
| 3 | Tela online no jogo: criar ou entrar por código, IP direto, atraso e ping antes da luta, revanche | O rollback só existe via flags. Todo lutador de console tem lobby e revanche. Começar com salas por código usando o matchbox já decidido | G | src/netlink.rs, crates/netplay, novo Screen::Online |
| 4 | UI de qualidade de conexão: gráfico de ping, jitter e frames revertidos, aviso de conexão ruim | Strive e SF6 mostram qualidade da conexão; consta na seção 1 do ROADMAP | P | src/hud.rs, crates/netplay |
| 5 | Tutorial guiado: básico (mover, bloquear, especial, super), depois lista de golpes por personagem com entrada ao vivo | SF6, Tekken 8, Strive e Skullgirls têm tutorial; motores estilo MUGEN normalmente não, então o iniciante fica sem apoio | G | Novo Screen::Tutorial, reuso de src/app/cutscene.rs |
P1: alto valor, custo moderado
| # | Oportunidade | Motivo | Esforço | Toca em |
|---|---|---|---|---|
| 6 | Combo trials a partir de lista JSON por personagem, com próximo comando na tela | Guilty Gear, SF6, DBFZ e Melty Blood têm; já está no ROADMAP. Criadores UMF podem entregar trials junto do lutador | M | Runner sobre Session, esquema em docs/CHARACTER_FORMAT.md |
| 7 | Controle simples (moderno): especiais com um botão e auto-combo opcionais por jogador | SF6 Modern, DBFZ, Melty Blood e BlazBlue CTB têm; muito importante para toque | M | src/controls.rs, src/keybinds.rs, camada de comandos em crates/engine |
| 8 | Passe de acessibilidade: paletas para daltônicos, reduzir flash e tremor separadamente, texto maior, cores de hitbox com alto contraste, alternar em vez de segurar | Vários jogos têm modo daltônico e flash reduzido. Hoje há só um controle de intensidade | M | src/settings.rs, src/app/settings_screen.rs, src/vfx.rs, src/hud.rs |
| 9 | Visualizador de replays: lista, velocidade, pausa, frame a frame, câmera, assumir um personagem, salvar e compartilhar .umr | SF6, Tekken 8 e Strive permitem navegar e compartilhar replays; formato e re-simulação já são determinísticos | M | src/app.rs (Replay), crates/netplay, novo Screen::Replays |
| 10 | Ranked e fila de partidas (precisa de servidor): rating, fila anônima, revanche, sequência de vitórias | Padrão em lutadores de console. Exige serviço pequeno; vem depois dos lobbies | GG | Novo serviço e Screen::Online |
| 11 | Seleçã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 origem | KOF 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.rs | M | src/app.rs, src/menu_art.rs |
| 12 | Pausa 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á existe | P | src/app.rs pausa e Screen::Results |
P2: profundidade e acabamento
| # | Oportunidade | Motivo | Esforço | Toca em |
|---|---|---|---|---|
| 13 | Página de opções do treino: vida infinita ou regenerativa, modos de barra, dano, hit-stun, escala de combo | Existe em praticamente todo modo treino | P | Pausa, src/hud.rs |
| 14 | Sobrevivência, boss rush e torres com recompensas | MK1 (torres), Sparking! Zero e Tekken; seção 5 do ROADMAP | M | Novos Mode, reuso de Team |
| 15 | Arcade com rival, introduções e finais por personagem via storyboard | Padrão em Tekken, MK e KOF; Cutscene já suporta cenas | M | src/app/cutscene.rs |
| 16 | Modo espectador de partidas com rollback | Muito usado em torneios no Strive e SF6 | G | crates/netplay, Screen::Online |
| 17 | Regras por partida: rounds, tempo, escala de dano, gravidade, handicap | Regras do Sparking! Zero, modificadores do MK, configs da comunidade MUGEN | P | Rules (já existe em Replay) |
| 18 | Medidor de frames e legenda de hitboxes em tempo real | Medidor do SF6 e modos de hitbox do Skullgirls | M | src/render.rs |
| 19 | UX de controle: teste de latência, teste de botões, perfis por dispositivo, zona morta e SOCD | Necessário para fliperama e controle; teste de latência é comum | P | src/controls.rs, src/gamepad.rs |
| 20 | Sensação do menu: som e animação em cada cursor, repetição ao segurar, paridade mouse e toque, botão voltar no celular | Acabamento visto em todos os jogos | P | src/ui.rs, src/app.rs |
P3: ecossistema e longo prazo
| # | Oportunidade | Motivo | Esforço | Toca em |
|---|---|---|---|---|
| 21 | Suporte a screenpacks (fight.def, system.def) desenhados em wgpu | Maior reaproveitamento do trabalho da comunidade; loaders existem e a migração para wgpu já terminou | GG | crates/formats/src/screenpack.rs, src/hud.rs, src/menu_art.rs |
| 22 | Descoberta no mercado: notas, tags, capturas, aviso de atualização | Jogos com mods dependem de descoberta; o mercado já existe | M | crates/market, src/app/market.rs |
| 23 | Dicas e guias por personagem escritos pelo criador no UMF | Mesma ideia dos guias do SF6 e Tekken 8 | P | Esquema UMF, tutorial |
| 24 | Ferramentas de torneio: chaveamento a partir de .umr, gravador, overlay para streamers | Seção 2 do ROADMAP | G | Novo crate |
| 25 | Mais idiomas (espanhol, japonês) e rótulos para leitores de tela | Seção 5 do ROADMAP | M | src/i18n.rs |
Sequência sugerida
- Treino (1, 2, 13), pois facilita validar o resto.
- UI de rede e tela online (4, 3), depois replays (9).
- Tutorial e trials (5, 6), depois acessibilidade e controle moderno (8, 7).
- Seleção e resultados (11, 12), depois modos (14, 15).
- Ranked e espectador (10, 16) com lobbies estáveis.
- 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
Matchdeve entrar emume_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údo | Onde fica | Documentado em | Mudança em Rust |
|---|---|---|---|
| Lutador nativo | assets/chars/<id>.json, listado em assets/chars/index.json | Personagem UMF, Criar um personagem | Não |
| Bios e nacionalidade | assets/char_profiles.json | Personagens | Não |
| Lutador ou cenário M.U.G.E.N | mugen/chars/, mugen/stages/ ou o mercado | Conteúdo M.U.G.E.N, Mercado | Não |
| Cenário embutido por dados | assets/stages/data/<id>/stage.def e seus arquivos, embutidos pelo build.rs | Criar um cenário | Não |
| Aparência do cenário (luz de contorno, tom, vinheta) | assets/stagelook.toml | Efeitos visuais | Não |
| Adereços de cenário | assets/stageprops.toml e assets/props/ | Efeitos visuais | Não |
| Objetos de história (caixotes, comida, fases bônus) | assets/story/objects.toml | Objetos de cenário | Não |
| Finais da história | assets/story/epilogues.json | Modos de jogo | Não |
| Rotas de arcade e desbloqueios | assets/routes/unlocks.toml | Arquivos de rota | Não |
| Pós-processamento | assets/postfx.toml | Efeitos visuais | Não |
| Passivos, medidores de assinatura | campos de um lutador UMF | Passivos | Não |
| Controller ou trigger | crates/engine | Customizar a engine, Scripts CNS | Sim |
| Novo formato de arquivo | crates/formats | Arquitetura | Sim |
| Nova tela | src/app/<tela>.rs | Layout de arquivos | Sim |
Regras para um novo tipo de conteúdo
- Defina como arquivo de dados em
assets/, embutido pelobuild.rsquando acompanha o jogo. - Crie uma página na wiki em inglês e em
pt-BRe adicione uma linha à tabela acima. - Adicione um teste que carregue os arquivos entregues, para que um dado quebrado falhe no CI e não no jogo.
- 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.
| Etapa | Nome (pt-BR / en) | Custo | Duração | Efeito |
|---|---|---|---|---|
| 1ª | Potencial Liberado / Unleashed Potential | meia barra de poder | 12 s | ataque x1,2, dano recebido x0,9 |
| 2ª | Modo Fúria / Fury Mode | barra de poder cheia | 9 s | ataque 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
| Sintoma | Causa provável | O que fazer |
|---|---|---|
| Personagem não aparece na seleção | .def fora de mugen/chars/<nome>/ ou erro de parse | Rode mugen_check na pasta e leia o erro |
| Sprites invisíveis ou quadrados | Sprite ausente no .sff ou paleta errada | sprite_audit lista as referências quebradas |
| Lutador flutua ou afunda | Estado que não volta ao chão | hover_check com TRACE=1 |
| Personagem HD gigante ou minúsculo | localcoord ausente no .def | Adicione localcoord = 1280, 720 em [Info] |
| Golpe sem efeito | Controller ainda não implementado | Veja a lista em Scripts CNS |
| UMF não carrega | JSON inválido ou campo obrigatório faltando | cargo run --release mostra o erro do serde_json com linha e coluna |
| Jogo lento | Resolução de arte alta | Menu Vídeo → Qualidade, ou quality=1 no .cfg |
| Muitos flashes | Sensibilidade à luz | impact_lv=0 no .cfg |
| Lutador continua andando sozinho e os comandos param de sair | Tecla 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ório | Defina 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):
| Shard | Cenários |
|---|---|
ui | fluxo título até a luta, clique em Arcade, intro da história, epílogo |
mobile | menu por toque, controles de toque na luta, smoke da engine em viewport Pixel 7 |
engine | smoke da engine (?smoke=1): boot, menus, seleção, treino, 5v5, história; mais o autoteste do guard |
loading | import M.U.G.E.N (kfm), lutadores nativos com despertares, arena de poder, desbloqueio de áudio, tela de erro fatal (unreachable) |
match-1, match-2 | partidas 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 executedourenderbufferStorageMultisampleno console;gpu error:(handler de erros do wgpu emume-shell);pageerrornã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
- Crie
scripts/web-<nome>-smoke.jsque receba a pasta dist como primeiro argumento e saia com código diferente de zero em falha. - Inclua em
scripts/web-qa.jsoncom um shard, ou liste emexcludedcom 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
- 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. - 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.
- 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. - 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. - Manter o primeiro especial como quarto de círculo mais
xe entradas de carga só em golpes de chão: o smoke test do elenco e a auditoria de entradas dependem disso. - 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.N | Dado UMF |
|---|---|
Statedef 200..610 com HitDef | moves[] com kind: normal, when, hits[].pausetime, hits[].hitstun |
cancels por movehit e numhelper | cancels, rekka {after, window, contact} |
Projectile com projhits e projpriority | projectile {at, speed, hits, priority, removeTime} |
| Statedef de bola no ar | Automá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 / HitOverride | parry {window} |
Agarrão TargetBind | throw {damage, bind, launch} ou throw.steps |
| Clone helper (Aizen) | helpers.clones |
Modo de poder var(11) (Kaio Ken) | abilities.forms |
SuperPause, AfterImage, EnvShake | kind: super, fx, shake |
Constantes [Data]/[Velocity] | stats |
Captain Marlow Reyes reconstruído
Tudo em assets/chars/marlow.json, só dados:
| Mudança | Origem da ideia |
|---|---|
| Todas as poses de juntas inline removidas das anims; 13 frames agora usam poses PNG | Regra só sprites |
| Normais leves com pausa 6/7 e 12 ticks de stun, fortes com pausa 11/12 e 15 | Tabela 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 spout | Shunpo 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çando | Rush 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 ticks | Bolas 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 = 1 | Mobilidade 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) eAmbientRun/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
| Engine | Licença | Relevância para UI | O que podemos usar |
|---|---|---|---|
| Macroquad | MIT OR Apache-2.0 | Alta. 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. |
| Fyrox | MIT | Alta. 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 estilo | Referê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. |
| Bevy | MIT OR Apache-2.0 | Mé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. |
| Ambient | MIT OR Apache-2.0 | Baixa a média. Árvore de elementos de UI (element, element_component) sobre o próprio runtime | Só a ideia de compor elementos pequenos e reutilizáveis (botão, painel, rótulo) com propriedades. O runtime é grande demais para aproveitar. |
| GGEZ | MIT | Baixa. Sem camada de UI; tem caminho de texto e glifos e timers | Referência de loop mínimo e de renderização de texto com cache de glifos. Nada a copiar para o visual da UI. |
| Tetra | não verificada | Baixa (só pelo artigo) | Nada além do que já temos. |
| Amethyst | não verificada | Baixa (só pelo artigo). Vale checar o estado do projeto antes de qualquer referência | Ignorar. |
| Piston | não verificada | Baixa (só pelo artigo) | Ignorar. |
| Nannou | não verificada | Baixa (só pelo artigo; é code art criativo, não UI de jogo) | Ignorar. |
| Blue Engine | não verificada | Baixa (só pelo artigo) | Ignorar. |
| rend3 | não verificada | Baixa (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.
- Tela de loading com barra de progresso e dicas. O
progress_bardo Fyrox e o painel simples do Macroquad mostram o padrão. Já existesrc/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. - Navegação por foco com teclado e gamepad, com repetição de tecla.
key_repeat.rsdo Macroquad enavigation.rsdo Fyrox. Segurar cima e baixo nos menus deve andar suavemente, e o foco precisa estar visível em todas as telas. - Widgets de configuração: dropdown, abas e scroll.
dropdown_list,tab_control,scroll_viewerdo Fyrox e o combobox do Macroquad definem o comportamento esperado (abrir, fechar ao clicar fora, seleção pelo teclado). Colocar em arquivos novos emsrc/ui/ousrc/app/, usandoui_tokens. - Diálogos de confirmação e tooltips.
messageboxepopupdo Fyrox para "sair da partida?", "apagar replay?" e similares. Deixa ações destrutivas explícitas. - Struct de tema para cores e tamanhos.
style.rsdo Macroquad e o módulostyledo Fyrox. Já temos 11 temas emmenu_art.rs; reunir os valores numa structThemecom tokens faz de um novo tema uma mudança de dados. - 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).
- 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.
| Item | Situação |
|---|---|
| Loading com barra de progresso e dicas | Já 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 menu | Já existe: src/app/menu_focus.rs (easing independente da taxa de quadros). Manter. |
| Diálogos de confirmação | Existe 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 telas | Já existe: wipe diagonal em src/app.rs. Manter. |
| Repetição de tecla ao segurar uma direção | Faltava: 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 tema | Nã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
- Engine para o stack de renderização e UI.
- Visual Effects para o pipeline de efeitos.
- Versão em inglês: Rust-Engine-UI-References.
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:
| Campo | Tipo |
|---|---|
| magic | UMRP |
| version | u32 (1) |
| players | u32 |
| contagem de metadados, depois strings chave/valor | tamanho u32 + UTF-8 |
| contagem de quadros | u32 |
| runs | repetiçã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.
| Campo | Significado |
|---|---|
format / version | ultimate-mugen-replay / 1; versões diferentes são recusadas com mensagem clara |
label, saved_at | nome exibido no navegador e carimbo Unix (usado na ordenação) |
mode | Arcade, Cpu, Versus, Training, Watch, TeamSeq, TeamSimul, TeamTag |
chars, stage, palettes | ids dos lutadores, id do cenário e paleta de cada lado |
seed | semente inicial da luta (o replay restaura antes do primeiro tick) |
teams, simul, tag | elencos por id de lutador (modos de equipe) |
rules | rounds, tempo do round, % de vida, round único, pushbox, vida compartilhada, velocidade |
inputs | trilha 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:
| Tecla | Ação |
|---|---|
| ↑ / ↓, Enter | escolher e jogar |
| R | renomear (Enter confirma, Esc cancela) |
| Delete (duas vezes) | apagar o arquivo selecionado |
| S | alternar ordenação entre data e nome |
| Esc | voltar ao menu |
Teclas durante a reprodução:
| Tecla | Ação |
|---|---|
| Espaço / Start | pausar e continuar |
| 1 / 2 / 4 | velocidade 1x, 2x, 4x |
. ou → pausado | avançar um quadro |
| Esc | sair 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
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 daintrogenérica.taunt: resposta, no lugar datauntgené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
- Variável de ambiente
UME_STORY_SCRIPT=<caminho>(se definida e legível). story/campaign.tomlno diretório atual ou ao lado do executável do jogo.- 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.tomlcom:
[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."]
titleebeatsaceitam tanto texto simples / lista simples (usados em todos os idiomas) quanto tabela{ en, pt, es }.alt_bossentra automaticamente caso o jogador escolha obossprincipal 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.
| Regra | Valor |
|---|---|
| Custo | 500 de energia |
| Janela | 1 a 45 ticks depois do contato (CONTACT_WINDOW) |
| Buffer de entrada | O toque é lembrado por 6 ticks, então apertar um pouco antes ainda funciona |
| Recarga | 40 ticks entre cancelamentos |
| Condição | movetype = A, o golpe acertou ou foi defendido, o lutador está vivo e o round corre |
| Não vale | Golpe 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
- 500 de energia são gastos e o lutador vai para o estado neutro da sua postura (
0em pé,11agachado,50no ar) com controle. - 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.
- Todo rival em estado de dano ou defesa ganha 8 ticks extras de stun (
VICTIM_STUN_BONUS), o que permite a continuação conectar. - A partida entra em câmera lenta por 15 ticks, o lutador pisca em azul e deixa um rastro de afterimage.
- 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ça | Arquivo |
|---|---|
| Estado, buffer, constantes | crates/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 vida | src/hud/rush_marker.rs (UME_SHOTS_ONLY=rush captura) |
| Evento para a apresentação | Event::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 rollback | overdrive, cooldown e cancels em crates/netplay/src/checksum.rs |
| Testes | cargo 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.*dosystem.defsubstituem os títulos do menu principal (Arcade, Sobrevivência, equipes, Treino, CPU vs CPU, Sair). - A ordem de
[Characters]doselect.defdefine a ordem da grade de seleção. - As cenas de texto do
intro.storyboardsão exibidas sobre a abertura do Arcade, com o tempo deend.timede cada cena. pos/range.xda barra de vida dofight.defposicionam e dimensionam as barras (convertidos dolocalcoorddo 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::Screenpackpara 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):
| Recurso | Comportamento |
|---|---|
Passo N | Direçã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 customizados | Quando 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âmetro | Padrão | Significado |
|---|---|---|
scale | 1 | Escala pedida |
time | 1 | Ticks em que o pedido continua ativo; dispare a cada tick para mantê-lo |
delta | 0 | Somado à escala pedida a cada tick do pedido (uma rampa) |
pos | 0, 0 | Deslocamento do foco da câmera no localcoord do jogador |
lag | 0 | 0 vai à escala pedida em um tick; valores próximos de 1 suavizam (1 - lag da distância restante por tick) |
zoomindelay | 0 | Ticks de espera antes de um zoom-in (scale > 1) começar |
bound | 1 | 1 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 porpos(localcoord do jogador) e, opcionalmente, define a escala da câmera comzoom. Usa o mesmo mecanismo doZoom(veja acima):bound = 1mantém o deslocamento dentro dos limites do cenário e a escala dentro dos limites de zoom do cenário,lagsuaviza o zoom,timeé o número de ticks em que o pedido fica ativo. Semzoom, a escala atual é mantida.Cinema(bars,slow,invert,lines,flash): ativa barras letterbox (bars0..1), câmera lenta determinística (slowticks), flash de impacto invertido (invert = 1), linhas de velocidade (lines0..1) e flash colorido (flash = r, g, b).SlowMo(time): ativa câmera lenta determinística portimeticks.GroundLevelOffset value = n: eleva emnpixels 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 Ye a altura de criação de projéteis, explods e helpers incluem o deslocamento. O deslocamento zera no início do round.DeptheDepthBoundsã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).
| Trigger | Relativo ao zoom | Significado |
|---|---|---|
ScreenWidth, ScreenHeight | sim | Tamanho da área visível (GameWidth / GameHeight continuam devolvendo o tamanho bruto da vista em pixels do jogo) |
TopBoundDist | sim | Distância da posição do jogador até o ponto mais alto que o cenário deixa a câmera mostrar (boundhigh, elevado por dynamicboundhigh) |
TopBoundBodyDist | sim | O mesmo, menos o size.height do jogador (cabeça até o teto) |
BotBoundDist, BotBoundBodyDist | sim | Distâ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, StageBackEdgeDist | sim | Distâ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ão | Número de camadas de fundo do cenário, opcionalmente só as com o id dado |
StageBGVar(id, nome) | não | Valor 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ão | Número do grupo [Constants] do cenário (0 se faltar ou nos cenários nativos) |
Const1080p(n) | não | n convertido de um desenho com 1920 pixels de largura para o localcoord do jogador |
LocalCoord X / LocalCoord Y | não | Largura / altura do localcoord do jogador |
Angle, Scale X/Y, Alpha X/Y, SprPriority, LayerNo | não | O 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), CameraZoom | sim | Veja "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:=emvar(n) := valor.
Regras de pausa e congelamento
| Entidade | Hit pause (atacante) / hit shake (defensor) | Pause | SuperPause |
|---|---|---|---|
| Lutador ou helper | Animação, Time, física e timers param; só rodam controllers com ignorehitpause = 1 | Congelado, exceto quem pausou durante movetime e helpers com ticks de pausemovetime restantes | Congelado, exceto quem pausou durante movetime e helpers com ticks de supermovetime restantes |
| Explod | Continua com ignorehitpause = 1 (padrão); com 0 para enquanto o dono está em hit pause ou hit shake, inclusive o vínculo de posição | Congelado, salvo ticks de pausemovetime restantes | Congelado, salvo ticks de supermovetime restantes |
| Projétil | Não é afetado pelo hit pause do dono | Congelado, salvo ticks de pausemovetime restantes | Congelado, salvo ticks de supermovetime restantes |
- O orçamento de
pausemovetime/supermovetimegasta um tick por frame congelado e só pelo seu próprio tipo de pausa. AnimTime,AnimElemTime,AnimElemNoeTimemantê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)eHitShakeOverdescrevem o shake do defensor. Os demais campos deGetHitVarsã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
F2no 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):
| Achado | Significado |
|---|---|
| controlador não suportado | o type não tem implementação |
| trigger desconhecido | o nome do trigger não é avaliado pela engine |
| redirecionamento / trigger de texto não suportado | um tipo de redirecionamento (partner, ...) ou comparação de texto (p3name = ...) que a engine não resolve |
| parâmetro desconhecido | nenhum caminho do controlador lê esse parâmetro |
| flag de AssertSpecial desconhecida | a 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).
| Trigger | Variá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 SpritePlayerNo | total 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.
| Lugar | Função | Arquivos típicos |
|---|---|---|
| Camada de engine e screenpack | Menus, modos de jogo, seleção, tela de vitória, hooks | main.lua, start.lua, arquivos de motif e módulos |
| Módulos externos | Extras opcionais: modos, estatísticas, ferramentas de treino | external/mods/*.lua |
| DEF do lutador | arcadepath em [Arcade]: rota de arcade, storyboards e rivais daquele lutador | arcade.lua ao lado do .def |
| Pacotes de conteúdo | Screenpack 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ê
.luae 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_checkreporta controllers, triggers e parâmetros não suportados, mas não arquivos.luasoltos.
Alternativas sem Lua
| Uso do Lua | Substituto |
|---|---|
| Menus e telas | Screenpack (system.def, fight.def) e o código de menus em Rust, veja Screenpacks |
| Modos de jogo | Modos em Rust e dados, veja Modos de jogo |
| Comportamento e IA do lutador | CNS ou ZSS, ou UMF JSON, veja Scripts CNS e Criar personagem UMF |
| Regras e ajustes | Campos de dados (TOML ou JSON) lidos pelo Rust |
Recomendação
- Manter Lua sem suporte. Não adicionar runtime.
- Fazer o importador detectar
.luae avisar uma vez por personagem: "ignorado: scripts Lua não são suportados", para o criador saber por que falta um menu ou modo. - Incluir a mesma linha no relatório do
mugen_check. - 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
redlifedo HitDef deRedLife, então a barra vermelha cresce por cima da vida real. Um golpe defendido usa o segundo valor deredlife. LifeAdd,LifeSet,RedLifeAddeRedLifeSetrespeitam a regra acima. QuandoLifepassa deRedLife,RedLifeacompanha.- Um novo round volta
RedLifeparaLifeMax. NoRedLifeDamageimpede 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
dizzypointsdo HitDef, multiplicado pelo multiplicador de defesa do alvo. - Em 0 o alvo entra no estado comum 5300 (tontura) com
Dizzyligado e sem controle. Alvos no ar ou caindo não ficam tontos. - Os pontos enchem quando o estado começa;
Dizzydesliga quando o estado termina e o alvo sai do estado de golpe. NoDizzyPointsDamageimpede 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
guardpointsdo HitDef, multiplicado pelo multiplicador de defesa do alvo. - Em 0 o alvo entra no estado comum 5400 (quebra de defesa) com
GuardBreakligado e sem controle. - Os pontos enchem quando o estado começa;
GuardBreakdesliga quando o estado termina e o alvo sai do estado de golpe. NoGuardPointsDamageimpede 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:
| Constante | Padrão | Padrão de super (attr com H) |
|---|---|---|
lifetoredlifemul | 0.75 | 0.75 |
lifetodizzypointsmul | 1.8 | 0 |
lifetoguardpointsmul | 1.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ário | O que cobre |
|---|---|
cpu-bot-best-of-3 | Um jogador roteirizado se aproxima e aperta ataques contra a CPU por pelo menos dois rounds |
watch-cpu-vs-cpu | Sem 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
| Alvo | Comando | Saí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 |
| Web | node scripts/smoke-web.js web/dist <dir> | mesmos arquivos |
| Web mobile | SMOKE_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
| Feature | Checagens |
|---|---|
boot | lutadores e cenários registrados, nada em quarentena, sem erro de importação, título renderiza |
screens | menu, ajustes, controles, importação MUGEN, mercado, replays, ficha e ajuste de personagem renderizam |
select | seleção de lutador (1P e 2P) e de cenário renderizam |
fight_1v1 | luta carrega, intro termina, combate causa dano, KO encerra a partida, tela de resultado aparece |
training | treino carrega e a simulação avança |
team_5v5 | dez lutadores carregam e renderizam |
story | introduçã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)
| Habilidade | Comportamento |
|---|---|
| Atraso de reação | A 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 guarda | Bloqueia baixo ou alto conforme o guardflag do ataque, sem chutar |
| Punição de bloqueio | Golpe 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 rival | Mé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 eventoHitdo 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çãofx(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=fxgera 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 porUi::quad),draw_circle,draw_ellipse,draw_poly,draw_circle_linesedraw_linesão suavizados.draw_triangle,draw_meshe 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).