Skip to main content
4 events
when toggle format what by license comment
Jul 11, 2012 at 11:59 comment added Djentleman I have mentioned my broad phase (quadtree) and my narrow phase (bounding shapes and possibly even pixel-perfect). My question is, given my scenarios, should I use multiple quadtrees and compare them against each other (e.g., one will contain the "Enemy" objects as they are inserted), or a single quadtree with conditionals (e.g., if this object is of type "player" and the other object is of type "enemy", proceed with collision)? I know I'm oversimplifying, but you can safely assume I understand collision.
Jul 11, 2012 at 11:45 comment added knight666 That isn't very clear from your question. It looked to me like you were comparing each object type with each object type, which is the wrong way to approach this. If you want to make the actual collision checking efficient, you need to have a broad phase and a narrow phase.
Jul 11, 2012 at 11:42 comment added Djentleman While this is informative, it doesn't really answer my question. I already know how I'm going to do the actual collisions, I'm just wanting to know what the most efficient approach would be in terms of indexing the objects. Say I already know about the ModuleCollision object and I'm already using it. I now need to know how to make this section efficient given my conceptual design: Collision checking. Check every ModuleCollision with every other ModuleCollision and act accordingly if a collision has occurred. A collision might affect an object's velocity.
Jul 11, 2012 at 7:21 history answered knight666 CC BY-SA 3.0