Testing & Debug
Overview
Testing and debugging IKEMEN Go content requires understanding common error patterns, using the engine's built-in debug tools, and systematic validation of character/stage files. This skill covers everything from basic file validation to crash log analysis.
Debug Mode
Enabling Debug
In mugen.cfg:
[Debug] Debug = 1 ; Enable debug mode AllowDebugMode = 1 ; Allow debug key shortcuts ClsnDraw = 0 ; Draw collision boxes (0=off by default)
In-Game Debug Keys
- •
Ctrl+D-- Toggle debug display (state info, position, velocity) - •
Ctrl+C-- Toggle collision box display (Clsn1=red, Clsn2=blue) - •
Ctrl+S-- Toggle slow-motion (frame advance) - •
Space(in slow-mo) -- Advance one frame - •
Ctrl+1-- Player 1 full life/power - •
Ctrl+2-- Player 2 full life/power - •
Ctrl+F-- Toggle FPS display - •
F1-- Player 2 KO (end round) - •
F2-- Both players KO - •
F3-- Toggle AI for Player 1 - •
F4-- Reset round - •
F5-- Time over - •
Shift+F1-F5-- Variant versions of above - •
Ctrl+Shift+D-- Advanced debug display
Debug Display Info
When debug mode is active (Ctrl+D), the screen shows:
- •Current state number (StateNo)
- •State type (S/C/A/L)
- •Move type (A/I/H)
- •Animation action number (Anim)
- •Time in current state
- •Position (X, Y)
- •Velocity (X, Y)
- •Control flag (Ctrl)
- •Hit pause time
- •Player life and power
Collision Box Display
When collision boxes are visible (Ctrl+C):
- •Red boxes = Clsn1 (Attack hitboxes)
- •Blue boxes = Clsn2 (Vulnerable hurtboxes)
- •Green boxes = Push boxes (Size parameters from .cns)
- •Boxes update every frame showing active collision areas
Common Errors & Solutions
Character Won't Load
Error: Character file not found
Causes:
- •Wrong path in select.def
- •Missing .def file
- •Typo in filename (case-sensitive on Linux) Fix: Verify path in select.def matches actual file location
Missing Animation
Error: Action X not found for character Y
Causes:
- •State references animation that doesn't exist in .air file
- •
anim = Nin Statedef but[Begin Action N]not in .air Fix: Add the missing animation action to the .air file
Invalid State Controller
Error: Unknown state controller type 'XXX' in state N
Causes:
- •Typo in controller type name
- •Using IKEMEN Go-only controller in MUGEN Fix: Check controller name spelling against reference
State Loop / Infinite Loop
Warning: State loop detected in state N
Causes:
- •ChangeState back to same state without advancing time
- •Missing time progression in state
- •Trigger that always evaluates true causing repeated state change Fix: Ensure states either advance time or have proper exit conditions
Sprite Not Displaying
Symptoms: Character appears invisible or shows wrong sprite Causes:
- •Wrong group/image numbers in .air file
- •Sprite not in .sff file
- •Axis point way off-screen Fix: Verify sprite group/image numbers match between .air and .sff
Character Falls Through Floor
Causes:
- •Physics set wrong in Statedef (
physics = Ninstead ofphysics = S) - •Position set below ground (posY > 0)
- •Missing gravity/physics in air state Fix: Check Statedef physics parameter and PosSet values
Attacks Don't Hit
Causes:
- •No Clsn1 (hitbox) on active frames in .air
- •HitDef trigger never fires (wrong trigger condition)
- •
attrorhitflagmismatch - •HitDef fires before hitbox appears Fix:
- •Check .air file has Clsn1 boxes on active frames
- •Verify HitDef trigger timing matches animation active frames
- •Verify
hitflagincludes opponent's state type
Sound Not Playing
Causes:
- •Wrong group/index in PlaySnd controller
- •.snd file not referenced in .def
- •Sound file format not supported Fix: Verify sound file exists in .snd and controller references match
Stage Doesn't Load
Causes:
- •Wrong path in select.def
- •Missing .sff file referenced in stage .def
- •Invalid BGdef sprite path Fix: Check all file paths in stage .def are correct
File Validation Checklist
Character .def Validation
- • [Info] section has name and displayname
- • [Files] section references all required files
- • All referenced files exist at specified paths
- • File extensions are correct (.cns, .cmd, .air, .sff)
- • stcommon points to valid common1.cns
Character .cns Validation
- • [Data] section has life, attack, defence
- • [Size] section has ground.back, ground.front, height
- • [Velocity] section has walk.fwd, walk.back, jump.neu
- • [Movement] section has yaccel
- • All Statedefs have valid type (S/C/A/L/U)
- • All Statedefs have valid movetype (A/I/H)
- • All Statedefs have valid physics (S/C/A/N)
- • All state controllers have
type =parameter - • All triggers use valid trigger syntax
- • No circular ChangeState references without time advancement
Character .cmd Validation
- • [Remap] section exists
- • [Defaults] section exists with command.time and command.buffer.time
- • All [Command] blocks have name and command
- • Command inputs use valid notation
- • [Statedef -1] exists
- • Commands ordered complex-to-simple in Statedef -1
- • All referenced command names match defined commands
Character .air Validation
- • [Begin Action 0] exists (idle)
- • All state-referenced actions exist
- • Frame format is valid (Group, Image, X, Y, Time)
- • Clsn syntax is correct
- • Attack animations have Clsn1 on active frames
- • All animations have Clsn2 (hurtboxes)
- • Loopstart used correctly in looping animations
Stage .def Validation
- • [Info] section has name
- • [Camera] has bounds defined
- • [PlayerInfo] has start positions
- • [StageInfo] has zoffset and localcoord
- • [BGdef] references valid .sff file
- • All [BG] elements have type and spriteno
- • Delta values are reasonable (0 to 1.5)
- • At least one BG element exists
Crash Log Analysis
IKEMEN Go produces error output in the console. Common patterns:
Parse Errors
Error parsing chars/fighter/fighter.cns at line 45: unexpected token
Action: Go to the specified line and check syntax
Runtime Errors
Error in state 200 of character 'Fighter': division by zero
Action: Check triggers/expressions in state 200 for division operations
Missing File Errors
Error: Could not open file 'chars/fighter/fighter.sff'
Action: Verify file exists at the specified path
Lua Errors
external/mods/story.lua:23: attempt to index a nil value
Action: Check line 23 of the Lua script for nil references
Systematic Testing Procedure
1. File Structure Test
Verify all files exist and are properly referenced.
2. Static Validation
Parse each file and check syntax without running the engine.
3. Load Test
Launch IKEMEN Go and verify character/stage loads without errors.
4. Visual Test
- •Check idle animation plays correctly
- •Verify sprite alignment (not floating or sinking)
- •Check collision boxes look reasonable (Ctrl+C)
5. Gameplay Test
- •Walk forward and back
- •Jump (neutral, forward, back)
- •Crouch
- •All normal attacks (6 standing, 6 crouching, 6 jumping)
- •All special moves
- •All super moves
- •Guard (standing and crouching)
- •Get hit (all reactions)
- •KO and round restart
- •Throw and throw tech
6. Edge Case Test
- •Corner behavior
- •Air-to-air interactions
- •Projectile clashes
- •Round timer expiry
- •Perfect KO
- •Double KO
7. Performance Test
- •Stable 60fps during gameplay
- •No memory leaks in long matches
- •Stage scrolling is smooth