Stage Design
Overview
Stages in IKEMEN Go / MUGEN define the visual environment where fights take place. A stage consists of a .def file (configuration) and a .sff file (sprite graphics), optionally with music and additional effects.
Stage File Structure
stages/
└── mystage/
├── mystage.def ; Stage definition
└── mystage.sff ; Stage sprites (background layers)
Stage .def Sections
[Info]
[Info] name = "Temple of Storms" ; Internal name displayname = "Temple of Storms" ; Display name versiondate = 01,01,2026 mugenversion = 1.1 author = "AuthorName"
[Camera]
Controls camera behavior during the fight:
[Camera] startx = 0 ; Camera starting X position starty = 0 ; Camera starting Y position boundleft = -150 ; Left camera boundary (pixels from center) boundright = 150 ; Right camera boundary boundhigh = -25 ; Upper camera boundary boundlow = 0 ; Lower camera boundary tension = 50 ; Pixels from screen edge before camera scrolls tensionhigh = 0 ; Top edge tension tensionlow = 0 ; Bottom edge tension verticalfollow = .2 ; How much camera follows vertical movement (0-1) floortension = 0 ; Floor tracking tension overdrawhigh = 0 ; Extra draw above boundhigh overdrawlow = 0 ; Extra draw below boundlow cuthigh = 0 ; Cut top of screen cutlow = 0 ; Cut bottom of screen startzoom = 1 ; Starting zoom level (IKEMEN Go) zoomout = 1 ; Min zoom out (IKEMEN Go) zoomin = 1.2 ; Max zoom in (IKEMEN Go)
[PlayerInfo]
Starting positions for players:
[PlayerInfo] p1startx = -70 ; Player 1 start X (left of center) p1starty = 0 ; Player 1 start Y p1facing = 1 ; Player 1 facing (1=right) p2startx = 70 ; Player 2 start X (right of center) p2starty = 0 ; Player 2 start Y p2facing = -1 ; Player 2 facing (-1=left) leftbound = -1000 ; Left movement boundary rightbound = 1000 ; Right movement boundary topbound = 0 ; Top movement boundary (IKEMEN Go) botbound = 0 ; Bottom boundary
[Scaling]
[Scaling] topscale = 1 ; Scale at top of screen botscale = 1.2 ; Scale at bottom (creates depth)
[Bound]
[Bound] screenleft = 15 ; Minimum pixels from left screen edge screenright = 15 ; Minimum pixels from right screen edge
[StageInfo]
[StageInfo] zoffset = 200 ; Ground level Y position (in stage coordinates) zoffsetlink = -1 ; Link to another BG element's zoffset (-1=none) autoturn = 1 ; Characters auto-face each other resetBG = 1 ; Reset background animations between rounds localcoord = 320, 240 ; Stage coordinate system (320x240 = SD, 1280x720 = HD) xscale = 1 ; Horizontal scale factor yscale = 1 ; Vertical scale factor
[Shadow]
[Shadow] intensity = 128 ; Shadow darkness (0=invisible, 256=black) color = 0,0,0 ; Shadow color (R,G,B) yscale = 0.4 ; Shadow Y scale (vertical squash) fade.range = -400,-100 ; Y range where shadow fades out (for jumping) reflect = 0 ; Enable reflection (0/1)
[Reflection]
[Reflection] intensity = 0 ; Reflection visibility (0=off, 256=full)
[Music]
[Music] bgmusic = sound/temple_theme.mp3 ; Background music path bgmvolume = 100 ; Volume (0-100) bgmloopstart = 0 ; Loop start point (samples) bgmloopend = 0 ; Loop end point (0=entire track)
[BGdef] -- Background Definition
[BGdef] spr = stages/mystage/mystage.sff ; Sprite file path debugbg = 0 ; Show debug background (1=magenta fill)
[BG] Elements -- The Core of Stage Design
Each background element is a separate [BG name] section:
[BG Sky] type = normal ; Element type: normal, anim, parallax spriteno = 0, 0 ; Group, Image in SFF start = 0, 0 ; Starting position (X, Y in stage coords) delta = 0, 0 ; Scroll rate relative to camera (0=fixed, 1=moves with camera) trans = none ; Transparency: none, add, add1, sub, addalpha mask = 0 ; Use sprite transparency (0=no, 1=yes) tile = 1, 0 ; Tiling (X, Y): 0=no tile, 1=infinite, N=tile N times tilespacing = 0, 0 ; Extra pixels between tiles window = 0,0, 319,239 ; Visible window (clip region) windowdelta = 0, 0 ; Window scroll delta velocity = 0, 0 ; Automatic scrolling speed id = 0 ; Element ID (for linking) positionlink = 0 ; Link position to element with this ID layerno = 0 ; Layer: 0=behind characters, 1=in front
Parallax Scrolling
The delta parameter controls the parallax effect:
- •
delta = 0, 0-- Background does not move (sky, distant mountains) - •
delta = .25, 0-- Moves at 25% camera speed (distant hills) - •
delta = .5, 0-- Moves at 50% camera speed (mid-ground) - •
delta = .75, 0-- Moves at 75% camera speed (near background) - •
delta = 1, 1-- Moves with camera exactly (ground plane) - •
delta = 1.2, 1-- Moves faster than camera (foreground elements)
Parallax Type
For true perspective parallax on a single element:
[BG Floor] type = parallax ; Special parallax type spriteno = 3, 0 start = 0, 185 delta = 1, 1 xscale = 1, 1.5 ; Scale from top to bottom of element yscalestart = 100 ; Y scale at top (percentage) yscaledelta = 1.2 ; Y scale increase per line
Animated Stage Elements
[BG Torch] type = anim ; Animated background element actionno = 10 ; Animation action number (defined in stage .air or SFF) start = -80, 120 delta = .8, 1 tile = 0, 0 mask = 1 ; Transparent backgrounds on sprites
Stage animations are defined in the stage .sff with action numbers, using the same .air format as character animations.
Layer System
- •
layerno = 0-- Behind characters (default). Most BG elements go here. - •
layerno = 1-- In front of characters. Foreground elements (rain, fog, pillars in front).
Building a Stage Step by Step
- •Plan layers: Sky (far) -> Mountains -> Trees -> Ground -> Foreground
- •Create sprites: One sprite per layer, proper dimensions
- •Set deltas: 0 for sky, increasing toward 1 for ground
- •Configure camera: Set bounds based on stage width
- •Add details: Animated elements, foreground overlay
- •Set music: Background track with proper looping
- •Configure players: Start positions, facing, bounds
- •Test: Check parallax, bounds, and visual alignment
Resolution and Coordinates
- •
localcoord = 320, 240-- SD stage (classic MUGEN) - •
localcoord = 640, 480-- Medium resolution - •
localcoord = 1280, 720-- HD stage (recommended for new projects)
The zoffset determines where the ground is. Characters stand at zoffset Y position. All BG element positions are relative to the stage coordinate system.
Coordinate Math
Camera Position Calculation
The camera tracks the midpoint between both players. When the midpoint moves, the camera follows subject to tension and bounds.
camera_x = clamp(midpoint_x, boundleft, boundright) camera_y = clamp(midpoint_y * verticalfollow, boundhigh, boundlow)
BG Element Screen Position
Each BG element's on-screen position is calculated from its start position and delta relative to camera movement:
screen_x = start_x - (camera_x * delta_x) screen_y = start_y - (camera_y * delta_y)
This is why delta = 0 makes an element stationary (camera movement has no effect) and delta = 1 makes it scroll 1:1 with the camera (staying fixed relative to the ground).
Stage Width Planning
The total visible stage width depends on boundleft, boundright, and the screen resolution:
total_stage_width = screen_width + boundright - boundleft
For a 320x240 stage with boundleft=-150, boundright=150:
total_width = 320 + 150 - (-150) = 620 pixels
Background sprites at delta = 1 should be at least this wide to avoid gaps. Sprites at lower deltas can be narrower since they scroll less, but using tile = 1, 0 is recommended for safety.
Quick Reference: Common Stage Configurations
Small Arena (close combat focus)
boundleft = -80 boundright = 80 tension = 40 p1startx = -50 p2startx = 50
Standard Arena
boundleft = -150 boundright = 150 tension = 50 p1startx = -70 p2startx = 70
Wide Arena (zoning / projectile focus)
boundleft = -300 boundright = 300 tension = 60 p1startx = -100 p2startx = 100
Vertical Arena (air combat focus)
boundhigh = -200 boundlow = 0 verticalfollow = .8 tensionhigh = 20