quadtree implementation for check 2D collitions with low CPU cost