Take the 2-minute tour ×  I'm well aware of how to detect if two
or more 2D objects collide but I'm interested in how to decide
whether to check for a collision. In previous projects, I just
had every object check against every other object (I know,
O(n^2) level of stupidity) and it created a less than fluid
gameplay.  Various forums hail the greatness of Quadtrees,
B-Trees, and any other kind of tree or structure you can think
of.  What is the most efficient structure for determining
whether a collision should be checked?  share|improve this
question One thing you may want to consider is only checking
collisions for objects that have moved, and the only the objects
that are close to you. My current system works well (hundreds of
thousands of objects)- and that's all I'm doing. –  ultifinitus
Oct 7 '11 at 20:31 I think
gamedev.stackexchange.com/questions/14369/… could help you alot.
it was originally meant for and algorithm for parallel
processing but I think the same algorithm could also improve
single threa