in my game, ObjectManager class is manage my game's all objects and it has a list of Objects.
and i use 2 for statement when i check the each object's collision.
for(int i = 0; i < objectnum; ++i )
{
for(int j = 0; j < objectnum; ++j)
{
AABB_CollisionCheck()
}
}
but if there is many objects in the game, the FPS is get lower. (80 Objects == 40frame) maybe this is because that my collision check method is inefficient. (if the object num is n , then my method operate n^2 times)
- can you give me some tips about this Collision Check Optimizing?
i want to reduce my for loop to check each Object collision.
- what is different about using Callback Fucntion or not? for Collision Check. is there have any operate speed adventage about Callback?
p.s
thanks a lot for read my question. and please excuse for my english skill...