我曾经开发过大量手机游戏，包括《Constantine》、《Superman: Lex’s Payback》和《The Blade of Zorro》。我在大学中学的是计算机科学，但我花在个人项目上的时间超过花在学业上的时间。本篇文章讲述的是我如何将一个想法转变成商业游戏。在这片文章中，我将尽量介绍如何开发和发布商业游戏，这是许多独立开发者面临的问题。在游戏《Asterope》的开发过程中，我截取了许多各个开发阶段的截图，以此来展示游戏如何逐渐开发完成。希望本文能够给你带来乐趣，也能够教会你些许东西！
在想法诞生不久之后，就出现了Google Android Challenge。这真是个实践自己想法的绝佳机会。如果我能够进驻前50名，就可以获得2.5万美元！这听起来真得很棒，我这么对自己说。我记得，去年12月我参加了公司的圣诞宴会。那时我刚刚离开公司，以便能全身心投入自己的学位考试和项目中。将近凌晨4点之时，每个人都喝得有些醉醺醺的。当时有人询问我下一步的计划，我将自己的想法告知他。现在，10个月过后，产品已经完成而且正等待出售。
我并没有立即开始游戏的制作。如果我没记错的话，Google Android Challenge的最后期限定在二月的最后一天。尽管游戏想法在1月份的时候已经相当明朗，但我仍然无法开展工作。在辞去兼职工作之后，我想我需要些许时间来恢复活力。活动最后期限迅速逼近，我几乎都已经快放弃了这个想法，但随后谷歌决定将最后期限延期至4月14日，也就是新SDK的发布之日。这使我燃起了斗志，开始抓住这次行动的机会！
我的开发工作就这样开始了。我很喜欢Visual Studio，觉得C# .NET是构建游戏原型和制作工具的最佳方法。因此，最终我选用Visual Studio Express Edition来制作游戏。2007年末，我已经做过些许物理测试，因而我知道绳索想法能够发挥其作用。一开始我并没有构建游戏可玩性原型，而且制作关卡编辑器。我需要的东西有：
2、我可以导入石头图片并创造碰撞样式的编辑器。将所有的石头构建成凸面体，这样我就可以使用一个称为SAT（游戏邦注：全称“Separating Axis Theorem”）的简易碰撞运算法则。
我个人最喜欢的自助讲师Eben Pagan讨论起完成某些事情的挑战时声称90%的人的动机并非目标。因而如果你属于其中的一员，如果你设定目标决定在某个时间内完成游戏制作，你会觉得自己动机不明。最好将注意力集中在小问题上，每次解决1个小问题。我们中多数人都很善于解决问题。这个想法源于Bobb Biehl编撰的书籍，名为《Stop Setting Goals If You Would Rather Solve Problems》。
事实上，将游戏从C# .Net导入Android非常简单，Java和C#也是如此。当我首次看到游戏的关卡在Android模拟器中顺利运行，这让我大感放心！我知道自己可以赶在Google Android Challenge期限到来之前将游戏完成。
尽管我个人对未进驻前50榜单感觉良好，但是有些人则认为这是个彻底的失败，因为我没有获得任何东西。精明的Jeff Smith是Eben Pagan的朋友，他说我们犯下的最大错误是将结果作为目标。我们永远不能为了某种结果而投入精力，结果只是我们行动的副产品而已，你应该关注自己的行动。
尽管我没有中这款游戏中获得任何利益，但Napoleon Hill的《Think and Grow Rich》帮助我在游戏开发之路上继续下去。这个故事讲述的是某个离金子只有三英尺之遥的人。这个叫做R. U. Darby的人正在开采自己的新金矿，开始挖出了些金子，但是随后不再产出任何金子。挖掘片刻之后，Darby便放弃了。有些骨灰级的淘金者知道这个洞穴肯定能够出产黄金，于是从他手中买走了这个洞穴。他们只再掘进三英尺就发现了更多的黄金。R. U. Darby失去了数百万，但他吸取教训，在随后担任保险销售员的职位中，他在面对潜在客户说“不”的情况下仍然永不放弃。他成为了一个很成功的保险销售员，而多数销售额来自于那些以前拒绝购买的人。所以你应该不断前进，失败是成功之母。我选择继续前进，将游戏移植到iPhone上。
iPhone SDK发布之后，我立即决定将自己的游戏移植到iPhone上。我不能让《Asterope》呆着硬盘中蒙尘。我有个好朋友愿意将自己的Mac Mini借给我开发，但这个夏天我已经有了自己的全职工作，所以我只能利用晚上的时间来开发。每天编程10个小时的时间确实非常多。我知道这个夏天过后我就有充足的时间开继续开发这个游戏，因此我决定最好先将这个想法放放，专心享受夏日的时光。8月份我去意大利时，给自己买了部iPhone。我立马就爱上了这个设备，它有着我在其他手机上从未见过的漂亮UI。我此前用过7部诺基亚手机，它们对我的吸引力远不如iPhone。它与市场上现存的手机相比，有着巨大的飞跃。
在此，我不细致阐述iPhone版本的开发过程。我对NDA（游戏邦注：即保密协议）的了解并不多，所以最好还是别说太多内容。这边文章并非教你如何编码，而是教你如何将想法变成现实。然而我要告诉你的是，在我开始将游戏移植到iPhone之前并没有用过Mac，但仅仅三天之后首个关卡便可以在iPhone上顺利运行。但是，在使用OS X时确实遇到了很大的麻烦，最终我利用Visual Studio把游戏从Java & Android导入到C & OpenGL中。使用OS X三周后，我更为了解该系统，觉得它有些地方做得比Windows要好。我期待自己的下一款iPhone应用。
我不是个出众的美工，我不知道如何制作音效和音乐，所以我只得寻求他人的帮助。这种方式让我结交到了许多有才华的好友。Scott Hilbert在美术设计方面做得很棒，Kai Saksela制作了三首与背景相符的曲调，Andrew Russell也做了个背景曲调。我从网络上购买音效，这些音效都很便宜。总的来说，你所需要的多数媒体都可以在网络上以便宜的价格买到。但是如果你想要节省成本，那么就需要有自己的美工和音乐师。
《Asterope》已经完成而且正在iTunes Appstore上出售。我觉得我们可以学习那些自助的窍门，许多人曾经做过你现在想做的事情，他们会教授你如何实现目标。如果你想要获得成功的话，就应该学习他们的经验教训。有些独立开发者可能比我还像引擎程序员，但是如果你想制作出自己的游戏，就要将注意力放在执行而不是单纯的构思。我还建议你结交些朋友，他们会为你的项目提出意见。Napoleon Hill说道：“意见是地球上最便宜的商品！”Napoleon Hill教导我的另一项原则是快速做决定，修改时则需谨慎。
Start to Finish: Publishing a Commercial iPhone Game
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.
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 of course 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.
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.
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.
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!
“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.
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:
Got up early
Drank half a litre of water
Went for a 2km run
Came home, took a shower and meditated. With meditation I mean I sat still for a while and listened to my breathing
Ate a healthy breakfast
Worked on Asterope, had lunch sometime in between work sessions and also went out for walks if I felt unproductive
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.
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. (Source: gamedev.net)