8
\$\begingroup\$

Is there any way to convert a Flash games(file with .swf extention) to work with android devices? I want the game to use Android device native controls like sensor, accelerometer, etc.

\$\endgroup\$
7
\$\begingroup\$

petr's answer assumes you already know how to deploy a Flash app on Android; maybe you already know that, but you don't mention it in your question so I want to point out that you can package a Flash .swf as an Android .apk using AIR.

Once you are actually deploying your in-development game as an Android app then you get to the higher level concerns of adapting your game logic to the new input devices.

\$\endgroup\$
  • \$\begingroup\$ i am just starting on it thanks for your link i will look into it. \$\endgroup\$ – Akram May 25 '12 at 12:36
5
\$\begingroup\$

You can convert a Flash game to run on an Android device if you package it up with Adobe AIR, with the Android SDK through terminal using -apk and you can script / code in the #import features that allow you to do some native control for the game. However, from personal experience ; I've made a couple AIR / Android games and the problem with AIR is that it doesn't handle very well. I say this that you won't be able to have an "hell-shooter" with 600 things going off on screen at once. AIR handles games decently such as Machinerium because it isn't GPU / CPU intensive. Anything above a simple point and click starts to chug.

AIR won't magically convert your game. You'll have to get your hands dirty, and change a lot of things around in AS3.

AIR though, is great for making quick prototypes for mobile games though. Just download Flash-develop and it comes with automatic AIR / Android projects.

\$\endgroup\$
2
\$\begingroup\$

I don't think it's possible in some "automatic" or even semi-automatic mode. The only way is to manually convert game logic into other platform. Quite possible it will be pretty strightforward process for logic part if both games use standard game loop structure. However draw, sound and input implementation can differ significantly between platforms.

\$\endgroup\$
  • \$\begingroup\$ thanks for your ans looking forward for any other idea +1 to your answer. \$\endgroup\$ – Akram May 25 '12 at 10:58
0
\$\begingroup\$

At the time of this answer the only way of doing (I`m aware of) will result in an iPhone game trough Stencyl http://www.stencyl.com/. In the game I converted from Flash to Android we had to do as Petr Abdulin suggested and we even created our company own engine. However you can wait until Stencyl launch their Android/Html5 publishing build.

If you stick with converting yourself, which isn`t that difficult, I strongly recommend to pick andengine, CoronaSDK or other engine to help you, that will make your life easier.

Good luck!

\$\endgroup\$
0
\$\begingroup\$

Yes, you can convert swf to apk (Android), ipa (iOS) and bar (Rim) in a single pass. You can do it directly from the swf without having source (see here), but most of time you have to modify your program to handle portrait/lanscape, multitouch, et cetera.

\$\endgroup\$
0
\$\begingroup\$

As long as I understand it, You can convert an Actions script 2 .swf, if it is predefined for the size of a mobile device, so it would fit in the mobile screen. But if you have to use the mobile interaction like touch, slash, etc, You'll have to do it from scratch on action script 3.

\$\endgroup\$
0
\$\begingroup\$

It is absolutely not possible at the moment. The best results that I have seen are with Swiffy which is Google's conversion tool, but unfortunately it works only on small files, approx 1 MB which is not enough for most flash games.

The biggest challenge would be to automatically generate software buttons for touch screen from of flash game controls.

My advise is to leave it. There's no way around it. That's the best you can do at this point. Some say Chrome will drop Flash soon anyway...

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.