views:

42

answers:

1

1- let's say there is a box on the screen and as soon as it gets hit by another box it suppose to move. How can i detect (getting hit) on my box object? Is it a good idea to use an nstimer which runs every 0.1 seconds and looking for the location of other objects around itself?

2- What is the best way to display simple 2d animations?

+3  A: 

Install the Cocos2d templates and then instead of using the standard Cocos2d template use either the Chipmunk or Box2d template. Box2d has the benefit of C++ where Chipmunk is C based. Both still use Objective-C though for a lot of stuff. Heres where Cocos2d is. Note: All three templates have animation abilities.

thyrgle
thanks a lot that was really helpful, do you know any place i can find a tutorial for beginners?
aryaxt
http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls this would be for Box2d. http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls for Chipmunk but for this one you may need to add the prefix CC to a lot stuff (like Sprite for example) because it is slightly outdated.
thyrgle