Downloading and Installing Cocos2D

On December 7, 2011, in iOS Games, MAC, by Matt

In most of my upcoming tutorials I will be using the Cocos2D framework; with this in mind I thought it would be a good idea to start off with a quick post on getting it downloaded and installed correctly on your MAC. Yes this is the Hello World post for Cocos2D in iOS.

First things first lets downloaded it from the main cocos2d-iphone website: http://www.cocos2d-iphone.org/download

You will note there is a Stable, Unstable and Bleeding edge versions. I’m going to stick to the Stable version for now as I’m not feeling adventurous enough to try a BETA version.

  1. Download the stable version on this page http://www.cocos2d-iphone.org/download
  2. Extract the tar.gz file into a folder which will be easily accessible from Terminal; my Terminal session defaults to my user folder, so a quick CD to my downloads and then to the directory I extracted in step 1 works for me
  3. Enter “./install-templates.sh -f -u” this will install all the Cocos2D XCode templates into the default XCode installation directory; note if you have installed XCode into a different directory you can specify an optional parameter to change the installation directory.

Your now ready to create your Hello World Cocos2D application.

  1. Lets fire up XCode and create a new Cocos2D project by selecting the Application template – note if you cant see these then you have not done the above steps correctly.
  2. Just build and run the template and you should see Hello World with a frame counter showing in the bottom left corner.

That’s the first step done; check back soon for the next post Sprites!

 

 

Tagged with:
 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can
take care of it!

Visit our friends!

A few highly recommended friends...