Quick definition:The process by which a game works out when two objects, such as a character and a wall or a bullet and an enemy, are touching or overlapping.
Meaning
Collision detection is the system that lets a game world feel solid. Without it, characters would walk through walls, bullets would pass through enemies and cars would drive through buildings. The game constantly compares the positions and shapes of objects and reports whenever two of them intersect, so that other systems can respond.
Detection is only the first step. Collision response decides what happens next, such as stopping movement, bouncing an object away, dealing damage or triggering a pickup. Developers often use simple shapes such as boxes, circles and spheres, called hitboxes or bounding volumes, because they are quick to check and good enough for most purposes.
Problems appear when objects move very fast. A bullet may travel far enough in a single frame to skip past a thin target without ever overlapping it, a flaw often called tunnelling. Developers use extra techniques, such as tracing a line along the bullet's path, to prevent it.
Origin:The phrase comes from computer graphics and physics simulation, where finding intersections between shapes is a standard problem. Games needed it from the earliest days, since even a simple bat-and-ball game must decide whether the ball has hit the bat. As games moved into three dimensions, the methods became far more elaborate and demanding on processors.
Example:A player jumps towards a floating platform in a side-scrolling game. The engine checks, many times each second, whether the character's feet overlap the platform's top edge. When they do, the character stops falling and lands. If the check were wrong, the character would drop straight through the platform, and the player would lose a life.
Did you know?Exact collision checks are costly, so games usually test simplified invisible shapes instead of the detailed models seen on screen. This is why a hit sometimes feels unfair, with a shot passing through a shoulder or a fist stopping short of a visible target.