Hey all, new on the site
I'm writing a game where multiple objetcts act on the screen at the same time (bullets and enemies). Both objects are created from a class, which is looped in the main class. Hence there is no predeterminated ammount of spawning objects. To manage collisions between these has proven to be a matter of great difficulty.
The game is using cocos2d framework. I've tried the chipmunk physics engine, to no avail. What ever I do the same obstacle appears: the code can't tell which objects collide or not; there's no induviduality in the objects one may say. How do I detect collision between multiple objects, while they still spawn at an infinitely ammount?
The chipmunk physics engine did succesfully detect these multiple collisions, but proved to be a nightmare to the framerate. The problem occured when over 40 objects acted on the screen at once. When I couldn't figure out how to delete the objects, instead I only transported them to an array ouside the visible screen. There they waited untill the loop called them back. This "recycling" of objects was really hard on the memory.
Consequently there's two solutions to my problem, I'm interested in both

Greatful for answers // shtra