Hey!
I have a simple top-down action game I'm working on, but have never used any kind of physics library. I've tried to browse the forums on both Chipmunk and Box2d integration in Cocos, but I am admittedly in way over my head.
I have created a collision map for my level, which pulls in the black/alpha mask and gives me an array of 1's and 0s for my pixel locations.
(further info on this here: http://www.cocos2d-iphone.org/forum/topic/1188 )
I had initially hoped to get away with my collisions WITHOUT a physics library, but I have had a few issues.
Right now, the collision map works... sort of. I am just calling to the position of my player to see if it has collided with any walls/buildings (black pixels in the mask). But this call only gets the center pixel of my player, so it only registers when the player is already half-way onto the buildings. Plus, my movement looks jittery, as I am forcing the player to "back out" on contact, otherwise that single point would be eternally stuck.
I would like to get my collision for the player to check over the whole sprite, or at least a point at the 'front' and 'back' of the player, so that if the front hits a building (and gets 'stuck') I could back out of it.
I know that a CGRect call for collision looks fairly easy, but as I am rotating my player around, that CGRect is relative. I had thought about calling to the 'front' or 'back' of the player by just giving an offset to the CGPoint position of the player, but again, I think that call would just go 'up' or 'down' on the screen from the center point and not take the rotation orientation into account.
I can definitely see the NEED for a physics engine for even simple collision calls like this, but I'm not sure which to use or where to start.