Animation System
Overview
The animation system in IKEMEN Go / MUGEN connects sprites to gameplay through .air (Animation) files. Each animation is an "Action" consisting of frames that display sprites with timing, position offsets, and collision boxes.
.air File Format
Action Header
ini
[Begin Action 0] ; Action number (matches anim= in Statedef or ChangeAnim)
Frame Format
Each line after the header defines one frame:
code
Group, Image, OffsetX, OffsetY, DisplayTime[, Flip][, Color]
- •Group: Sprite group number in .sff (e.g., 0 for idle sprites)
- •Image: Sprite image index within group (e.g., 0, 1, 2...)
- •OffsetX: Horizontal offset from character axis (positive = forward)
- •OffsetY: Vertical offset from character axis (negative = up from ground)
- •DisplayTime: Ticks to display this frame
- •Positive: display for N ticks
- •
-1: Hold indefinitely (last frame of non-looping animation) - •
0: Display for 0 ticks (skip frame, used for collision-only frames)
- •Flip: Optional.
H= horizontal flip,V= vertical flip,VH= both - •Color: Optional. Blend mode:
A= add,A1= add1,S= subtract,AS???D???= custom alpha
Special Directives
Loopstart: Marks where looping animations restart from
ini
[Begin Action 0] ; Idle - loops forever 0,0, 0,0, 7 0,1, 0,0, 7 Loopstart ; Loop restarts from next frame 0,2, 0,0, 7 0,3, 0,0, 7 0,4, 0,0, 7
Interpolation (IKEMEN Go only):
ini
[Begin Action 100] Interpolate Offset ; Smooth position transitions between frames Interpolate Angle ; Smooth angle transitions Interpolate Scale ; Smooth scale transitions Interpolate Blend ; Smooth blend transitions 100,0, 0,0, 5 100,1, 10,0, 5 ; Position smoothly interpolates from (0,0) to (10,0)
Collision Boxes (Clsn)
Collision boxes define where a character can be hit and where attacks connect.
Clsn Types
- •Clsn1: Attack box (hitbox) -- where your attack hits
- •Clsn2: Vulnerable box (hurtbox) -- where you can be hit
Clsn Syntax
ini
; Per-frame collision boxes Clsn1: 1 ; 1 attack box for next frame only Clsn1[0] = x1, y1, x2, y2 ; Left, Top, Right, Bottom Clsn2: 2 ; 2 hurt boxes for next frame only Clsn2[0] = -15, -90, 15, 0 ; Body hurtbox Clsn2[1] = -10, -100, 10, -90 ; Head hurtbox
Clsn Defaults (apply to all subsequent frames until overridden)
ini
Clsn2Default: 2 ; Default hurtboxes for ALL frames in this action Clsn2[0] = -15, -80, 15, 0 Clsn2[1] = -10, -95, 10, -80
Coordinate System for Boxes
- •Origin (0,0) = character's axis point (feet center)
- •X: negative = behind character, positive = in front
- •Y: negative = above ground, positive = below ground (rarely used)
- •Box: x1,y1 = top-left corner, x2,y2 = bottom-right corner
- •Example:
-15, -90, 15, 0= box from 15 pixels behind to 15 front, ground to 90 up
Standard Sprite Groups
| Group | Purpose | Example Images |
|---|---|---|
| 0 | Idle/Stand | 0,0 through 0,5 (6 frames) |
| 5 | Turn around | 5,0 through 5,2 |
| 6 | Crouch transition | 6,0 through 6,2 |
| 10 | Standing hit | 10,0 through 10,3 |
| 11 | Crouch start | 11,0 through 11,2 |
| 20 | Walk | 20,0 through 20,7 (8 frames) |
| 40 | Jump startup | 40,0 through 40,2 |
| 41-44 | Jump rise | Various angles |
| 45-49 | Jump fall | Various angles |
| 50 | Landing | 50,0 through 50,1 |
| 100 | Run forward | 100,0 through 100,5 |
| 105 | Hop back | 105,0 through 105,3 |
| 110 | Taunt | 110,0 through 110,9 |
| 120 | Guard stand | 120,0 through 120,1 |
| 130 | Guard crouch | 130,0 through 130,1 |
| 140 | Guard hit | 140,0 through 140,1 |
| 150 | Guard crouch hit | 150,0 through 150,1 |
| 200 | Light punch | 200,0 through 200,5 |
| 210 | Medium punch | 210,0 through 210,5 |
| 220 | Heavy punch | 220,0 through 220,7 |
| 230 | Light kick | 230,0 through 230,5 |
| 240 | Medium kick | 240,0 through 240,5 |
| 250 | Heavy kick | 250,0 through 250,7 |
| 400 | Crouch light punch | 400,0 through 400,4 |
| 410 | Crouch medium punch | 410,0 through 410,5 |
| 420 | Crouch heavy punch | 420,0 through 420,6 |
| 430 | Crouch light kick | 430,0 through 430,4 |
| 440 | Crouch medium kick | 440,0 through 440,5 |
| 450 | Crouch heavy kick | 450,0 through 450,7 |
| 600 | Jump light punch | 600,0 through 600,3 |
| 610 | Jump medium punch | 610,0 through 610,4 |
| 620 | Jump heavy punch | 620,0 through 620,5 |
| 630 | Jump light kick | 630,0 through 630,3 |
| 640 | Jump medium kick | 640,0 through 640,4 |
| 650 | Jump heavy kick | 650,0 through 650,5 |
| 700 | Throw attempt | 700,0 through 700,3 |
| 710 | Throw hold | 710,0 through 710,4 |
| 800 | Get hit light | 800,0 through 800,2 |
| 810 | Get hit medium | 810,0 through 810,3 |
| 820 | Get hit hard | 820,0 through 820,4 |
| 830 | Crouch hit | 830,0 through 830,2 |
| 840 | Air hit | 840,0 through 840,4 |
| 850 | Fall | 850,0 through 850,3 |
| 860 | Lie down | 860,0 through 860,1 |
| 870 | Get up | 870,0 through 870,5 |
| 900 | KO fall | 900,0 through 900,5 |
| 1000+ | Special move 1 | Custom |
| 1100+ | Special move 2 | Custom |
| 3000+ | Super move 1 | Custom |
| 5000 | Hit spark | 5000,0 through 5000,4 |
| 5010 | Guard spark | 5010,0 through 5010,3 |
| 9000 | Portrait (select screen) | 9000,0 |
| 9001 | Portrait (versus screen) | 9001,0 |
Animation Timing Guide
For a 60fps engine:
- •1 tick = 1/60th of a second (approx 16.67ms)
- •7 ticks (approx 0.117s) = common idle frame time
- •3 ticks = startup frame (fast attack)
- •4-5 ticks = active frame
- •6-8 ticks = recovery frame
Frame Data Convention
- •Startup: Frames before the hitbox appears
- •Active: Frames where the hitbox exists (Clsn1 present)
- •Recovery: Frames after hitbox disappears until control returns
- •Example: Light punch = 3 startup + 3 active + 6 recovery = 12 frames total
Tips
- •Always set Clsn2Default for hurtboxes that stay consistent
- •Only add Clsn1 (hitbox) on active attack frames
- •Use Loopstart for idle, walk, and run animations
- •Use -1 display time for the last frame of attack animations (held until state changes)
- •Keep sprite offsets at 0,0 unless the character needs to shift position during animation
- •Match animation action numbers to statedef numbers (Action 200 = State 200) for clarity
- •IKEMEN Go interpolation directives can smooth movement without extra sprites
- •Test collision boxes in debug mode (Ctrl+C in IKEMEN Go) to visualize them in-game