Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!

How to target multiple platforms?

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 MikeS   Members   -  Reputation: 132


Posted 29 May 2013 - 12:11 PM

Hello GameDev Community,

I am currently developing a game framework for the Android system using Java. I have a small runtime scripting language that users can utilize to create models, move them around, and do various things.

However, I would now like to start targeting iOS applications.

So as a case study, how is an engine like Unity3D implemented? They have various scripting languages(Javascript, C#, etc.), and they can target multiple platforms.

Do they implement the same codebase on multiple platforms? For example: They have a Java codebase that implements all of the functionality needed to create android apps, and then they duplicate that codebase to implement all of the functionality they need for iOS apps, etc.

How do they deploy to multiple platforms? Are they simply translating source from a target language(C#, Javascript, etc.) and then generating Java code for Android from there Java codebase, Objective-C code for iOS from their separate Obj-C codebase, etc?

The overall theme of my question is how do I structure my codebase so that I am not duplicating a lot of work to support multiple platforms. Should I build my own VM that is deployed to each of these systems(I'm aware this will be a cost in performance)?

Thanks for your insight.

Edited by MikeS, 29 May 2013 - 12:48 PM.


#2 Buster2000   Members   -  Reputation: 1716


Posted 30 May 2013 - 01:53 AM

They have a Java codebase

generating Java code for Android

Objective-C code for iOS

They don't use Java or Objective C. They use C++.  Let me clarify that. They use the bare minimum that is needed to interact with the device.  The engine is written in C++ and the C#, Javascript are just scripting languages.


You may want to check out a few open source games engines to see how this works.  Try Cocos2d-x  or gameplay3d.  You will notice that in these engines there tends to be only a single file that provides a layer to the bare platform and everything else is cross platform code.

#3 MikeS   Members   -  Reputation: 132


Posted 30 May 2013 - 11:06 AM

Thank you for your response.  I will take a look at the gameplay3d source code and then come back with more questions. :)



#4 MarekKnows.com   Members   -  Reputation: 677


Posted 10 July 2013 - 11:03 AM

Marmalade is another development environment that targets all the mobile platforms. http://www.madewithmarmalade.com/


You can write your code in lua which gets translated to C++, or you can write it in C++ directly.  Then when you pick which platform you want to deploy on, it will generate the appropriate binary that you can load onto Android, iPhone, Windows or BlackBerry phones.

Free C++, OpenGL, and Game Development Video Tutorials @
Play my free games: Ghost Toast, Zing, Jewel Thief

#5 wodinoneeye   Members   -  Reputation: 857


Posted 12 July 2013 - 06:28 PM

Ive been investigating console/smartphones for secondary game operations for a MMORPG and one definite concern is what display and input  methods/capabilities are available (and what might be common across an adaquate spectrum of all the available hardware models)


You will hope to not have to re-code/re-test/re-debug the same code on lots of platforms  - so looking for commonality between then (and unfortunately a 'least common denominator' requirement).    Common library compatibility will be a key thing to consider.

--------------------------------------------Ratings are Opinion, not Fact

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.