CollisionDetection
CollisionDetection copied to clipboard
Collision Detection on Collection
I have 1000 shapes for which I need to collision check against each other. Big O is killing me. In spite of my previous issue I submitted on optimization, that sort of optimization is minor at best when my bottle neck is n^2 checks. A good way to think about it is "What's better than a very fast collision detection between two circles?" Avoid checking two circles whenever possible.
Again, I WOULD NOT CHANGE ANYTHING in the current book. It's perfect. You may wish to add an appendix on an efficient collection that doesn't need n^2 checks. A quadtree is the only one I know about. I'm sure there are more options.
Ditto your other issue: thanks for the suggestion! Broad-phase collision is another one I've been looking into. Any suggestions for improving performance would be very welcome!