Collision detection in 2D games


  • Péter Mileff



Collision detection, AABB, Separating Axis Theorem


Collision detection is a fundamental aspect of game development, as it enables game objects to interact with each other in a realistic and intuitive way. In 2D games, collision detection is typically done by checking for overlaps between the bounding boxes or shapes of game objects. However, as games have become more complex, more sophisticated algorithms and techniques have been developed. This publication provides an overview of the various algorithms and techniques used for 2D collision detection in games. We discuss the pros and cons of different approaches, such as the Axis-Aligned Bounding Box (AABB) approach, the Oriented Bounding Box, the Separating Axis Theorem (SAT) and other useful techniques. We also discuss the challenges and limitations of these approaches and provide guidance on how to choose the appropriate approach based on specific needs and constraints.