Skip to main content
GameDev.net gamedev.net
🔒 Locked

multi-platform mobile phone development

Started by NapoleonicMonkey Aug 27, 2012 at 11:19 AM 19 replies 7.6k views
Original Post
NapoleonicMonkey
NapoleonicMonkey
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 https://play.google.com/store/apps/details?id=com.napoleonicmonkey.island

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.
SimonForsman
SimonForsman
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.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
pacobarter
pacobarter
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.
frob
frob
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.
SimonForsman
SimonForsman

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.


it should perhaps be noted that Unity3D and Xamarin are $400 per platform (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).
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
jwezorek
jwezorek
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.
frob
frob

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.
I'll update the FAQ. Thanks.
NapoleonicMonkey
NapoleonicMonkey
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.
http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started
http://www.raywenderlich.com/11338/cocos2d-x-for-ios-and-android-space-game

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).
jwezorek
jwezorek

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) smile.png

Have found a few good tutorials that I'll try.
http://www.raywender...getting-started
http://www.raywender...roid-space-game

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).


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.
Nicolas Brown
Nicolas Brown
develop your games in xna then make different ports to other mobile platforms using monogame. With monogame you can write games for multiple platforms using the same c# code you used to make it in xna
Zul
Zul
Corona is another one:

http://www.coronalabs.com/
oh hai
6677
6677

develop your games in xna then make different ports to other mobile platforms using monogame. With monogame you can write games for multiple platforms using the same c# code you used to make it in xna

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.
Turok
Turok
Moscrif is other option. Easy to learn as it uses JavaScript that most of you are already familiar with and is free to download.
starbasecitadel
starbasecitadel

Corona is another one:

http://www.coronalabs.com/


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.
TechnoGoth
TechnoGoth
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.
Serapth
Serapth

[quote name='Zul' timestamp='1347715450' post='4980364']
Corona is another one:

http://www.coronalabs.com/


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 most popular Lua game engines, 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.
starbasecitadel
starbasecitadel

I did a write-up about a month ago comparing the most popular Lua game engines, 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.


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!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.