News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

partitioning an area for circular collisions?

Started by Alex, April 24, 2007, 08:22:37 PM

Previous topic - Next topic

Alex

hi,
I'm trying to figure out how I can organize my collision detection in a way in which circular objects can collide with each other but without having to check every object, but rather only those which are near each other should be checked.

I was looking at the partitionworld function, and am wondering whether this is what I should use. If so, how would this work?
If not, then what can I do?

kevin

#1
 Unless the sprites in question are static, then storing them in world isn't an option.

Have a look at this thread to get some ideas on building a  Spatial Partition


Alex

thanks..

at the moment, im trying to see if I can speed up my game, and maybe something like this will help.

I also think i'm running through all my objects too many times, and perhaps i should try and optimize it so it runs through each group only once, but that might not be possible.

also, there's alot of calculations to do as well, considering i have some physics in the game, so maybe that is the problem.

hmm