Keith_Cully

SAT Project

Home

Games

Other Projects

About Me

Contact Me

Back to other projects

SAT Collision Detection

This was an individual graphics project I completed during third year. We were required to implement exact 2d collision detection between moving and rotating objects using the Separating Axis Theorem (SAT). We then had to implement some form of optimization to speed up the process.

Video

 

Development

The project is written in C#, using XNA 4.0. To optimize the collision detection I took advantage of spatial coherence. The screen is split into a grid, the elements contained in each grid segment are updated every frame, then objects only check for collisions with other objects in the same grid segment. I also took advantage of broad phase collision detection to eliminate the need for expensive SAT checks, if the objects could not be interpenetrating. If the objects were found to be colliding by the broad phase technique, the more precise SAT collision check was then called. The optimization did not make much of a difference when the number of objects was low but as the number of objects increased the performance increase due to the optimization grew dramatically.