Skip to content
Techniques & Technology

Hitboxes

Collision boundaries

Hitboxes define the invisible collision boundaries around game objects, determining when attacks connect, pickups are collected, and characters collide with the world.

C64zx-spectrumAmigaNESsega-mega-drivearcade collisiongameplayprogramming 1978–1999

Overview

What you see isn’t always what the game detects. Hitboxes are the simplified collision boundaries that determine interactions between game objects. A character sprite might be 32 pixels tall, but their vulnerable hitbox could be a small rectangle at chest height—making the game feel fair despite the simplification.

Fast facts

  • Purpose: Collision detection boundaries.
  • Shape: Usually rectangles (boxes).
  • Visibility: Hidden from players.
  • Design goal: Feel fair and responsive.

Hitbox types

TypePurposeExample
HurtboxVulnerable to damageCharacter body
Attack boxDeals damageSword swing
Collision boxWorld interactionPlatform landing
Trigger boxEvent activationDoor entry

Design considerations

FactorApproach
FairnessPlayer hitbox smaller than sprite
ResponsivenessAttack boxes match animation
ForgivenessGenerous pickup collection
PrecisionTight for skill-based games

Platform approaches

PlatformCommon method
NESBounding box comparison
Mega DriveHardware sprite collision
ArcadeMultiple boxes per character
Fighting gamesFrame-specific boxes

Fighting game precision

ElementImplementation
Per-frame boxesDifferent shapes each animation frame
Active framesAttack only hits during specific frames
RecoveryVulnerable boxes during cooldown
InvincibilityNo hurtbox during certain moves

Common optimisations

TechniqueBenefit
Axis-aligned boxesSimple overlap maths
Spatial partitioningReduce comparison count
Hierarchical checksBroad then narrow

See also