How Hitboxes Work in Video Games: Shapes, Timing, and Game Feel

Illustration of a cat and small figure beside stacked translucent boxes.

Every time a sword swing connects, a bullet lands, or a platforming jump just barely clears a ledge, the game is asking the same silent question, did this shape touch that shape. The answer comes from hitboxes, and understanding how hitboxes work in video games unlocks a layer of design that most players feel but never see. Hitboxes decide what counts as a hit, what counts as a miss, and why some games feel razor sharp while others feel like wrestling a slippery cat in a bathtub.

This guide breaks down hitboxes from first principles, no math degree required. We will cover the difference between hitboxes and hurtboxes, the shapes developers use, how frame data ties everything together, why fighting games and platformers handle them so differently, and examples that show why a hit can feel right—or spectacularly wrong.

Table of Contents

What Is a Hitbox in Video Games

A hitbox is an invisible shape used to determine whether an attack connects. Players also use the term more loosely for collision geometry, including the region where a character can be hit. The visible model is a costume; the game checks its underlying shapes and rules. Contact alone does not necessarily mean damage: teams, invulnerability, blocking, and other conditions can change the result.

Simple shapes make collision tests easier to calculate and easier to tune than checking every detail of a character’s visible mesh. Performance matters, but so does control over how a game feels. A costume’s dangling ribbon need not become another place to take damage, and a beautifully animated sword still needs a clear, consistent reach.

Advertisement

Related collision systems handle doors, pickups, and other triggers. Those regions are usually called trigger volumes, areas, or colliders rather than combat hitboxes. Godot’s physics introduction, for example, distinguishes areas that detect overlaps from bodies involved in physical movement. They share geometric tools, but their gameplay jobs differ.

Hitbox vs Hurtbox, the Critical Distinction

In fighting-game discussions, a useful distinction is hitbox for the attacking region and hurtbox for a region that can receive a hit. A punch connects when its hitbox reaches a valid hurtbox. Terminology varies between games and engines, though, and attacks can also interact with other attacks, shields, or parry systems. Hitbox against hurtbox is the basic damage example, not the only possible interaction.

The shapes can have different sizes and lifespans. A character’s vulnerable regions may change throughout an animation, while an attack may become dangerous only briefly. Three active frames at sixty simulation frames per second last fifty milliseconds. Projectiles and lingering hazards can remain dangerous after the attacker has finished moving.

Why the Two Shapes Rarely Match the Sprite

Watch a fighting-game collision overlay and the colored regions may not trace every pixel of the artwork. Some differences deliberately improve readability, balance, or forgiveness; others can be mistakes. A useful question is whether the animation consistently teaches the player where an attack reaches. An invisible extra meter of sword is not automatically good design just because a developer can draw it.

The Invincibility Trick

Invincibility frames, or i-frames, are periods when an attack cannot damage the character under specified rules. A developer might disable a hurtbox, change collision filtering, or reject damage while an invulnerability state is active. The movement collider can remain present, so a dodge does not let you roll through the floor. Our guide to what defines a soulslike game explores the wider role of dodge timing and stamina.

Hitbox Shapes, From Boxes to Capsules to Meshes

The classic hitbox is, predictably, a box. An axis-aligned bounding box, or AABB, stays aligned with the coordinate axes. Testing two such boxes involves comparing their extents along each axis. A rotated box needs a different test. “Box” describes a useful approximation, not a promise that the collision system follows a character’s silhouette perfectly.

Capsules—cylinders with rounded ends—are another common choice for character collision. Their smooth shape can help avoid snagging on small edges. A game can use one capsule for movement and a different collection of shapes for receiving damage; the shape that keeps you out of a wall need not determine a headshot.

Spheres are useful for rounded regions; overlap can be tested using center distance and the sum of the radii. Other options include convex shapes, simplified meshes, and several primitives combined into one object. Unity’s collider overview describes these choices. Attaching a primitive to an animated bone lets it follow a limb without making it an animated mesh collider.

Multi Hitbox Bodies

A character can have separate head, torso, and limb regions, each associated with different damage rules. Multipliers can depend on the weapon, armor, range, and game; there is no universal “head equals four chest shots” formula. Likewise, a deflection or unblockable attack may depend on combat-state rules, rather than simply detecting which body part touched a sword.

How Frame Data and Hitboxes Work Together

Hitboxes do not just have shape, they have time. Many fighting-game moves are described through startup, active frames, and recovery: preparation, the attacking window, and the return toward being able to act normally. Frame data helps explain when an opening appears. Cancel rules, invulnerability, multiple hits, and projectiles can complicate that simple three-part picture.

Imagine an attack with a short wind-up, three dangerous frames, and a longer recovery. If it misses, the opponent may have time to punish the recovery—provided they can reach you quickly enough. This is an illustrative move, not a particular character’s frame table. Geometry still matters outside active frames because the attacker’s vulnerable regions can move or extend during preparation and recovery. A parry adds its own timing and eligibility rules.

Advertisement

Speedrunners also study collision boundaries and timing windows, sometimes finding routes the designers did not anticipate. Our breakdown of speedrunning categories and glitches explains how communities decide which techniques belong in which runs.

Hitboxes by Genre, Why Fighters and Shooters Disagree

Different genres treat hitboxes with completely different priorities, and once you see the pattern you cannot unsee it. The same underlying technology bends to fit whatever the game is trying to be.

Fighting Games, Surgical Precision

Competitive fighters reward learning reach, timing, and vulnerable poses. A training mode may display frame information without displaying collision shapes. Exact hitbox overlays depend on the title and sometimes require community tools rather than a built-in option. Knowing that distinction saves a surprisingly long search through the settings menu.

First Person Shooters, Network Tradeoffs

Online shooters add latency and the need to reconcile different views of the action. Some systems validate a shot against historical player positions rather than only the target’s position when the message arrives. That helps the shooter but can produce a defender’s frustrating “I was already behind cover” experience. It is a tradeoff in timing and authority, not evidence that every suspicious miss is a network problem. Geometry and implementation bugs can matter too.

Platformers, Forgiveness as a Feature

Platformers can favor the player through several different mechanisms. In Celeste’s developer explanation, coyote time permits a jump briefly after leaving a ledge, and jump buffering remembers an input shortly before landing. Those are timing allowances, not smaller hitboxes. Corner correction is another tool. The combined result can feel generous even when the jumps are difficult.

Bullet Hell, Tiny Hitboxes by Design

Bullet-hell games often make the vulnerable region much smaller than the player’s artwork. Bullets can then pass close to the visible body without connecting, creating narrow but navigable paths through dense patterns. The precise dimensions depend on the game and character; “one or two pixels” is not a rule for an entire genre. Learning the actual vulnerable region is part of learning to read the pattern.

Examples That Make the Geometry Visible

A few examples make these otherwise invisible systems easier to understand without needing to memorize a developer’s collision library.

A sword attack with no vulnerable region along the blade is often described as disjointed. You may be able to strike the wielder’s body while being unable to damage them simply by hitting the sword. That helps explain why reach and vulnerability need separate diagrams.

Marth’s sword provides a clear example of rewarding spacing. The official Smash Bros. DOJO guide explains that attacks are stronger at the tip. Positioning changes the reward even when the same swing connects. A weapon does not have to produce one identical result everywhere along its reach.

Celeste supplies the complementary lesson: apparent generosity may come from input timing or position correction instead of attack geometry. Two games can make the same near-miss feel kinder through completely different systems. A slow-motion clip shows the outcome, but not necessarily which rule produced it.

Riot’s 2020 explanation of VALORANT hit registration separates an incorrect shot result from misleading visual feedback. Its examples include delayed effects and a moving target making a body impact look like a headshot. The article also describes rewinding player positions and animation poses when evaluating a shot. Reading a tracer frame alone can therefore misidentify what the server checked.

For players, a productive investigation starts with the conditions: game version, online or offline play, animation state, and whether the result repeats. “The hitbox is broken” is a reasonable first complaint after being flattened by a boss, but it is a broad description of several possible problems. The cat on your keyboard is a separate subsystem.

Design Tradeoffs Developers Wrestle With

Building hitboxes is one of the least glamorous and most consequential parts of game development. Every design choice has a cost on another axis.

Advertisement

A smaller vulnerable region can make dodging more forgiving while making that same character harder for an opponent to hit. A larger attacking region does something different again. There is no single slider from realistic and difficult to generous and easy, and generosity does not automatically reduce a game’s skill ceiling. The relevant question is which player action the design rewards.

More regions can support distinct reactions and locational damage, but also add authoring, collision-processing, and testing work. Simpler enemies may be a deliberate fit for the game rather than evidence of an inadequate budget. Useful detail is the detail the player can understand and act on.

Procedurally generated worlds add another wrinkle, every level layout has to interact correctly with character hitboxes the designer has never personally seen. Our deep dive on how procedural generation works in games explores why algorithmic levels and predictable hitbox behavior are such a tricky combination. Genre hybrids like metroidvanias face similar issues because the same hitboxes have to feel right in tight platforming corridors and wide open combat arenas.

Frequently Asked Questions

Are hitboxes the same as collision boxes

A hitbox is one use of collision geometry, usually discussed in relation to attacks. Movement colliders and trigger areas serve other purposes. Engines can use layers or masks to decide which objects interact, while game logic decides what a detected interaction means.

Why does my shot look like it hit but the game says it missed

The visible model may differ from the vulnerable region; a projectile may miss between sampled positions unless the game checks its path; or the server and client may be evaluating different moments. Weapon spread, invulnerability, misleading effects, and bugs are other possibilities. A screenshot alone rarely identifies the cause.

Can I see the hitboxes in my favorite game

Sometimes. Check the specific game’s training options, documentation, or permitted development tools. Frame-data displays are not necessarily hitbox viewers. Community mods can expose more detail, but compatibility and online-play rules vary; use an appropriate offline testing setup.

Why do some games have invisible hitboxes I cannot see

Trigger volumes often have no visible surface because their job is to detect entry into a region—for a cutscene, pickup, checkpoint, or other event. They use collision detection, but developers do not universally call them hitboxes. Invisible does not mean unintended.

Do hitboxes work the same in 2D and 3D games

Both use geometry to test interactions, with different shape choices and calculations in two or three dimensions. A hitscan shot can test a ray against a target rather than move a bullet-shaped object through the world. Godot’s ray-casting guide illustrates that distinction. Sweeping a shape along its path is another way to detect contacts that a single overlap test could miss.

The Shape of How Games Feel

Hitboxes are the invisible skeleton holding every action game together. They decide whether a parry feels heroic or unfair, whether a platformer feels tight or floaty, whether a shooter rewards aim or punishes lag. The next time a hit lands in a way that surprises you, good or bad, remember that geometry, timing, and game rules combined to decide the result. Game design is mostly geometry pretending to be drama, and hitboxes are the geometry.

Advertisement
Share this story

Leave a Reply

Your email address will not be published. Required fields are marked *