Where Do I Begin: Make an iOS Game

23rd July 2012

I sometimes get asked the question “How do I make an iPhone game?” so here’s the answer.

Step 1: Get a Mac. You may not like it, but it’s the only way. (link)
Step 2: Download and install Xcode from the Mac App Store. (link)
Step 3: Download cocos2d-x and install the Xcode templates. (link)
Step 4: Create a new project in Xcode. Pick one of the cocos2d-x templates. I recommend going with the box2d template, but if you’d rather write your own collision detection then pick the plain cocos2dx template. (Help at the bottom of the page)
Step 5: Make the game! I recommend pen and paper to sketch down some rough ideas and then have at it. (link)

There are already plenty of tutorials out there on the specifics of making a game with cocos2d-x so if you’re stuck try a few of them out. What you essentially need to know is that all your graphics will be images that you can create with your favourite editor (flash, photoshop, fireworks, painter, etc). Once you’ve imported your assets you can use them like so:

CCSprite *mySprite = CCSprite::spriteWithFile(“myImage.png”);
mySprite->setPosition(ccp(480.0/2.0, 320.0/2.0));
this->addChild(mySprite);

Providing your app is landscape, this code will create a sprite, center it and then add it to the display.

Help Installing Templates: Using terminal navigate to the cocos2d folder and run “./install-templates-xcode.sh -u -f”


Post a Comment

Your email is never published nor shared. 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>

Blog Categories

Injury of the Day

Nurse Long's Diagnosis:

Grumpy Guts

Caused by high speed belly landings, particularly when colliding with a truck or bus after just having looked really cool. The damaged guts can cause grumbling, moaning and antisocial bellyaching and …

Read More

Sign-Up For News And Goodies!

Want to stay up to date with all things Stunt (and Kempt - the developers of these games)? Awesome! Sign up to our mailing list below.

* indicates required