Hitbox

Hitboxes, referred to as collision boxes in FrayTools, are the main structure for how interactions are executed in the series and Fraymakers. They primarily represent areas in which an attack is active, and when an attack's hitbox collides with an object's damageable area (also known as a hurtbox), the attack hits the object. They are present on all interactive elements of the game, such as characters, items, and stage hazards.
Elements such as characters and attacks often have multiple hitboxes, each of which has a unique index number. Should multiple hitboxes of a single hit connect with an opponent, only the hitbox with the lowest index number will be used. This order of precedence is known as a hitbox stack.
Hitboxes are rectangular in shape and are normally hidden from the player. In Super Smash Flash 2, a function exists to make most character hitboxes visible during gameplay, though this is intended only for developers and otherwise only accessible in a debug menu through hacking. In Fraymakers, hitboxes are visible during Training, where different types of hitboxes can be individually toggled.
== Types of hitboxes in Super Smash Flash 2 ==
There are twenty types of hitboxes used across Super Smash Flash 2, seven of which become visible when activated with developer controls. Additionally, several hitboxes exist within the game's code but are not used in-game.
=== Viewable hitboxes ===
This is a list of the seven hitboxes that can be viewed using developer controls, accompanied by their colors when visible and their functionalities.
Name 	Color 	Description
Hurtbox 	Pink 	A hurtbox, referred to within the game's code as a "hitbox", represents the damageable area in an object, such as characters' bodies and destructible stage areas.
Attackbox 	Red 	An attackbox, commonly and erroneously referred to as a "hitbox", represents the damaging part of an object used to attack a hurtbox. Some attackboxes do not cause knockback and thus are referred to as "windboxes". Interestingly, characters with higher weight, falling speed, or traction resist its effects more than others.
Grabbox 	Purple 	Grabboxes are used when grabbing, representing the area that grabs opponents, ignoring shields. These can be found on normal grabs, as well as command grabs such as 's Inhale and 's Falcon Dive.
Touchbox 	Blue 	A touchbox is a tiny box that sets the center position of grabbed opponents. Examples of moves that heavily alter their touchbox include 's forward throw and 's Instant Transmission.
Handbox 	Cyan 	A handbox represents the area that allows characters to grab ledges when coming into contact with one.
Counterbox 	Green 	Counterboxes are used for counterattacks such as 's and 's Counter, representing the area that initiates the next part of the move upon colliding with an attackbox.
Pickup hitbox	Light green	A pickup hitbox represents the area where a character is able to pick up items when making contact with their catchboxes.
=== Other hitboxes ===
This is a list of the thirteen hitboxes that cannot be viewed using developer controls, accompanied by their functionalities.
Name 	Description
Absorbbox 	Absorbboxes are used in attacks with absorption properties, such as Ness's PSI Magnet and 's Oil Panic, representing the area where projectiles are able to be absorbed.
Big box 	Big boxes are used for verifying if two or more hitboxes collide. This helps reduce slowdown, as if two big boxes do not collide, the game will confirm that no action can happen between them in that frame.
Cambox 	Camboxes are used for moves that affect the game's camera, such as 's Light Arrow and Ness's PK Thunder, representing the area for the camera to follow.
Catchbox 	Catchboxes are used exclusively for items, representing the area they can be picked up from when making contact with a character's pickup hitbox. They are used for both regular items and those produced by other sources, such as Peach's Vegetable and 's .
Custombox 	Customboxes are rarely used in miscellaneous applications, such as to track the positions of 's Vorpal Sword and Flamberge.
Hatbox 	Hatboxes are used for the Copy Ability hats that gains from Inhale, representing where on Kirby they appear.
Homing 	The "homing" hitbox is used for certain moves with homing properties, such as 's Missile, representing the area where hurtboxes are homed in on.
Itembox 	An itembox represents the area where an item appears when held by a character.
pLockbox 	Projectile lockboxes are used in moves such as 's and 's Tailed Beast Rush for syncing the positions of projectiles with the characters using them.
Range 	The "range" hitbox is used for Samus's , representing the area to send Samus into her Morph Ball when making contact with it.
Reversebox 	Reverseboxes are used for attacks that reflect projectiles, such as 's Cape and 's , representing the area where projectiles can be reflected.
Shieldbox 	Shieldboxes are used for characters with unique shields, such as and , representing the area where these shields are active.
ShieldProjectilebox	ShieldProjectileboxes are used for Link's , representing the area where projectiles can be blocked.
== Types of collision boxes in Fraymakers ==
There are eleven types of collision boxes used in Fraymakers or otherwise accessible with custom content through FrayTools. This is a list of the available collision boxes, accompanied by their default colors in FrayTools and their functionalities.
Name 	Color 	Description
None 	Black 	A collision box with the "none" type has no predetermined properties.
Hurt Box 	Yellow	A hurt box represents the damageable area in an object, such as characters' bodies and destructible stage areas.
Hit Box 	Red 	A hit box represents the damaging part of an object used to attack a hurt box.
Grab Box 	Purple	A grab box is used when grabbing, representing the area that grabs opponents, ignoring shields. These can be found on normal grabs, as well as command grabs such as 's up special move and Peppino's grab.
Ledge Grab Box	Gray 	A ledge grab box represents the area that allows characters to grab ledges when coming into contact with one.
Reflect Box 	Green 	A reflect box is used for actions that reflect projectiles, such as 's down special move, representing the area where projectiles can be reflected.
Absorb Box 	White 	An absorb box is used for actions that absorb projectiles, representing the area where projectiles can be absorbed.
Counter Box 	Cyan 	A counter box is used for actions such as counterattacks that react to hit boxes, representing the area that initiates the next part of the move upon colliding with one.
Custom Box A 	White 	Custom boxes are used for user-defined collisions, being particularly useful for scripting behavior that is dependent on a constant relative position to the character.
Custom Box B 	White 	Custom boxes are used for user-defined collisions, being particularly useful for scripting behavior that is dependent on a constant relative position to the character.
Custom Box C 	White 	Custom boxes are used for user-defined collisions, being particularly useful for scripting behavior that is dependent on a constant relative position to the character.
== Disjointed hitbox ==
Disjointed hitboxes are attack hitboxes that are separated from the normal hurtboxes of the character using the attack. These types of hitboxes can hit more safely at a distance without risking the player getting hit. These hitboxes tend to be found on weapons, such as swords.
== Interpolation ==
Interpolation is the action of giving some parts of an attack hitboxes where they would not normally have them. It is often used in areas where hitboxes appeared at an earlier point of the attack, such as in the trails of a sword slash or behind a fast-moving projectile. This is used to ensure that collisions are detected properly in situations where they may otherwise "pass through" an opposing character. This process is generally not applied to characters' hurtboxes.
== Gallery ==
=== Super Smash Flash 2 ===
SSF2 Idle Hitboxes.png| idling while falls. Note the light blue handbox exclusive to Mega Man.
SSF2 Grabbox.png| using her grab. Note the purple grabbox.
SSF2 Handbox.png| using Gum-Gum Snap near a ledge. Note the light blue handbox around his hand.
SSF2 Touchbox.png| using his forward throw on . Note the blue touchbox beneath Wario.
SSF2 Counterbox.png| using . Note the green counterbox around Toad.
Category:Attacks
Category:Game physics
Category:Hitboxes
Category:Smash physics
Category:Terms
Category:Super Smash Flash
Category:Super Smash Flash 2
Category:Super Smash Flash series
Category:Fraymakers