Welllll..... there's no magix way to know what objects are going to be colliding with what other objects. But a quad/oct - tree can improve your chances of guessing
Of course checking every object with every other object WOULD work, it would just be slower than rendering a tortoise in HD.
Implementing a quadtree (if you're in 2D) or an octree (if you're in 3D), both of which act the same way in their respective dimensions, would eliminate a whole bunch of unnecessary checks. Somewhere around here, I thought avansc posted about quadtrees.... Hrmm... Anyway, the basic idea is that you're breaking up space in which a collision between two points is possible by continually decomposing that space into quadrants (or um... octants? in 3D). i.e. an object in the top left corner of the screen doesn't have to be checked for collision with an object in the bottom right corner since they aren't in the same quadrant.
AerisAndMe wrote:Welllll..... there's no magix way to know what objects are going to be colliding with what other objects. But a quad/oct - tree can improve your chances of guessing
Of course checking every object with every other object WOULD work, it would just be slower than rendering a tortoise in HD.
Implementing a quadtree (if you're in 2D) or an octree (if you're in 3D), both of which act the same way in their respective dimensions, would eliminate a whole bunch of unnecessary checks. Somewhere around here, I thought avansc posted about quadtrees.... Hrmm... Anyway, the basic idea is that you're breaking up space in which a collision between two points is possible by continually decomposing that space into quadrants (or um... octants? in 3D). i.e. an object in the top left corner of the screen doesn't have to be checked for collision with an object in the bottom right corner since they aren't in the same quadrant.
Google.
I read a whole ton about quadtrees, but unfortunately just like the Separating Axis Theorem, I didn't even know where to start integrating theory and project.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
AerisAndMe wrote:Welllll..... there's no magix way to know what objects are going to be colliding with what other objects. But a quad/oct - tree can improve your chances of guessing
Of course checking every object with every other object WOULD work, it would just be slower than rendering a tortoise in HD.
Implementing a quadtree (if you're in 2D) or an octree (if you're in 3D), both of which act the same way in their respective dimensions, would eliminate a whole bunch of unnecessary checks. Somewhere around here, I thought avansc posted about quadtrees.... Hrmm... Anyway, the basic idea is that you're breaking up space in which a collision between two points is possible by continually decomposing that space into quadrants (or um... octants? in 3D). i.e. an object in the top left corner of the screen doesn't have to be checked for collision with an object in the bottom right corner since they aren't in the same quadrant.
Google.
I read a whole ton about quadtrees, but unfortunately just like the Separating Axis Theorem, I didn't even know where to start integrating theory and project.
It comes with a lot of experience with abstract mathematics--or in the words of Kendall, "A shitload of linear algebra."
It definatly(sp?) helped me understand quadtrees a bit better, it is in a PowerPoint presentation so if you don't have PowerPoint you'll need to download the PowerPoint viewer from Microsoft's website.