Original Post
Ok, I have designed a game that uses very simple rectangular collision detection. I think that the way I use it is slightly inefficient, however. Each moving obect constantly has to check several lists of rectangles to see if it collides with anything. It would have to run through a list of 500 level objects, 500 npc objects, and 250 or so miscellanious objects. So each time one thing moves, it checks 1250 rectangles to see if it shares any space with them. An average of 500 things will be moving per loop, so that makes 625000 collision checks per loop! Whats a good way to handle simple, 2D collision checks? I mean, REALLY simple, were talkin rectangles here!
This is why I find 3D collision checks absolutely mind-thrashing... a level can hold quite a bit of irregular 3D shapes, yet 3D engines can still run hella-fast! How do they do it Basil?
