Is there a technology which makes it possible to develop a game for Android, iOS and Web simultaneously?

845 Views Asked by At

As the topic states - is there any technology that would let me write code for a simple commercial 2D game which could be then compiled to work well on Android, iOS and Web browsers or at least two of them (e.g. Android and iOS)? There is so much buzz about cross-platform nowadays that I was wondering if I'm missing something.

My goal (set by my producer) is to make this game for all of these three platforms, and so far I planned to use: - Web browsers: Adobe Flex, - Android phones: Java (since my favourite C++ is recommended only for short snippets), - iPad/iPhone/iPod: Objective-C (are there any alternatives?).

It pretty much means re-writing the same source code three times. Is there any way to speed it up by using a technology that would work on at least both of them? However, I don't want to use Adobe Flex for all three (though it's possible), because it requires Adobe AIR (works only with Android 2.2 and higher) and not a lot of phones have it (it's totally different with browsers where 98% of people have Flash).

I don't mind adding some platform-specific code for each version, of course.

Also, if you have any suggestions about choosing a fancier technology for any of the platforms (maybe some nice frameworks?), I'd really appreciate that, too.

6

There are 6 best solutions below

0
On BEST ANSWER

I would like to say that Multimedia Fusion was capable of doing this, but it isn't quite ready yet. There are currently a number of runtime exporters for the product which allow you to export your game to multiple target platforms which include flash, java and iOS at the moment. XNA and Android exporters are currently in the works. I should probably mention that I am only affiliated with these guys as a happy consumer of their products. It is probably worth checking it out even if they can't do everything you want yet. If it's not suitable for your needs it is still a very good choice if you wish to rapidly prototype your application.

See:

http://www.clickteam.com

On a side note, personally I would recommend against going down the js+html5 route, particularly if you are targeting mobiles. I should probably stress that it's simply an opinion I have and that there are plenty of people here who will disagree with me. In all javascript games I have played, I have felt the garbage collector. The issue is that without control over garbage collection it is free to run when it feels like, causing infrequent but very obvious pauses in the middle of your game. You can work around this but I don't see why it should be that difficult. I can definitely align with the ideals of being able to write the thing once and run it on all platforms, but I can't see it working just yet.

To offer some advice assuming you find no suitable tools for the job, your aim is to maximise reusability. This means all of your games resources and levels should be well defined as independent resources. For non-critical logic you can make use of embeddable scripting languages such as Lua, which will maximise your code reuse. C (or C++) code will also be reusable on a lot of platforms, and might be a good choice if you are familiar and confident with the language.

0
On

I'm personally using Phonegap and Zepto.js. But you may have more luck with jQuery mobile. Phonegap is nice because its website will compile the apps for you.

0
On

1) If you write your game in C++ you can use it for iPhone & Android (NDK) as well. Preferably, you write your game engine in C++, than you can use a OS specific layer for UI stuff..

2) Implement your game in HTML & Javascript. iPhone/Android users will have to use a webbrowser to play your game. For iPhone, you can even create a launcher, that looks like an app, but actually is a webview with HTML & Javascript

0
On

Take a look at Corona and Moai both are Lua-based frameworks for game development targeting multiple platforms.

0
On

Unity3D should be able to do this for you, if you purchase some extra sprite addins to handle 2D (like Ex2D or SM2 or Toolkit 2D). Also right now until Apr 8, the iOS and Android license is free.

0
On

Game Maker Studio. It has a package that let's you deploy on all of the platforms you outlined.

http://www.yoyogames.com/gamemaker/studio