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