Jan 282012

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.

  46 Responses to “How to make iOS/Android games on a PC – for free”

Comments (41) Pingbacks (5)
  1. [...] successfully educated at least four people that it’s possible to transfer your AS3 coding skills to mobile devices. This makes me feel really [...]

  2. [...] link just came to me from @tametick on Twitter, pointing to http://www.andymoore.ca/2012/01/how-to-make-iosandroid-games-on-a-pc-for-free/ So there you go, a free way to develop mobile [...]

  3. [...] one final step to sell your application in the marketplace.(Source:andymoore) 分享到: QQ空间 新浪微博 开心网 [...]

  4. [...] fazer o protótipo rapidamente, aproveitei que o processo para gerar o build para Android é bem simples com o FlashDevelop e dei uma [...]

  5. [...] informações que vou repassar aqui eu peguei neste post, no blog de Andy Moore, criador de Steambirds e desenvolvedor independente que adora compartilhar [...]

Sorry, the comment form is closed at this time.