๐ŸฅŠ Episode 7 ยท Advanced ยท Hitboxes

Land the Hit
Episode 7: Hitboxes

A move only counts when one fighter hitbox touches another. This episode explains Clsn1 and Clsn2, and why a move that looks right can still miss.

๐Ÿ‘ถ Ages 10+ โฑ๏ธ ~50 mins ๐ŸฅŠ MUGEN โœ“ Free workshop
๐Ÿ”ด Clsn1 attack ๐Ÿ”ต Clsn2 hurt ๐Ÿ“ฆ Boxes ๐Ÿงช Test a hit
โญ
0 XP
Level 1
๐Ÿ”ฅ0
Your Progress 0 / 4 steps
Build it in our MUGEN Studio too: set up a fighter, add sprites and poses, place hitboxes and export a real fighter folder in the browser, with no install. Open the MUGEN Mod Studio →
๐Ÿ”ฅ
Ember says: the engine does not care what a move looks like. It cares where the invisible boxes are. Draw the boxes well and the game feels fair.
1
๐Ÿ”ด
The Attack Box (Clsn1)
Where you can hit
Active
๐ŸŽฏ
Goal for this step

Understand Clsn1.

  • 1Clsn1 is the attack box, usually drawn red in debug mode.
  • 2It only exists on the frames where the move can hit.
  • 3No Clsn1, no hit, no matter how good the animation looks.
โœ๏ธ
Fill in the Blanks
+15 XP
The attack box is called .
๐Ÿง 
Knowledge Check
+15 XP
What happens with no Clsn1 on a frame?
AThe move cannot hit on that frame
BThe game crashes
CThe move does double damage
2
๐Ÿ”ต
The Hurt Box (Clsn2)
Where you can be hit
Locked
๐ŸŽฏ
Goal for this step

Understand Clsn2.

  • 1Clsn2 is the hurt box, usually blue: where the fighter can be hit.
  • 2It is on nearly every frame, including idle.
  • 3A hit happens when one fighter Clsn1 overlaps the other fighter Clsn2.
โœ๏ธ
Fill in the Blanks
+15 XP
The hurt box is called .
๐Ÿง 
Knowledge Check
+15 XP
A hit happens when which two boxes overlap?
AAttacker Clsn1 and defender Clsn2
BTwo Clsn2 boxes
CTwo Clsn1 boxes
3
๐Ÿ“ฆ
Drawing the Boxes
Rectangles in the .air
Locked
๐ŸŽฏ
Goal for this step

Know where hitboxes are written.

  • 1Boxes are written in the .air file, near each animation.
  • 2Each box is a rectangle: left, top, right, bottom.
  • 3Clsn2Default sets the hurt box for every frame, so you do not repeat it.
[Begin Action 200]
Clsn2Default: 1
 Clsn2[0] = -20,-90, 20,-1
Clsn1: 1
 Clsn1[0] = 20,-70, 55,-40
200,0, 0,0, 4
โœ๏ธ
Fill in the Blanks
+15 XP
Hitboxes are written in the file.
๐Ÿง 
Knowledge Check
+15 XP
Where are hitboxes written?
AIn the .air animation file
BIn the .snd
CIn select.def
4
๐Ÿงช
Test and Tune
See the boxes
Locked
๐ŸŽฏ
Goal for this step

Turn on debug boxes and fix a move that misses.

  • 1Turn on the debug display to see the boxes while you play.
  • 2If a punch looks like it hits but does not, the Clsn1 is too short.
  • 3If moves hit from too far, the Clsn1 is too long. Tune it until it feels fair.
โœ๏ธ
Fill in the Blanks
+15 XP
If a punch looks right but misses, the is probably too short.
๐Ÿง 
Knowledge Check
+15 XP
A move hits from too far away. What do you change?
AShorten the Clsn1 box
BDelete the animation
CAdd more damage
๐ŸŽ‰โœจ๐Ÿ†๐ŸŽ‰
Hits That Feel Fair!
You understand hitboxes and how to tune them. Next you give your fighter a proper stage.
0
Total XP
1
Level
0
Best Streak
0%
Accuracy
Next: Episode 8: Make a Stage โ†’