Start to Finish: Publishing a Commercial iPhone Game

Published October 16, 2008 by Niklas Wahrman, posted by Myopic Rhino
Do you see issues with this article? Let us know.
Advertisement

This is a story about how I took an idea and made it into a commercial game. In this article I will try to focus on how to get a game done - a problem many independent developers face. During the development of my game, Asterope, I took a lot of screenshots from many of the development stages that show how the game gradually came to life. Hope you enjoy the read and learn something!

Who am I?

My name is Niklas Wahrman, I'm 24 years old and live in Finland. I've worked on numerous mobile phone games including Constantine, Superman: Lex's Payback and The Blade of Zorro. I study computer science but spend more time on my personal projects than university - just as one should in my opinion!

Asterope in a Nut Shell

I want to start at the end and tell you what the final product became. Asterope is a game that completely relies on one gameplay element: the ability to control a flying ship by shooting out a rope (that works kind of like the ninja rope in the famous game Worms). The ship flies constantly forward and by grabbing hold of whatever surrounds you with a rope you can alter the ship's direction. The game has a story of how an asteroid was nearing Earth at a blazing speed but just as it got very close to Earth, it stopped. So Earth sent a space shuttle to check it out, but the space shuttle got sucked into the asteroid. Nobody wanted to go on a rescue mission, fearing they would suffer the same fate as the astronauts. That's how the player comes into the picture - on a mission to rescue the astronauts. The story has a twist later on when the player discovers the asteroid is really a machine controlled by the Androids on a mission to invade Earth.


Asterope in action

How It All Began

Someone asked me the other day how I came up with the idea for the game. I could not remember at that time, but the answer came to me later on. The idea came from when I learned to do rope physics after having found an amazing article on the subject by Thomas Jakobsen. I've always enjoyed physics simulations on computers so ofcourse I had to implement the technique Jakbosen teaches. It's typical for commercial games to have one or many designers, brainstorm sessions and so forth where they come up with ideas for games and then hand the idea to the developers to implement them. But I did it the other way around, and I think that is profound and a great strength for us independent developers. Instead of coming up with solution on how to implement ideas, we can come up with ideas around our solutions. So a big development challenge was already won before the development of the game was started.

The idea about the spaceship and the asteroid came one day when I was walking home from class. Creative ideas usually come when you do something other than sit in front of your computer and let your right part of the brain work. Asterope was actually meant to be a J2ME (Java2 MicroEdition) game. J2ME games suffers from the annoying fact that you can only press one key at a time; I thought using the arrows to fire a rope would work well in the sense that it would be more of a plan-ahead game than an action game. I also tried to keep in mind that I would do the graphics myself and although I am a capable artist, I'm not that great. So it was vital to keep the design simple so that I could do the art myself.

It wasn't long after I got the idea that I stumbled upon the Google Android Challenge. What a perfect opportunity to put my idea into action. If I were among the Top50 I would get $25,000! Awesome, I thought to myself. I remember last December when I attended my company's Christmas party. I had stopped working there recently to be able to focus my full time on my degree and on my own projects. It was around 4am and everyone had had quite a few too many whiskeys and someone asked me what I was going to do next and I explained the idea to them. I find it amazing how now, 10 months later, the product is finished and for sale.

Ready, Fire, Aim!

It actually took a while until I started working on the game for real. The deadline for the Google Android Challenge was the last day of February, if I recall it correctly, and although the idea was vividly with me for January I could not get myself to start working on it. I think it had to do with me needing some time to rejuvenate after having stopped working part-time. I almost gave up on the idea with the deadline nearing so quickly, but then Google decided to postpone the deadline to April 14th after they released an update to their SDK. This got me motivated to do it - to take action on the opportunity!

So the work began. I'm a huge fan of Visual Studio and I find that the best way to prototype games and do tools is to use C# .NET. So using Visual Studio Express Edition I finally began working on the game. I had done some physics testing late in 2007, so I knew it would not be a problem to get the rope working. Instead of prototyping the gameplay first I did the editor to create levels. What I needed was:

  • A level format with caves constructed out of rocks and an editor that let me easily and quickly create levels. Having great content early on and not having to build levels by manually inputting numbers into arrays is really key to a good kick start.
  • An editor where I could import pictures of rocks and create their collision shape. All rocks are built from convex shapes, that way I could use an easy collision detection algorithm called SAT or Separating Axis Theorem.
Keeping things simple is something that really helped me get things done. By using convex rocks I could do collision detection more easily and who will notice that all rocks are convex anyway? It's important to focus your time on the right things. Ever heard about the 80/20 rule? 20% of your time is spent on 80% of the result and visa verse. Try to avoid that!

Steve Pavlina talks about the "Ready, Fire, Aim" method: Independent developers spend so much time on making generic game engines, details and planning ahead that in the end they get nothing done. Often when independent developers use the well known "Ready, Aim, Fire" (Idea, Planning, Execution) method it ends up as: "Ready, Aim, Aim, Aim, Aim, Aim...". If I happened to need more complex levels and more features I could implement them later. It was important I got a prototype up and running as fast as possible.

The editor probably didn't take much longer than a couple days to create, the code was horrible, but I wasn't going to build upon it much in the future anyway. The first prototype came to life quite quickly too. All in all in about a week I'd say, and keep in mind I was a full time student during that time. But I did let my grades suffer; I found it more important to work on this game.

The first prototype consisted of just a level getting loaded and a ship flying forward. Now was the time to implement the physics, which I did with a plain copy & paste from the physics demo I created in 2007. And it worked, although it took some time tweaking to get it just right.


The Asterope level editor early on


The obstacle editor


First prototype up and running

Keeping My Motivation

Something that Eben Pagan, my personal favorite self-help guru, talks about when it comes to challenges to get things done is how 90% of people are not motivated by goals. So if you're one of them, and you likely are, you will feel unmotivated if you put up a goal to get a game done by a certain date. It's better to focus on small problems - one problem at the time. Most of us are problem solvers. The idea originates from a book by Bobb Biehl named "Stop Setting Goals If You Would Rather Solve Problems".

So I had an editor and a prototype of the game and I felt that the gameplay worked. Now my problem to solve was making it pretty. Having a good-looking game early on can be a great way to motivate you to get the game done. Although you could have most of the code written, if the game looks bad it will feel far from done. Better to trick yourself into thinking there's not too much left to do.

I opened my image editor and began to mock-up some graphical designs of the game.


First mockup

This was the first design I was happy with. But after having discussed the art with a friend, Scott Hilbert, we came to the conclusion that the stones needed some shading. So I added shadows to all rocks.


Second mockup - Much better!

After the second mockup I knew the look I was after and I had an algorithm I used to create the rocks (a step-by-step system in Photoshop), so that way they would have a uniform look and I would be able to create the rocks more quickly. Creating the first version of all the art did take some time, but damn I felt happy to see the prototype alive with the new art. Gave me a huge kick of motivation!


Here's a picture of the final design running in the prototype.

"We are the Androids. And we're here to take over your world!"

The level editor had most features implemented and now the final challenge was to get the prototype ported and turned into an Android game. I divided the Android application into three logical parts: The world, the physics and the game. The world had the loading and displaying code for the levels, the physics handle the physics and the game handled all the game logic. These parts where implemented as static classes. I kept as many things possible static as it's a good trick to speed up Java applications. Speaking of optimizations, a mistake I did was to redo the physics code to use fixed pointed math because the Google Android documentation recommended this, as all phones might not have FPUs. This took time, was frustrating and I do not think it had a positive impact on my entry, as the testers did not have any real devices to test the applications on anyway. I changed it back to floating points when I did my iPhone port - lesson learned.

Truth be told, porting it to Android from C# .Net was super easy, as Java and C# are so much alike. When I first got to see a level of my game running on the Android emulator it was a big relief! I knew I could pull it off to get this game done in time for the Google Android Challenge's deadline.


Alive on Android!

The Power of Rituals

With only around 2 - 3 weeks until the deadline I had to start the "content factory" and produce all the levels and other content needed for the game. Luckily I did not have to spend many hours in university so I could spend a lot of time on the game. Now I want you to listen carefully! I did something that made me super effective during these weeks. I did exactly what Eben Pagan said he did to get himself productive. Each day during the last weeks of development went more or less like this:

  1. Got up early
  2. Drank half a litre of water
  3. Went for a 2km run
  4. Came home, took a shower and meditated. With meditation I mean I sat still for a while and listened to my breathing
  5. Ate a healthy breakfast
  6. Worked on Asterope, had lunch sometime in between work sessions and also went out for walks if I felt unproductive
  7. In the evenings I did my best to not work on the game. I exercised and kept social to rejuvenate
Eben Pagan talks about how the first hour you're awake defines the tempo of the rest of the day. I believe him. I worked like a machine on Asterope these final weeks, but I took time off in the evenings to see friends and spend time with my girlfriend. It's intuitive to work like crazy if you have a tight deadline, but it's more productive if you work in chunks of focused time and actively rejuvenate in between, at least in the long run! Plus it increases your quality of life.

The deadline approached quickly but I had a clear picture of what I needed to get done and also what I would leave undone. The final version lacked a few major feature such no audio, some level balancing issues and some of the memory management was done really badly as images got released and reloaded shortly after. But the game worked and you could play it from start to finish and I felt it was the best game I had done. I was pleased. I mailed Google the entry and eagerly awaited the result.


Scott Hilbert helped out and did some amazing art for Asterope!

Three Feet from Gold

And so the result came: "We regret to inform you that your entry was not among the top 50 submissions". I was not super surprised as I had heard they had gotten around 1700 entries. I still did feel it was worth while none the less as I learned to be productive! I had gotten another game done to put under my list of accomplishments. Later when Google announced the Top50 to the public I was a bit disappointed to see that none of the entries were regular games, there were a few that had some sort of gameplay built in, but not like your average game. So games were not what they were looking for apparently. However, it pleased me to hear I was among the top 25% - the only feedback Google gave from this challenge.

Although I felt okay with not being among the Top50 one could consider it a failure when I did not win anything, right? A friend of Eben Pagan and brilliant man named Jeff Smith, talks about how one of the biggest mistakes we make is that we have a result as a goal. We can never commit to a result; the result is the by-product of our actions. Focus on your action.

A lesson I learned from reading "Think and Grow Rich" by Napoleon Hill helped me to continue although I did not get any profit from my game. It was a story about a man who literally stopped three feet from gold. A man named R. U. Darby was mining his new goldmine and it gave some good results for a while, but then it stopped producing gold, and after a while of digging without results Darby gave up. Some expert miners bought the cave as they knew it's typical to have a dry spot in between gold findings. They only had to dig three more feet to find more gold. R. U. Darby lost millions, but he learned a lesson and later in life when he became an insurance salesman he did not stop when his potential customers said "no thanks". He became a very successful salesman and most of his sales came after his prospects had already said no. So keep going - behind every failure is a success ready to be had! I kept going and took my game and ported it to the iPhone.

"Hi I'm a PC... using a Mac"

After the iPhone SDK was released I instantly knew that I had to port my game to the iPhone. I could not let Asterope sit still and collect dust on my hard drive. I had a buddy who was kind enough to lend me his Mac Mini, but I was working full time during this summer period so I could not get myself working evenings too. Programming for more than 10 hours a day is too much. I knew I would get time to work on it after this summer was over and my summer job had ended so I decided it was better to put the thought on hold and enjoy the summer. When I visited Italy in August I got myself an iPhone. Italy has legally unlocked iPhones for sale and I'm your typical gadget freak so I got it without blinking although it was not cheap. I instantly fell in love with the device, it had the most beautiful UI I had ever seen on a phone. And it just worked! I've had seven Nokias in the past but never have I been as impressed with a phone as I was with the iPhone. It's just a huge step forward from anything previously on the market.

In late August I had the iPhone, a Mac Mini to develop it on and time to make it happen. Time to roll up my sleeves. I could not let myself pass on this opportunity. And I tell you it felt almost scary knowing I might have everything I need to make a commercial game with potential to make a lot of money.

I won't discuss the details of developing for the iPhone. I'm a bit unsure of the NDA so I better keep my mouth shut. This article is not about coding anyway, it's about how you can turn an idea into reality. However I'll tell you this, I had not used a Mac before I began porting and importing my game and I got my first playable level working on the iPhone in only three days. But I did get into a huge fight with OS X and its ways of doing things and I ended up porting the game from Java & Android to C & OpenGL using Visual Studio. It was easy to get the C & OpenGL code ported and working on the iPhone. After having worked three weeks in OS X I did get used to the basics and found a few things done smarter than on Windows. I'm looking forward to making another iPhone application.

Friends With Benefits

I'm not a great artist and I don't know how to do sound or music so I had to pull in some favors. It helps to have friends with great talent! Scott Hilbert did the most amazing art, a guy named Kai Saksela did three perfectly fitting background tunes and Andrew Russell did an additional masterpiece of a background tune. I bought the sound effects online, you can find really cheap sounds and I got 175 sound clips from The Game Creators. I found most of the sound effects that I needed in this collection but had to Google some royalty-free sound effects to get a few a sounds I wanted for special occasions in the game. Overall I would say that most media you'll need can be found online for a somewhat cheap price. But if you want that little extra you want your own artist and musician.

Wrapping It Up

Asterope is done and for sale in the iTunes Appstore. Don't interpret this the wrong way, but it's amazing to see your "baby" for sale! I think we owe ourselves to study self-help, there are many gurus out there who have done what you want to do and they teach how they've done it. Listen to them if you want to succeed with something. Some independent developers might be more of the engine coders type than me, but if you're like me and want to get your game done and out there, focus on getting things done rather than getting things perfect. I also recommend you keep positive people around you and that you don't listen too much to others opinions if they mock your game creation attempt. Napoleon Hill says that "Opinions are the cheapest commodities on earth!" and I try to live by this, it's easy to get too modest and go with the flow of what those around you say. Another rule of thumb that Napoleon Hill introduced me to is to make decisions fast and change them slowly.

I hope you enjoyed the read! I wanted to give back to this community after all the help it has given me. If there's anything I left unsaid please feel free to contact me at nixarn at gmail dot com.

Asterope can be found at www.AsteropeGame.com

References & further reading:

http://www.nixarn.com
http://code.google.com/android/adc.html
http://www.stevepavlina.com/
http://www.gamasutra.com/resource_guide/20030121/jacobson_01.shtml
http://www.thegamecreators.com/
http://www.stumbleupon.com/tag/eben-pagan/
http://en.wikipedia.org/wiki/Think_and_Grow_Rich
http://www.harveycartel.org/metanet/tutorials/tutorialA.html

Cancel Save
0 Likes 0 Comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!

A motivational story on how a student and part-time developer was able to complete an Android project and a port to iPhone for commercial release in less than a year.

Advertisement
Advertisement
Advertisement