So, as far as I understand the quadtree, you divide the gamefield into smaller sectors and this allows you to make a only collision detection with the elements which are located in one sector. Right?
I'm not sure if I'm yet good enough to implement this, though I can try it. Although it looks like Box2D can do exactly that, as per Zael's post?
I think I managed it
I used, like suggested by Zael, Box2D for collision detection and SFML for rendering the graphics. I'm still getting a stack overflow with more than 1700 objects, but everthing below that works perfectly fine. Thanks again for the help!
The stack overflow is caused due to a too big array. I switched over to a pointer, which solved the problem.
-Aurora-Member Since 16 Apr 2012
Offline Last Active May 04 2012 09:03 AM