游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

论述在PC平台制作iOS/Android游戏的具体步骤

发布时间:2012-03-02 15:10:24 Tags:,,

过去几天来不断有人发邮件问我如何在PC平台制作手机游戏。业内存在众多相关开发指南,我的第一直觉是通过谷歌进行搜索。毕竟我自己本身并没有涉猎这些内容;这些多半都是研究性内容。

但我相信自己能够简化这些学习指南。

Android Vs iOS from idownloadblog.com

Android Vs iOS from idownloadblog.com

步骤1:启动PC

这些步骤只针对Windows操作系统。这里所列举的软件并不适合在苹果环境中运作,但苹果用户不会碰到我遇到的这些iOS问题。

步骤2:安装FlashDevelop

我这里提到的“安装FlashDevelop”是指安装软件的最新版本(游戏邦注:作者撰稿时的最新版本是4.0.1 RTM)。这非常重要:如果你采用的是之前的版本,那么下面的步骤就完全没有意义。不要随意变更默认安装文件夹,或是安装程序所选定的子组件。

FlashDevelop是个开发IDE,和Flash CS或FlashBuilder类似,不同的之处是这一软件免费提供。安装完软件后,系统就会自动着手安装Flex SDK(免费Flash编译程序)和Air SDK(促使软件能够在手机平台运作),然后进行内部连接——帮你省下4个步骤。

步骤3:在FlashDevelop开始新项目

这个步骤简单很多。打开FD,从“Projects” 菜单中选择“NEW PROJECT”,从模版列表中选择“AIR Mobile AS3 App”。这个步骤会自动生成众多指令、批处理文件、证书目录及其他必要文件。

你甚至无需编写快捷“Hello World”应用,因为此模版会立即进行编辑。你只需点击“Project > Project Properties”,赋予应用亮粉色背景,然后点击F5,就能够看到应用在PC上进行运作。

此时,仅通过3个步骤,你就顺利安装手机设备模拟器,你可以着手开发自己的应用。

步骤4:遵循内部指令

FlashDevelop手机项目模版的优点在于其在项目目录中融入两个文本文件:

* AIR_Android_readme.txt

* AIR_IOS_readme.txt

二者都包含6个步骤,且详细告诉你如何将应用投放至手机平台。

完成这些指令后,一切就大功告成。现在你就能着手制作运作于iPad平台的游戏。

现在,这些额外的文本步骤或非常简单,或属于全新内容,令人望而却步。这里我将陈述若干相关步骤。我先从Android着手,让你初步把握整个过程:

步骤5:安装Android USB驱动器

自述文件包含一个网站连接地址,点击后你会看到这样的问题:“你持有什么类型的手机?”,然后系统会将你引至合适的下载位置。简直就是小菜一碟。

此时不要忘记打开android手机的“Debug mode” (游戏邦注:Settings > Applications > Development菜单)。

显然你只需要进行一次这样的操作。

步骤6:生成Android证书

FlashDevelop会自动在你的项目文件夹中制作“generateCertificate.bat”文件。是的,就是这么简单。这内容也只需要操作一次。

步骤7:在你的Android设备上运行游戏

将你的Android手机插到USB接口,然后在项目文件夹中编辑“run.bat” 。系统将生成这样的注释截面:

goto desktop

::goto android

::goto ios

你只需标注桌面行,取消标注android行,然后点击F5和BAM即可。

你将看到游戏在Android设备中生成。

整个过程真的就这么简单。

步骤8:iOS步骤

iOS设置过程要稍微复杂一点;它需要安装Open-SSL,以生成证书文件。你需要向苹果支付99美元,需要通过他们的开发门户获得授权文件及“手机开发规定”这类东西。

苹果担心你会直接采用编译应用,在自己的网站出售此.IPA文件(游戏邦注:跳过他们的内部应用商店)。为避免出现这种情况,苹果规定所有测试/制作中的软件需明确标注目标测试设备。这里唯一的解决办法就是通过应用商店出售应用。

“安装证书”是包含所有独特设备ID及独特游戏ID的加密文件,这些信息都处于相同位置中。在进行编译的过程中,你就需要此证书。

但所有这些设置操作只需要进行一次,无需每个计划都重复相同步骤。同样,这些步骤详细呈现在内部的自述文件中。只要遵照其中步骤,你就不会把事情搞砸。

这里的最后一个步骤就是安装iTunes,然后着手在此安装自己的应用,接着将其转移至你的i设备。我强烈推荐大家注册TestFlight;这个软件完全免费,它能够解决许多麻烦的问题,将整个过程变得更加简单,让你轻松向自己的伙伴/测试人员呈现自己的构建模型。我甚至没有在我的笔记本上安装iTunes。

出售游戏

关于Android平台,以上就是所有步骤;你只需将自己的成品投放至市场。

而在iOS平台,我们还需要进行最后一项操作。苹果几个月前决定移除他们的网页商店上传功能;你需要通过Mac将你的.IPA文件上传至开发者门户网站。但这就是全部的操作内容:上传文件。若你有朋友购买Mac设备,你可以请他帮你完成这个步骤;或许当你读到这篇文章时,PC开发者已经又想出其他应急措施。

我知道这有点令人沮丧,我希望未来这个问题能够尽快得到解决。

总结

开发手机应用只需要通过3个简单的步骤。

将应用投放至Android设备需要另外3个步骤,而投放iOS则需要5个额外步骤。

最后一个步骤就是将你的应用投入市场进行销售。

游戏邦注:原文发表于2012年1月28日,所涉事件及数据以当时为准。(本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

How to make iOS/Android games on a PC – for free

I’ve gotten a lot of EMails over the last few days demanding to know how I can make mobile games on a PC.  Some ask about Android, most ask about iOS, and everyone is all jaw-agape that AS3 code runs on these devices in some sort of native format (as opposed to in a browser instance).

Then they get all wobbly in the knees when they figure I’ve done it using completely free software.

There are plenty of (IMHO: Over-complicated) tutorials out there, and my knee-jerk reaction is to just … well, LMGTFY. After all, I didn’t divine this knowledge myself; it came with a  bunch of research, and thankfully following the path of other people.

I think I can simplify most of the tutorials though. Check it out.

Step 1: Boot up your PC.

These steps are for Windows operators only. The software listed here doesn’t play well in Apple environments, but then again, Apple users don’t have a lot of the iOS-related problems I do in the first place.

Step 2: Install FlashDevelop.

When I say “install FlashDevelop” I mean for you to install the latest version (4.0.1 RTM at the time of this writing). This is important: the next few steps don’t make any sense if you go even 1 version older. Also, don’t mess around with the default install folder, and don’t mess around with what sub-components are selected in the installer.

FlashDevelop is a development IDE, similar to Flash CS or FlashBuilder, except this one is free. After it installs, it also goes ahead and installs the Flex SDK (free flash compiler) and the Air SDK (the magic bit that makes it work on phones) automatically for you, and then links it all up internally – saving you like 4 dozen more steps.

Step 3: Start a new project in FlashDevelop.

This one’s easy. Open up FD, select “NEW PROJECT” from the “Projects”  menu, and select “AIR Mobile AS3 App” from the list of templates. This is the magical step that will auto-generate for you a bunch of instructions, batch files, certificate directories, and everything else you’ll need to get going.

You don’t need to even bother writing a quick “Hello World” application, as this template should compile immediately for you. Just hit up “Project > Project Properties” and give the app a bright pink background, then hit F5 and watch it run on your PC.

Yup, at this point, only at Step 3, you’ve already got your mobile-device-simulator installed (a cheap AIR projection version anyway), and you can start developing your application.

Step 4: Follow the included instructions.

The best part about FlashDevelop’s mobile project template is that it includes two text files in your project directory:

* AIR_Android_readme.txt

* AIR_IOS_readme.txt

They’re both around 6-steps long, and in painstaking detail (with web links, references, and cited blogs) tell you exactly how to get your app working on your mobile device.

After following those instructions, you’re DONE! That’s it! You are now making games that compile and run on the precious iPads of the world.

Now, those extra text-file steps can be easy (if you’ve setup certificates and things before, or have your phone drivers installed), or they can be new and intimidating. So I’ll outline some of those steps here. I’ll start with Android to give you a baseline of what the experience could be like:

Step 5: Install your Android USB Drivers.

There’s a link included right in the readme file to a website that just asks “What kind of phone do you have?” and points you to the appropriate download location. Easy as pie.

Don’t forget to turn on “Debug mode” on your android phone at this point (Settings > Applications > Development menu).

Obviously you only need to do this once.

Step 6: Generate an Android Certificate.

FlashDevelop automatically made a “generateCertificate.bat” file in your project folder. Run it. Yes, it’s that easy. And yes, this only has to be done once as well.

Step 7: Run the game on your Android Device.

Plug your Android phone into your (rear) USB ports, then edit “run.bat” in your project folder. There’ll be a little commented-out section that says:

goto desktop

::goto android

::goto ios

Just comment out the desktop line, un-comment the android line, hit F5, and BAM.

You’ll see your game fire up on your Android device.

I am serious, it is REALLY that easy.

Step 8-ish? iOS Steps?

iOS setup is a teensy bit more work; it requires the installation of Open-SSL (or an equivalent if you don’t already have one installed) for certificate generation. And it requires you to pay $99 to Apple if you haven’t already, and requires you use their development portal to generate keyfiles and things called “mobile provisions.”

You see, Apple is terrified you will take a compiled application, and put the .IPA file up for sale on your own website – circumventing their internal app-store. To get around this, they require that all your beta/in-progress software specifically list each device you are intending on testing it on. The only way around this is to sell the app through the app-store.

A “provisioning certificate” is an encrypted file that contains all the unique device IDs, and your unique game ID, all in one place. When you compile you’ll need this certificate.

But, you only have to do all that setup once, and not necessarily per-project. And again, those steps are clearly detailed in the included readme file. Take it step-by-step and you won’t mess anything up.

The final step here could be you installing iTunes, and trying to install your app there and transferring it to your iDevice. I highly recommend signing up for TestFlight instead; it’s totally free, and it removes a dozen headaches and makes this whole step way easier, and allows you to easily distribute the builds to your partners/beta testers. I don’t even have iTunes installed on my development laptop.

Selling your Game

For Android, there’s not really any extra steps here; just upload your finished product to the marketplace. Done!

For iOS, there is one unfortunate final step. Apple decided to remove their webpage-based upload-to-app-store feature several months ago; you do need (at this time) access to a Mac simply to upload your .IPA file to the developer portal. But that’s all it is: uploading a file. If you have any friends that own a Mac, you can just beg/plead them to do it for you; or maybe by the time you are reading this, us PC developers will have finished writing another work-around.

Frustrating, I know, and I hope this won’t be a problem for much longer.

To sum up

It takes 3 very easy steps to get started developing mobile apps.

It takes 3 additional (very easy) steps to get starting pushing it to Android devices, or 5 additional (annoying) steps to get it pushing out to iOS devices.

And one final step to sell your application in the marketplace.(Source:andymoore


上一篇:

下一篇: