What technique should be used to prune 2d collision checks?
问题 From the outset, collision detection feels like it is an O(n^2) problem. You have a bunch of objects and you need to check if each object is colliding with any of the other objects. However, I know that it is wildly ineffecient to check each object against all the other objects. Why do a relatively expensive collision check between two balls if they aren't even close to eachother? Here is example of my simple program I'm working on: If you have 1000 balls then if you went with the naive