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. Does the Android device need to have AIR installed?

  2. No, as of AIR 3.0 (we are at 3.1 now) it is not required. FlashDevelop includes a batch file that will automatically install it for you, and this lets you run your game on your phone WHILE debugging it on your desktop, which is amazing, so I still use it for dev.

    But then a flip of a switch and it compiles to a stand-alone (store-ready) version.

  3. Great post, spread the word :) I can’t believe more people don’t know this.

    The final submission requiring OSX is a pretty douchey move by apple… I bought a $500 MacBook from eBay, it’s sole purpose is uploading IPA’s to iTunes :/

    Prior to that, I was using OSX on VMware, and that works too, but I wasn’t able to get it running on my new PC….

    You used to be able to submit IPA’s through the iTunes Connect portal, but around the time that Adobe announced the iOS Packager for windows in 2010, they pulled the web based upload… funny timing ;)

  4. Thanks a lot for the easy steps. I’ve been wondering about seeing how Flixel works on iOS these days, after I heard it was super slow in earlier versions of AIR. Now the idea of finding out isn’t gonna be a year of nightmare labor! Or maybe it is. We’ll see.

  5. Blitting is a performance workaround for desktops. GPU rendering mode on the mobile platforms works around this way faster than blitting does, so using flixel/flashpunk is kinda painful actually (blitting is faster with CPU only rendering though).

    I’ll have a post about the method I use shortly.

  6. I’ve known FlashDevelop for a while and was aware of the ability to generate AIR applications. BUT I haven’t tried the 4.0.1 until last week and got amazed by this new feature and the AIR project template.

    I’ve not dwell on that territory yet, but being a mobile developer for a while, I’m curious, how do we handle all that “gotachas” you mentioned the other day? I’ll still Google it when I have time, but, just for curiosity, and you don’t need to be too specific, how is it done? All those events trigger a pausing event?

  7. @Alvaro: It’s just simple housekeeping stuff, but yeah – pause the game when it’s swapped out, handle all the different orientation events (even if “handle” means “disable”), dynamically altering the framerate to save battery life when you don’t need 60FPS (eg: menus), things like that. :)

  8. If you don’t want to buy a Mac, you could rent a virtual one for cheap. :)


  9. Hi there, can Galaxy Y be used as well?

  10. I don’t see why not. :)

  11. Hi Sir. Actually my question is the same with the lasr one. Can i use galxy y or lower version of android as adobe doesnt support galaxy y. Hope for your response and help. Thanks alot

  12. I really liked the article, since I’m looking to develop some apps for Android but I don’t want to install a whole new Android SDK especially since I’m more familiar with ActionScript 3.

    But I have one question: when I compile a stand-alone APK, does the end user need to install the AIR runtime on his/her device? Or is it only some step requred in development? Because it sounds really inconvenient to trouble the user with this step.

  13. Heya,

    All the files required for android development are included with the install, but I’m pretty sure it’s just Adobe AIR and it’s all built-in to it’s own compiler, so don’t worry about that part.

    having the runtime on your device aids in debugging, and FlashDevelop has a quick batch file that does the install for you if your device is plugged in via USB (which you’ll need to debug anyway). But this is not required for the end product since AIR 3.1.

  14. so, if i don’t have mac, i can’t upload my app to appstore?
    is there any other solutions? maybe on open source framework?

  15. There’s only two ways I know of so far, en_kawai:

    1. get a friend to upload it for you on their mac
    2. use VMWare or something similar

  16. hi i wont ask just can i do my GAME by blender http://www.blender.org/
    Thanks for answer :)))

  17. This article looks interesting, to tie AS3 with Blender: http://www.blendernation.com/2008/01/22/blender-actionscript-exporter/ , but I haven’t done it myself so you’re on your own!

  18. If you get a self-signed certificate for Android, anybody who installs your game will see a prompt saying that “this software comes from an unknown publisher” correct? So to get around that, you’d need a certificate from a trusted authority… Is it possible to use the certificate provided to you by Apple, to sign your Android version as well? Or is there some limitation where you MUST purchase a separate certificate for your Android version?

  19. If you want to put your android app on the Play store, you have to pay the android-store fee (I think it’s $20/year? I could be wrong there) and then you get a free properly-signed cert.

  20. Awesome, thanks for the quick response!

    • there is an easier way if your looking for some testers before you pay that 20 a month. Get aptoide and you can put it on there for free! there are plenty of app stores that you dont need to pay for to put your app/game on there.

  21. Hi all, I know this is an older story, but I have been hunting for a way and maybe you all can help.
    I want to know if I can import flash games I have made in to any program that will convert it to be able to play on android tablets?

    I just want to know if the Flash part of Flash developer means they are compatible in such a way?

  22. The Adobe AIR compiler takes a .SWF file and converts it into an android file, yeah. And iOS.

    There are “Gotchas”, though. It won’t convert the resolution to fit; it won’t arrange the UI to be useful; it won’t convert all the flashEvents to work with a touchscreen. You have to grab your source code and make a version specifically for it.

  23. Everything seems to work fine. Can the last step which packages the file for upload be donw completely on the PC, do you have to have the adroid device connected to create the final project files?

  24. When I try and start Flash Develop it crashes. Im using XP, any idea of its not supported or something? Thanks, Thomas

  25. Is it possible to build for Android from Linux? Or batch files mean Windows only?

  26. thanks for the steps really helpful :D

  27. Absolutely knew to any of this. Thought it would be to a cube, circle or any object.
    I got the pink background like you said however I cannot get the words “hello” to pop up or anything.
    Do I do this on the main page builder, or where at??

    Also is there a link you could give for AS3 coding? As I have done minimal HTML coding before.

    Thanks, Calvin.

  28. This tutorial is excellent. Thanks so much for laying it down in simple and concise steps without getting bogged down in largely impertinent details. This was really helpful. Thanks again.

  29. Have you ever thought about including a little bit more than
    just your articles? I mean, what you say is valuable and everything.

    Nevertheless think of if you added some great graphics or video clips to give your posts more, “pop”!
    Your content is excellent but with pics and video clips, this blog could definitely be one of the
    very best in its niche. Excellent blog!

  30. You forgot that Android developers must pay $25.00 USD to Google, via Google Wallet, to upload their apps to Google Play. However, this is a one-time fee, unlike Apple’s $99/year nonsense.

  31. How do you design your game/app? Im looking to make a game like temple run but im curious if this would be easier than the long hard way ive been doing it. If im creating a game with good graphics how would i be able to design the people, area, etc…

    Please help if you want to see Temple Run Worlds on the market!!!!!!

  32. is this with no coding

  33. Hi, whenever I click f5 after commenting goto android. it says certificate not found. But I already clicked createcertificate.bat. What should I do?

  34. Ok I fixed the last problem that I asked about but now when I press f5 it says apk creation failed. Could this because I am trying to run it on a tablet?

  35. I am new at all of this and I have wanted to learn how to make a game for ages but I have followed your steps up to pink background and hit F5 but then is comes up with a window saying “No SDK description found what is best to do next and why. I would really appropriate the help. Thank you

  36. sir do you have some simple codes that you can show to us??

    just like a simple game?

  37. Finally! Game development industry, here I come!

  38. thanks so cool

Sorry, the comment form is closed at this time.