First, I’m not talking about specific algorithms, there’s plenty of discussion on collision algorithms.
The question that I’m curious about is what are the strategy you guys use for collision detection and why?
What I mean; I’ve been trying a strategy of having a collision handler that sorts through all the game objects that can collide versus each other. In the game loop I update all the game objects, then I send the objects to the collision handler to check collisions.
I don’t have any particular reason why I went that route, I just kinda figured that would be the easiest way to keep things ecapsulated.
An alternative strategy I could think of would be to have a collision test as part of each object, so, each game entity would check for collisions as part of its update.
How about you guys, what insights do you have in how you setup collision detection?