Sign in to follow this  

Unity How to target multiple platforms?

This topic is 1650 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 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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

 

cool.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Similar Content

    • By loyalsheep
      Hey guys!
      Check out the trailer of Airavat. It's a minimalist, space survival game (and hard, very hard) 
      Download on GooglePlay: Airavat
       
    • By anomalystudiospt
      Hey, we are new around here!
      Our team spent the last year developing a prototype game called Rise of The Fey, a game that focuses on a dramatic story with a fast paced gameplay.
      Rise of The Fey is a third-person action-adventure RPG set within a fantasy world called Perrah. In Rise you control Kall, a young spaunian looking for revenge after the death of his beloved.

      We would appreciate if you could take a look at our stuff, tell us what you think and possibly help us out on Indiegogo.
      The prototype is in portuguese, sorry about that!
      Have a good one!
    • By juglar
      Hi guys, we are developing a game called BiteOff! based on Zombies topic. BiteOff! is based on a game strategy mechanics, free to play, where the player has a bunch of zombies and he can distribute them along the map landscape to be able to bite and transform all humans into each level. Humans are controlled by artificial intelligence and they differ each other on capabilities based on different weapons that give them three different levels of aggressiveness to defend against the zombies. The zombies are also presented in three types and they are differentiated by their attack, speed, strength and resistance abilities. Through different achievements, (time to eat all humans, score, among others) the player can access four extra skills that can enhance your attack in real time on next levels as power-ups.
      We are launching a crowdfunding campaign in kickico and we need some helps please visit us on the crowdfunding page https://www.kickico.com/es/campaigns/17824/biteoff-the-videogame 
      Twitter @biteoffthegame
      Facebook
      Clickme!
      Website 
      Clickme!
    • By Lord McMutton
      The world of Ethios is held aloft by massive trees known as the Pillars.
  • Popular Now