So you want to build an iPhone Game….

Posted by & filed under Uncategorized.

It was August of 1979.  I was a freshman at the University of Kentucky and one of my classes had me in the computer lab where I found people sitting in front of a DecWriter, a big machine with a keyboard and 18″ wide paper spitting out of it.  They were playing a game called DecWar.  I was a curious 18 year old and learned about the game and how to play it.

Meanwhile one of my best friends forever had a Radio Shack TRS-80 in his room and he was busy putting all these strange codes into his small computer.   I got curious and helped him hand type in all this cryptic code and at the end of several days, we had the “Star Trek” game up and running.  I was hooked.  I said “I want to learn to make my own games.” and so I went into the computer programming industry as my major and my career, which includes 10 years of full time game development!

Fast forward to today… Computer Games are everywhere and they are big business.  From console games like PlayStations to hand held’s like the Nintendo DS to games on your personal computer, you can’t help but run into them in some form or fashion.

One of the intriguing areas of game development are mobile devices, like smartphones and tablet computes like the Apple iPhone and iPad.  Programming games for these devices has opened a whole new market for independent game developers to get involved.

Games like “Call of Duty” or “NFL 2K9” require that you have a team of multiple programmers, artists, level designers, sound experts and layers of management and human resources.  You also have to have your own audio studio, your own motion capture studio (to get realistic human movement).  It takes years to build up the tools and skills to produce a $50 console game.  Money wise, one can expect to invest at least $1 million in a simple game up to $10 million or more for a major, robust title.

But Apple and the iTunes store have changed that dynamic and individuals and small shops can now put out fun titles that can earn revenue with what appears to be a minimal investment.  A recently announced game development platform, called Corona SDK by Ansca Mobile has lowered the entry point for game development and simplified the already simplified Apple iTunes process.

Before we get into Corona SDK, lets talk about building a game without it.  To make an iPhone/iPad game you have to be on the Apple Mac platform and download their free developer tool, Xcode.  This is about a 5GB package that will take a painfully long time to download over modest broadband connections.   See to get signed up and download Xcode.

Traditionally you would need to learn the Apple Objective C language.  And as a “C” programmer, Objective C isn’t a whole lot of C, but more Small Talk, a language they blended with C to form Objective C.  Beyond the syntax and learning curve, there is the Apple SDK (library of pre-written code to do various things like draw text on the screen, moving images around, etc.), which is huge and complex to learn.  Combining the learning curve for Objective C and the SDK is enough to send a weekend programming warrior home packing.  By using a toolkit like Corona SDK, you can minimize the learning curve that Objective C puts on you.

Then to actually publish a game that you’ve written, you will have to pay $99 to Apple for a paid developer’s license that has to be renewed every year.  Its not a big deal in the grand scheme of things, sell a couple of hundred copies of your $0.99 game and that’s covered.  Once you have this, it’s a matter of following a few simple instructions and you’re set up to be able to publish a game to the Apple iTunes store and sit back and wait for the payments to start flowing in.  Sort of…

Simplifying the Development Process

As mentioned above, learning Objective C and the API’s that go with it is hard task.  A company known as Ansca Mobile has made this a much easier prospect with their Corona SDK product. (

Corona SDK is a toolset, a programming language and SDK of functions oriented at game development.  It’s based on the scripting language Lua, which has a very minimal learning curve.  The Corona SDK itself is very intuitive and easy to pick up.  In fact you can have a functioning game in just a few minutes.   The problem is the game isn’t a lot of fun and is very limited.  Games take time to develop and you should not be sold on sitting down with this toolkit and having a marketable game up in the iTunes store in a weekend.

Corona SDK is free to download and work with while you’re learning.  You however, will have to pay an annual license fee ($199) to actually build games for devices and publish to the iTunes store.   So if you’re following along, you’re up to $298 plus a Mac to get started.  In the grand scale of things, this is one of the easier hurdles to overcome.   They also offer a version of the tools that will build games for Android devices as well.  If you are only interested in that, its $199 for that fee and you can develop for Android on either Mac or PC platforms.  $349 will get you the ability to build for both using one set of code.

For all my years of programming experience, what should be a simple task of putting a graphic on the screen and a particular X, Y location would require a ton of work.  In the old days you had to write your own code to open the file, read the graphic information in converting it to the Red, Green and Blue values and blit it to the screen and for speed, we would write that using un-rolled loops in assembly language.   Then to keep the screen from flickering you would have to maintain off screen copies, paint your new or recently moved graphics.

The Corona SDK blog recently published an article showing how to load a single graphic on the phone’s screen using Xcode’s Objective C.  It took well over 100 lines of code.  With Corona SDK, my dream is realized with one line of code:

tree = display.newImage(“tree.png”, 100, 100)

I now have a object “tree” which is the graphic “tree.png” loaded at 100,100 on the screen.  If I want to move it to the right?

tree.x = tree.x + 1

Want to fade it out to make it a ghost tree?

tree.alpha = 0.5


What about sound?

lightningSfx = audio.load(“lighting.wav”)


Corona SDK uses an event driven model and your apps can run either at 30fps or 60fps.  It supports smart graphics, loading higher resolution graphics on Retina display phones and iPads.

My recently release game, OmniBlaster ( checks in at around 3000 total lines of code.

I started down this path a few months ago.  I figured my ideas were pretty simple and would be fairly quick to create and deploy.  Somehow in my old age and the lure of these easy tools, I looked past the reality of what all is involved in making a publishable game!

Lets look at the pieces of the puzzle…..

Game Concept

You need to think about what your game is going to do.  How will it fair against similar games already out there (yes there are….)?  How can you balance difficulty and fun?  How will you manage advancement?  What rewards are you going to give your players?  How can you keep them playing over and over? What updates can you do to keep the game fresh?  These are all things that need to be thought out before write your first line of code.

Your game will need to be different from the pack, either through better graphics, better game play or a unique idea.  You need to research what is out there and study them.

Next you need to storyboard out the game play.  You need to figure out how to keep the players attention.  There is no set formula for this, but there are a lot of guidelines and discussions on game theory that you probably should digest before you get too serious into it.  Players need to be rewarded beyond just setting high scores.  How you tease them?  Offering them new things along the way goes a long way to repeat play and good reviews.

Artwork and Sound Effects

This may very well be your single biggest struggle.  Many game programmers stink at artwork, but artwork is the biggest piece of any video game.  Even from a simple game like Tetris or Yatzee, the quality of the art is important to separate you from the pack.  Depending on your game type, you may need maps, positional objects and animations (called Sprites), and depending on the complexity, you may need a lot of it.  A simple child’s game to teach the alphabet with association to objects, like “A is for Apple” will need at least 26 graphics.  Art isn’t free.  Sure you can steal plenty of it from the Internet, but if it makes it into your commercial for profit game, you will get sued for using it.   So your choices are draw your own, which unless you’re a graphic artist, will probably not be very good, hire an artist or pay for stock art.

If you draw it yourself, you have a heavy cost in time.  If you pay for it, your initial cash outlay will continue to climb.   That Major League Baseball game for your Xbox?  Thousands of man-hours of artwork.

Games need sound too.  Angry Birds would not be nearly has cute if it wasn’t for the sound effects of the pigs and the mad birds.  Very few of us have the skills to create our own sound effects and if we do, they are likely going to sound amateurish to the customers who will buy your game.  There are however, plenty of collections of sound effects that can be bought off the shelf.  There seems to be a much better chance of finding public domain sound effects on the Internet, but the quality will vary as well.

In addition, a good game will have a sound track that sets the mood for the game.  While many players will turn the sounds off so their boss can’t hear them playing, it adds a major ambience to the game that the players will turn on when they can.  Lets face it blowing up an enemy space ship is so much more fun when you hear the explosion (though sound doesn’t travel through space very well!)

So with art and sound in hand, you now can start programming.  It’s at this point, unless your game is very simple, you may need the skills of someone called a “Level Designer”.  These are individuals or teams of individuals who figure out the game balance of how hard a given segment of the game should be; what obstacles are present; what rewards are given and they work with the developer and artist to tie the two together.  For your one-man-shop, you are going to have to do this role too.  Figuring out how to advance in levels and balancing the game play is the hardest and most important skill to the success of the game.

All the parts you didn’t think about

Now that you’ve got your core game done, you have to now add the polish.  Splash screens, High Score screens, Help, Settings, in-between level screens or animations (interstitials), saving the game, loading in the saved game, saving the scores, loading them in, handling things like phone calls that will interrupt your game all have to be there for your game to look professional and command customers dollars.

Players like to see their name in lights.  You are going to have to have a way to let players show off their scores.   Apple provides their Game Center for this.  It does a lot to help get players together, but for your first game, you’re probably just going to be interested in their leaderboard/high score reporting features.

Many games also allow connections to various Internet social networks like Twitter and Facebook to post high scores.  This is also an important marketing tool for your game.  You should always include a link to your game so others can learn more about it.

Beyond the Physical Game

Now your code is nearing completion.  What else is missing?

Have you thought about how you’re going to test your game?  Do you have all the different iPhones, the various variations of iPads and iPod touches at your disposal?  Probably not.  Also if you’ve been building this game in a vacuum and you think its cool, then you hand it to someone else only to find out they can’t figure out how to play it, they are going to quit, not review it and your sales will suffer.

Playtesting not only helps track down bugs, but its critical to get feedback from others on how fun your game is.  Is it too hard?  Is it too boring?  What’s missing?  All of this valuable feedback comes from testing.

As a real life example, I built a vertically scrolling, side-to-side moving space shooter.  For me, I put the primary weapon button on the left and the secondary button on the right.  I hold the phone in two hands using each thumb to fire each weapon while using tilt controls to move my ship side to side.  Everyone I handed the phone to with the app launching could not figure out how to move the ship with out help.  What I thought was obvious baffled EVERY person I showed it too.  Clearly, I needed to address that.

The next issue came from a tester who held the phone in one hand and played it one handed.  In particular, he was right handed and had to stretch his thumb across the screen to get to the primary fire button.   The game now has adaptable controls so the player can choose where the buttons are positioned.

Testing feedback is essential for you to see the game through other people’s eyes.

For iPhone apps, to prevent them from escaping into the wild, developers have to go through some hoops to get their game to testers.   This involves setting up a special provisioning profile that includes the UUID (unique device ID) for each of your tester’s phones.  Once you add the devices through Apple’s developer portal and create a provisioning profile for your game, you can then add that to your application bundle.  Using Corona SDK makes building the app very simple.  You download the profile and put it in a special folder on your computer, then build the game.

The next step is getting it to your testers.   There is a wonderful website called  They help gather the ID’s for you, make it easy to import them into the Apple Developer Portal, and the aids the playtesters in getting the game onto their device.

Once you’ve gotten your feedback, its back to programming and art (and sound) to tune the game and send it out for another round of testing.  This testing cycle will go on for several cycles before you can call the game ready for the public.

You will need to have a system to track bugs reported by your testers, allow them to make feature requests and manage your development.  A popular tool is to install Mantis on your webserver, or use a 3rd party bug tracker like Bugzilla.  Many people don’t think about this need, but it’s important to have.  Of course you could just let your testers email you and try to track everything that way.  Good luck, buddy!

You will also need to have a way to communicate with your testers, so having access to a mailing list server will be helpful.


There is a term in programming called “Feature Creep” which means that as you go along, you think of something else cool to do, or something else to fix.  This cycle will go on and on and your game never gets finished.  You need to be disciplined to cut off new ideas and features, focus on bug fixes so your game can get done.

Most developers will take time planning out the future of their application.  Games are no different.  Almost every application gets updates.  Some are to find bugs that slipped through testing, others are to add features you want in but ran out of time to do.

These new features are planned out on a “Roadmap”.   Roadmaps are living documents that change as features get thought about and determined what version you can reasonably get that feature in.  It’s a “Living” document because you will over time move features to later in the roadmap or earlier depending on various factors like importance, difficulty and player wishes.

For a small developer, this could be something simply written down on a pad of paper or a text document.  Larger teams will probably have a more formal development tool like JIRA for planning.

Do not underestimate the importance of thinking about your features and cutting off what you can reasonably get done.  Our games shouldn’t be fire and forget.  Updates keep them in front of the player’s eyes and encourage repeat sales.  Of course, feature creep has to be stopped.


Now the game is done, you’ve uploaded it to iTunes, its been approved and your bank account is not filling up.  Why?  One word: Marketing

There are hundreds of thousands of apps in the App Store.  Dozens more added daily.  You have to have a way for people to find you.  Apple does a good job of promoting new games, but you’re likely not going to get noticed with out some help.

A game’s popularity will push it higher on the App Store’s display.  The higher rated a game is, the more prominent it will be displayed.   It’s a chicken and egg problem.  You have to have people downloading the game and reviewing it, but they can’t find your game.

This is why marketing is important.  This is how you spread the word about your game and get people interested in it.  Clearly you will need to get your testers to rate your game and review it as well as all your friends.   But that’s not enough.

Many people turn to social networks like Twitter and Facebook to talk up the game and provide links for people to find the game.   So you’re going to need a Twitter account, maybe one dedicated to your game.  You will need a Facebook “Page” to also put out news about the game and answer fan questions about it.  If you thought developing and testing and art was a time suck…..  Customer service is a major part of your marketing to keep your fans happy.

You will also need a website dedicated to your games.  If you plan to have multiple games, one website can service them all, or you could do an individual website for each game.  It take build a website, make it look profession and attractive to your customers.   You build a really cool website to go with the game and then view it from your mobile device only to find out that it really, really doesn’t play well on the small screen.  Now you have to also build out a mobile version of your site.  You’re building a mobile game, so this is a 100% must have.  In fact, it might make more sense to build a mobile friendly site from the start.

Your website will need a link to the Apple iTunes store so the readers can find and download your game.  Apple provides some basic artwork, like the “Available in the iTunes App Store” graphic, and sample devices you can use to show your game on the device.  Apple has very strict guidelines on using their artwork, and in fact, the usage agreement is the first piece of paper you actually have to fill out and mail.

Your website should also contain links to get your viewers to follow you on Twitter and “Like” your FaceBook page for the game.

Still not getting sales?  People have to find your website and find your Twitter and FaceBook pages.   There are three ways to help get your game noticed.

First is the iTunes App Store itself.  Apps can be reviewed and ranked.  You do not want to get fake rankings and ratings, but your app should provide suggestions to its players for them to go to the App Store and rate/review your game.  Make it easy for them by giving them a button to do so.

Secondly you can submit your game (website, iTunes link) to various websites and magazines that review apps and games.  There are a lot of them and Apple lets you have 50 free downloads that you can give to reviewers.   If you’ve done a good job, hopefully they will tweet about you, post on their blogs etc.

The third way is maybe the most expensive part of what you’ve done to date:  Advertise.  Most everyone can get their hands on $100 worth of free Google AdWords ads.  You should take advantage of that.   After that, finding good places to advertise will do wonders to get your game out there.  How much do you spend?  Depends a lot on the quality of your game and how much you can expect to return on the investment.

Reality Check

After working with my testers for OmniBlaster, I was feeling really good about the game.  It had come a very long way and now felt like it was ready.  My artwork had gotten a major upgrade.  I had power ups and rewards working.   The last two weeks was focused on tracking down and eliminating memory leaks and dealing with timers messing up when the game was paused.  My code was clean, I wasn’t leaking memory, and the testers were happy.   It was time to release it to the wild.

I have to admit, I got a lot of joy hitting the “Build” button for 0.9 Release Candidate 1.  That joy was replaced by changing the build process to produce a live version and creating that 1.0 Gold Master.   So for OmniBlaster, I uploaded it to iTunes Connect, Apple’s interface for developers to the App Store and the waiting games begin.  Apple’s review process is thorough and some apps take more time than others and there is always a backlock waiting.   Then one day a small email pop’s into your inbox from iTunes:  “Your app status is In Review”.   Your burst of joy is quickly replaced by anxiety.  What if they don’t approve it?  What did I miss?  Can I handle rejection.   For me the wait wasn’t long.  A new email showed up several hours later.   “Your app is Processing for the App Store” followed a few minutes later by “Your application is Ready for Sale”.  The joy of seeing those two emails come in for a first time App Store developer was off the top of the joy sale.  Euphoric is the best word to describe it.

At that point, you’re still not indexed in the iTunes search engine, but you get the URL for the iTunes page in advance, so you can prepare your website and marketing materials.  Sharing that with family and friends and  your Social Net.

That euphoria is quickly replaced by reality when you realize you didn’t sell a million units the first day and you have a long way to go to become the next Angry Birds.


One Response to “So you want to build an iPhone Game….”

  1. altaf

    Thanks rob! for the wonderful walkthrough, realities and sharing of your experiences. Keep up the good work. wishing you all the very best.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">