Cocos2D Beginner
Ian Fan August 2012
Target:
Download Cocos2D library and run a project with Cocos2D template.
Sample Code:
https://github.com/IanFan/CcHelloWorld
Downloading Cocos2D
1. Go to Cocos2D official website
http://www.cocos2d-iphone.org/download
2. Download the latest stable version
3. Double-click the gzipped tar file to extract it.
Installing Cocos2D
1. Open terminal application.
( Finder -> Applications -> Utilities -> Terminal.app )
2. Use cd command to change to the Cocos2D folder.
( type "cd [space]", then drag the Cocos2D folder into terminal to get the folder's path, and then press "enter" )
3. Type "sudo ./install-templates.sh" (don't loss the "." before "/") to install, and type the password when promoted.
( if your sh is not bash, try "sudo sh ./install-templates.sh" or "bash ./install-templates.sh -u" )
Building new Cocos2D project in Xcode
1. Open Xcode.
( need download Xcode SDK? https://developer.apple.com/devcenter/ios/index.action )
2. Build new Cocos2D project.
( Xcode's menu -> File -> New Project, Select iOS template cocos2D vx.x, and choose cocos2d iOS )
( Type product name, for example "HelloWorld", then click "Next", and then click "Create" )
Running project in simulator
1. Click "Run" in Xcode.
Congratulations! You are running your first HelloWorld Cocos2D App in simulator!
Further Link:
1. Got questions? Join Official Cocos2D forum and ask:
http://www.cocos2d-iphone.org/forum/
2. Official Beginner's guide: Install + Start empty project
http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:lesson_1._install_test
3. TheNewBoston's Tutorial: Downloading the Cocos2D Framework
http://www.youtube.com/watch?v=pdVNahZb1PU
4. Bob Ueland's Tutorial: Introducing Cocos2D
http://bobueland.com/cocos2d/2011/introduction-to-cocos2d/