Some 2D collision detection and physics stuff.