tl;dr:Sweep-and-prune is my go-to algorithm when I want to quickly implement collision detection for a game. I think it’s an awesome and elegant algorithm, so I wrote a post about it. This post is split into simple and sophisticated versions of the algorithm.