ObjectiveChipmunk Beginner
Ian Fan August 2012
Target:
Download Objective-Chipmunk library then import it and ImageIO framework into the Cocos2D based template.
Smaple Code:
https://github.com/IanFan/CpTemplate







Downloading ObjectiveChipmunk Pro trial version
1. Go to Chipmunk-Physics official website
http://chipmunk-physics.net/downloads.php
2. Download the latest Chipmunk Pro trial version
3. Double-click the gzipped tar file to extract it.
(Objective-Chipmunk trial version can be used for free till release project.
If you like it and want to upgrade to paid version, please check chipmunk-physics website
https://chipmunk-physics.net/store.php)
Building a Cocos2D template project
1. Open Xcode.
2. Build new Cocos2D project.
( do not use chipmunk template because Objective-Chipmunk will be imported later)
Importing ObjectiveChipmunk to project
1. Drag the ChipmunkPro-iPhone-Trial folder to the project.
( Do not drag the ChipmunkPro-Trial-x.x.x folder, drag the ChipmunkPro-iPhone-Trail folder in it)
( Suggest drag ChipmunkPro-iPhone-Trial folder to libs folder in Xcode for arranging all libraries together)
2. Tick Copy items and Add to targets.
Adding ImageIO.framework
Take a look the figure list left:
1. Click project which list on the top (press "Command + 1" to show project navigator)
2. Click "Targets"
3. Click "Build Phases"
4. Click "Link Binary With Libraries"
5. Click "+"
6. Type "Image" to search, click "ImageIO.framework", and then click "add" (suggest that drag ImageIO.framework to Frameworks folder for arranging all frameworks together)
Well done! You have known how to import Objective-Chipmunk lib!
Further Link:
1. Join Official Chipmunk forum:
https://chipmunk-physics.net/forum/
2. Chipmunk show case App on iPhone and iPad
http://itunes.apple.com/tw/app/chipmunk-pro/id505070172?mt=8
3. Official simple tutorial with detail explanation (use UIKit)
https://chipmunk-physics.net/tutorials/SimpleObjectiveChipmunk/
Discussion:
2D Physic Engine Choice: Chipmunk or Box2D
Both:
+ very good library and perfect Cocos2D compatibility
+ used by most developers need 2D physic in iOS games and interactive books
Suggestion:
If you prefer 1. C++ , 2. larger communities 3. continuous collision detection, go to Box2D. (free)
If you prefer 1. C, 2. clear document 3. slightly easier learning curve, go to Chipmunk. (free)
http://chipmunk-physics.net/downloads.php
http://chipmunk-physics.net/release/ChipmunkLatest-Docs/
If you prefer 1. Objective-C, 2. light and fast, 3. optimised and save time, go to Objective-Chipmunk. (paid)
http://chipmunk-physics.net/chipmunkPro.php
https://github.com/slembcke/ChipmunkShowcase