Introduction to physics on the iPhone Part 1: Install Cocos2D with XCode

The first thing we need to do is set up Cocos2D with our version of XCode. If you already have Cocos2D setup you can skip to the next section Part 2: Creating a Cocos2D enabled project.

Download Cocos2D

Cocos2D is the most popular Game Engine available for the iPhone. It's free, powerful and easy to use. The first thing we need to do is download the latest version of Cocos2D here. I'll be using the latest version: 2.0-rc1.

Figure 1: Installing Cocos2D using the Terminal

Setup Cocos2D with XCode

Cocos2D comes with an install script which we need to run. The script will automatically setup some XCode profiles for us. The profiles allow you to create a new Cocos2D project in XCode which will automatically setup all the necessary libraries for you. Unzip the folder you downloaded and locate the install-templates.sh file. Next open up a terminal window (Applications/Utilities/Terminal) and drag the install-templates.sh file into the terminal window. Finally, add the following commands "-f".

And that's it. The next step is to create a new XCode project with Cocos2D and Box2D enabled: Part 2: Creating a Cocos2D enabled project.

Tweet: 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.