Coming soon - Get a detailed view of why an account is flagged as spam!
view details
4
What is the most code efficient way to make a program cross-platform?
Post Flair (click to view more posts with a particular flair)
Post Body

I am entering a project term at my University and we must make a program for our client.

Ours we were assigned is a remake of an old game, but our target platforms will be Mac, Windows, Android and iOS.

By code efficiency I mean in terms of reusability. Not having to remake it 4 different times and, ideally, only needing to make logic changes in one place instead of 4 times.

We are trying to figure out what the most efficient way to do this would be. Technology is not too much of an issue (as far as learning a new one is concerned), but game engines such as Unity are too expensive for this. We have complete free reign on how we pursue this.

Things that come to mind would be:

  • C# shared code base using Xamarin.Android for Android UI, Xamarin.iOS for iOS UI, Xamarin.Mono for Mac UI and regular C# for Windows.

  • JavaScript hybrid apps.

  • Making the logic for all of the game logic into DLL's/SO's and making platform specific UI layers that have the DLL's/SO's handle all the background business logic and and the DLL's/SO's reply back telling the UI code how to redraw itself.

I'm just wondering what are considered the most efficient ways to go about making a multiplatform 2D game is as far as code reusability is concerned.

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
47,706
Link Karma
3,451
Comment Karma
44,141
Profile updated: 6 days ago
Posts updated: 10 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
9 years ago