cocos2dをインストール
いまとなっては、どメジャーな2dゲームエンジン・cocos2d for iPhoneをインストールします。
環境
- macbookpro Early 2011
- OS Lion
- Xcode4.2.1
インストール
公式サイトから辿っていきます。
現在のstable版は、1.0.1らしいのでそれを入れてみたいと思います。
リンクをクリックすると、ダウンロードが始まるので.gzファイルを解凍します。
解凍したら、そのディレクトリに移動して次のコマンドをターミナルから打ち込みます。
恐らく、ブラウザからダウンロードすると思うので、
$ cd Downloads/cocos2d-iphone-1.0.1
で、ディレクトリの移動はOKですね。
そして、インストールのコマンドを打ち込みます。
$ ./install-templates.sh -f -ucocos2d-iphone template installer
Installing Xcode 4 cocos2d iOS template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
...creating destination directory: /Users/mfks17/Library/Developer/Xcode/Templates/cocos2d/
...copying cocos2d files
...copying cocoslive files
...copying TouchJSON files
...copying CocosDenshion files
...copying CocosDenshionExtras files
...copying FontLabel files
...copying template files
done!
Installing Xcode 4 Chipmunk iOS template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
...copying Chipmunk files
done!
Installing Xcode 4 Box2d iOS template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
...copying Box2d files
done!
Installing Xcode 4 CCNode file templates...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
...creating destination directory: /Users/mfks17/Library/Developer/Xcode/Templates/File Templates/cocos2d/
done!
...creating cocos2d template directory
Installing Xcode 3 cocos2d iOS template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
...creating destination directory: /Users/mfks17/Library/Application Support/Developer/Shared/Xcode/Project Templates/cocos2d 1.0.1/cocos2d Application/
...copying template files
...copying cocos2d files
...copying cocos2d dependency files
...copying CocosDenshion files
...copying cocoslive files
...copying cocoslive dependency files
done!
Installing Xcode 3 cocos2d iOS + box2d template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
...creating destination directory: /Users/mfks17/Library/Application Support/Developer/Shared/Xcode/Project Templates/cocos2d 1.0.1/cocos2d Box2d Application/
...copying template files
...copying cocos2d files
...copying cocos2d dependency files
...copying CocosDenshion files
...copying cocoslive files
...copying cocoslive dependency files
...copying Box2D files
done!
Installing Xcode 3 cocos2d iOS + chipmunk template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
...creating destination directory: /Users/mfks17/Library/Application Support/Developer/Shared/Xcode/Project Templates/cocos2d 1.0.1/cocos2d Chipmunk Application/
...copying template files
...copying cocos2d files
...copying cocos2d dependency files
...copying CocosDenshion files
...copying cocoslive files
...copying cocoslive dependency files
...copying Chipmunk files
done!
Installing Xcode 3 cocos2d Mac template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
...creating destination directory: /Users/mfks17/Library/Application Support/Developer/Shared/Xcode/Project Templates/cocos2d 1.0.1/cocos2d Application - Mac/
...copying template files
...copying cocos2d files
...copying CocosDenshion files
done!
...copying file templates
...creating destination directory: /Users/mfks17/Library/Application Support/Developer/Shared/Xcode/File Templates/cocos2d 1.0.1/
Installing Xcode 3 CCNode file templates...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
done!
うまくいったっぽいです。
これで、思う存分cocos2dのアプリがつくれちゃいますね。
そういえば、つりポンはcocos2d製らしいですよ。
参考
http://tonosamart.com/blog/cocos2d-for-iphone-2011-09-25-01/