2

I was playing one of my favorite games from Supercell, and I imagine it’s a rather complicated game, and it stems across the two main mobile platforms.

My question is, do the developers write the game logic twice? I’ve never developed games on iOS or Android applications, so my knowledge on this is limited.

Do companies really hire two sets of teams that not only create the application, but then make sure key aspects of the game are maintained and updated in sync?

I doubt anyone will be able to give me an answer to the specific company I mentioned above, but maybe something similar?

6

Three words: cross-platform compatibility.

If you write your game in HTML and Javascript, it will run on any platform where there is a web browser on the device (which is most devices nowadays). If you write it in Java, it will run anywhere there is a Java runtime installed.

If you write your game to target specific platforms, you will have to write it again for each platform. The advantage is that you can tailor your game to take advantage of features native to the platform, and generally obtain the best possible performance.

Some toolkits, like Xamarin, allow you to write your game once while still taking advantage of some native features of each platform.

3
  • 5
    In particular, it would make perfect sense to split the game logic from the user experience, so that you implement the game logic once in a portable manner, and implement the user experience for every platform to take advantage of platform specific features. Mar 9 '20 at 8:50
  • Is there any typical pattern that is used among these types of games? I find it intriguing when I am playing a game on say an iOS device against another player using an Android device. Your answer was perfect!
    – MZawg
    Mar 9 '20 at 16:44
  • You can play the same game against players using different devices because all of the devices use the same "protocol" to speak to the game server or to each other. Mar 9 '20 at 16:50
3

In ye olden times yes, you would write the game logic twice.

But in the modern era there is no need to write the game logic twice as instead you would target your game logic against a third party game engine such as Unity or Unreal Engine which has already been ported to your favorite mobile platform. In that way you hire people with your preferred game engine experience.

However you will need specialists that know how to interface with the UI of your favorite mobile platform, but that is totally separate from your game logic, and should be a minor aspect of the game itself.

3

Now there is no need to write code twice.

you can use language which provide cross-platform compatibility.

you can use Flutter ,Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.

you can use Unity for game development.Unity is used to create both 2 and 3-dimensional games for consoles (Xbox, PlayStation, etc.), desktops (Windows, Linux, macOS), and mobile (Android and iOS). The engine primarily uses C# for coding.

you can use JavaScript Engines To Develop Mobile And Web Games.you can use Phaser,Pixi.js,Babylon.js,Cocos2d etc.

1

There are also various other languages like Haxe that provide cross-platform capability, with or without the use of JavaScript. Other languages are very quickly following suit, such as Apple's "Swift." Google (of course ...) has recently introduced a powerful cross-platform mobile engine.

Part of the reason for this, I think, is that all mobile devices are both becoming very powerful and are converging in their essential hardware designs. While some people will continue to buy cheap phones in supermarket checkout lines and expect your game to support them, I think that's disappearing fast. As we write more games and get better at publishing them, the tools we use are becoming cross-platform quite naturally.

1
  • Hey mike, really good points here too. I think most of the answers are really stemming around cross platform compatibility. I wish I could select them all as answers :(. I really love this input though. You guys provide such solid insight and knowledge. Not sure where’d I be without all the people that respond to questions even if the answer is already selected. Thanks again!
    – MZawg
    Mar 10 '20 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.