Sign in to follow this  

multi-platform mobile phone development

This topic is 1877 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all,

Relatively new here, but I've developed a few games in my time. My most recent effort was an Android turn based civilizations building game [url="https://play.google.com/store/apps/details?id=com.napoleonicmonkey.island"]https://play.google.com/store/apps/details?id=com.napoleonicmonkey.island[/url]

Now I was happy with the development process overall - enjoyed coding in Java and Eclipse once I got used to it. However I would love to be able to sell it to iPhone too. Heard plenty of people say that Apple users are more willing to download, and even pay. I'm not counting on it, but it would be nice if people actually played my games :)

My question is: has anyone used any multi-platform engines? What would be the easiest way to code my game once and port it for a few engines?

My first thought was to build an interface class for screen refreshes, input, sound, file management etc. From this I could connect a system-dependent class, that does all the work communicating between my core game and the underlying OS. However, once I thought about it I'm not convinced it would work - I'd still need to translate my code into the OS preferred language (eg translate from Java for Android to C for iOS). And I'm not very familiar with iOS, but imagine the general program architecture could be different to Android.

This left me looking for alternative libraries. I've had a quick look at Marmalade, which sounds very expensive to get into. Also looked at PhoneGap. But it's hard to get a feel for them until you've tried them.

So has anyone used one of the multi platform libraries? It sounds like they are mostly based in Javascript - which I also don't have much experience with :S I'm not sure they're designed for games either - look like they're mostly targetted at web developers looking to launch website tie-in apps.

Share this post


Link to post
Share on other sites
iOS users does indeed seem to use their phones more (They make up for far more of the web traffic, download more apps and buy more apps), it is likely due to the different demographics.

Personally i'm using Unity but its not free for mobiles, ($400 per platform for mobile support in the "free"(not so free once you add mobiles) version or $1500 per platform for pro).

PhoneGap is pretty much a html/javascript container so for packaging webapps on phones its great, for more advanced games i've found it to be far too slow.

Marmalade looks good and is cheaper than Unity, (it does seem to be lower level aswell, which can be both a good and a bad thing).

a final option could be to write the app primarily as a C or C++ module which you can then load into a fairly barebones app on both Android and iOS.

Share this post


Link to post
Share on other sites
I'm actually reading a cool book about Android/iPhone Game/Graphics programming called "Game and Graphics programming for iOS and Android with OpenGL ES 2.0", by Romain Marucchi-Foino. It comes with an open source C++ cross-plattform SDK.

Share this post


Link to post
Share on other sites
The forum FAQ lists the major cross-platform phone game engines.

All of these are game-oriented.

Unity3D multi-language ($400)
Ximarin C# SDK ($400)
appMobi HTML5 - Javascript (SaaS subscription)
Marmalade C++ SDK ($150)
Dragonfire C++ SDK ($100)

I know Unity is popular, as is Marmalade. The others also have their own followings.

I don't know of any other significant cross-platform engines that hit both iOS and Android. If you know of any significant engines, let me know and I'll add it to the FAQ.

Share this post


Link to post
Share on other sites
[quote name='frob' timestamp='1346095806' post='4973878']
The forum FAQ lists the major cross-platform phone game engines.

All of these are game-oriented.

Unity3D multi-language ($400)
Ximarin C# SDK ($400)
appMobi HTML5 - Javascript (SaaS subscription)
Marmalade C++ SDK ($150)
Dragonfire C++ SDK ($100)

I know Unity is popular, as is Marmalade. The others also have their own followings.

I don't know of any other significant cross-platform engines that hit both iOS and Android. If you know of any significant engines, let me know and I'll add it to the FAQ.
[/quote]

it should perhaps be noted that Unity3D and Xamarin are $400 [b]per platform[/b] (so $800 in the OPs case). (From what i understand Unity3D uses Xamarin for mobiles aswell which is the primary reason for the $400 per platform pricetag even for the otherwise free edition of Unity3D), Marmalade is $150 for both iOS and Android or $500 for All platforms (not sure which other platforms are supported) , DragonFire is iOS only (But lets you develop for iOS without using a Mac). Edited by SimonForsman

Share this post


Link to post
Share on other sites
Cocos2d-x. Cocos2d-x is a reimplementation of the Cocos2d API but to C++ rather than ObjectiveC for cross-platform specifically targeting Android (and iOS obviously). It's free ... its biggest problem is documentation, tutorials, and such kind of suck or are non-existent. Edited by jwezorek

Share this post


Link to post
Share on other sites
[quote name='jwezorek' timestamp='1346096953' post='4973890']
Cocos2d-x. Cocos2d-x is a reimplementation of the Cocos2d API but to C++ rather than ObjectiveC for cross-platform specifically targeting Android (and iOS obviously). It's free ... its biggest problem is documentation, tutorials, and such kind of suck or are non-existent.
[/quote]I'll update the FAQ. Thanks.

Share this post


Link to post
Share on other sites
Thanks guys. Will look deeper into trying Cocos2d-x - what's not to like? It's free and uses common C++ (no need to learn objective-C) :)

Have found a few good tutorials that I'll try.
[url="http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started"]http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started[/url]
[url="http://www.raywenderlich.com/11338/cocos2d-x-for-ios-and-android-space-game"]http://www.raywenderlich.com/11338/cocos2d-x-for-ios-and-android-space-game[/url]

If it doesn't feel right I'll look into another option. But for now it sounds ok (if not a bit fiddly to get Eclipse and XCode working together).

Share this post


Link to post
Share on other sites
[quote name='NapoleonicMonkey' timestamp='1346191273' post='4974251']
Thanks guys. Will look deeper into trying Cocos2d-x - what's not to like? It's free and uses common C++ (no need to learn objective-C) [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Have found a few good tutorials that I'll try.
[url="http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started"]http://www.raywender...getting-started[/url]
[url="http://www.raywenderlich.com/11338/cocos2d-x-for-ios-and-android-space-game"]http://www.raywender...roid-space-game[/url]

If it doesn't feel right I'll look into another option. But for now it sounds ok (if not a bit fiddly to get Eclipse and XCode working together).
[/quote]

The only problem with cocos2d-x is that the project is relatively young and its authors are pretty clearly speaking English as a second language so communication in the forum and elsewhere can be difficult, but mostly you can figure stuff out on you own.

Share this post


Link to post
Share on other sites
[url="http://gamekit.org/forum/"]http://gamekit.org/forum/[/url]

c++ might not be for you? For Java this comes in mind:

[url="http://code.google.com/p/libgdx/"]http://code.google.com/p/libgdx/[/url]

Anyway html5 might be interesting. Edited by derda4

Share this post


Link to post
Share on other sites
develop your games in [url="http://www.microsoft.com/en-us/download/details.aspx?id=23714"]xna[/url] then make different ports to other mobile platforms using [url="http://monogame.codeplex.com/"]monogame[/url]. With monogame you can write games for multiple platforms using the same c# code you used to make it in xna Edited by Nicolas Brown

Share this post


Link to post
Share on other sites
[quote name='Nicolas Brown' timestamp='1346912890' post='4977087']
develop your games in [url="http://www.microsoft.com/en-us/download/details.aspx?id=23714"]xna[/url] then make different ports to other mobile platforms using [url="http://monogame.codeplex.com/"]monogame[/url]. With monogame you can write games for multiple platforms using the same c# code you used to make it in xna
[/quote]
He will be spending alot of money that way though.

Lets start with $99 for the windows phone 7 developers license. Another $99 for the iOS dev license. He already has the relevant google license so it good there. Monogame requires monotouch (iOS) or monodroid (android) in order to function. These are $399 each. Thats $996 all together.

Share this post


Link to post
Share on other sites
[quote name='Zul' timestamp='1347715450' post='4980364']
Corona is another one:

[url="http://www.coronalabs.com/"]http://www.coronalabs.com/[/url]
[/quote]

This is what I'm using. I'm extremely happy with Corona in all aspects (money / business model, stability, speed, language of Lua, simple yet powerful API, online documentation, compatibility across many mobile platforms).

To put it in perspective, I've put in just 5% of my time on learning the language and API. 95% of my time has been into what it should be -- game design, business aspects, art/asset composition and actual game programming.

For my project it is perfect. I can't comment on any 3D aspects however as I only use 2D.

Share this post


Link to post
Share on other sites
One important thing to consider when choosing a cross platform libraries is how much cross platform functionality they support. Many use alternative languages or don't support the full platform feature set. Others like Ximarin allow you to have a common code base but still require you to build platform specific UI Layers. Also if you are using any third party libraries in your app they may not work with the new library.

Ximarin is the one I'd consider mainly because I've got a c# background and I know how powerful c# and visual studio is. And it supports the full features of iphone and android. The main problem is $800 you'll need to pay to for the 2 licences. But even then its only useful if you design your architecture accordingly so that there is proper separation of the different layers and the correct design patterns are used.

Share this post


Link to post
Share on other sites
[quote name='starbasecitadel' timestamp='1349736119' post='4988146']
[quote name='Zul' timestamp='1347715450' post='4980364']
Corona is another one:

[url="http://www.coronalabs.com/"]http://www.coronalabs.com/[/url]
[/quote]

This is what I'm using. I'm extremely happy with Corona in all aspects (money / business model, stability, speed, language of Lua, simple yet powerful API, online documentation, compatibility across many mobile platforms).

To put it in perspective, I've put in just 5% of my time on learning the language and API. 95% of my time has been into what it should be -- game design, business aspects, art/asset composition and actual game programming.

For my project it is perfect. I can't comment on any 3D aspects however as I only use 2D.
[/quote]

I did a write-up about a month ago comparing the [url="http://www.gamefromscratch.com/post/2012/09/21/Battle-of-the-Lua-Game-Engines-Corona-vs-Gideros-vs-Love-vs-Moai.aspx"]most popular Lua game engines[/url], Moai, Corona, LOVE and Gideros. They are all great options, with different strengths and weaknesses, but Lua is just a great high level game development language.

It's one of those languages that you can learn in a weekend, then keep surprising yourself with it's power and flexibility. At it's core, it is a pretty simple language, but it is amazingly capable. Three out of four of the above languages are capable of targeting both Android and iOS, while the fourth ( Love ) has ports in the works. Edited by Serapth

Share this post


Link to post
Share on other sites
[quote name='Serapth' timestamp='1349793778' post='4988370']
I did a write-up about a month ago comparing the [url="http://www.gamefromscratch.com/post/2012/09/21/Battle-of-the-Lua-Game-Engines-Corona-vs-Gideros-vs-Love-vs-Moai.aspx"]most popular Lua game engines[/url], Moai, Corona, LOVE and Gideros. They are all great options, with different strengths and weaknesses, but Lua is just a great high level game development language.
[/quote]

Great writeup! While I'm happy with Corona for the mobile side, I'll definitely give Moai a good look. My game has 2 different interfaces. The first is of a starship pilot which is a tablet only interface. The second is for the teams' leaders (Admirals) and I'm in the middle of deciding that interface right now-- I'm torn between keeping it tablet as well or giving it a desktop PC interface instead.

Assuming I go the PC route for that, if Moai is good, it might probably make sense switching the tablet version to that too so I just need a single game engine. Plus, about half of the Admiral interface is the same as the starship interface, so it would say a good amount of code duplication.

Luckily, I only recently started the project and don't have much completed code yet. So switching game engines at this early stage is feasible. Thanks!

Share this post


Link to post
Share on other sites
I'm still looking into Moai but am leaning on switching to it.

It has 2 major disadvantages. It definitely is not as polished as Corona -- for example I had to wait several days to download the SDK due to getting various PHP errors on the site until it was fixed. Also, it has a much smaller developer base than Corona, which puts to issue how sustainable it will be. It seems backed by a solid game development company and is getting more mid-sized companies starting to get involved so I think it will be ok but that is a concern I don't have with CoronaLabs.

In terms of its low level nature, so far it seems it actually will be easier for my particular game, not harder. My game is a simulation, and it is overall more geared for that kind of game, such as having a better coordinate system. Another aspect that will make my code much cleaner is Moai supports multiple windows-- something I was very surprised not to find in Corona. Corona doesn't even have recangular sprite clipping built in though some of that infrastructure is on their roadmap and you can do somewhat inefficient hacks using SpireSheets or Masks to handle it for now. So I'm finding, much as Serapth suggested, that the low-levelness of Moai is actually in many cases a big advantage instead of disadvantage, for experienced programmers at least.

Share this post


Link to post
Share on other sites

This topic is 1877 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this