I'm developing an iOS game with cocos2D. My game is simple, there are levels, and a rotating sprite. The sprite need to go from the beginning to the end of the level without losing his lives.
So there is two possibilities for me :
1°) Already working good
- Tilemap based levels with 2D pixels styles tilesets
- Custom collision detection on the edge of the hero's sprite bounding box, and the tilemap collision.
2°) Would be better graphics, and better users experience (without physics, only collision):
- map base on vector graphics / SVG
- collision detection using the edge of the hero's sprite shape and the map
But, i read the cocos2D/Box2D documentation, and i doesn't found a collision detection on the edge of the sprite's shape ONLY. It's like a pixel perfect collision (already found algo).
I only want to know if one of the 4 edge of my hero's shape is colliding a border of the level, and if yes which shape is colliding (because my sprite is rotating).
Someone have an idea ?
Thank you a lot for your time.