I’m thinking of making a kind of simulation game. A kind of cross between Dwarf Fortress and the Sims. But a bit simpler.
i.e. it will do things like simulate births over several generations to give the characters family history and relations.
I’m trying to think what language to use. I want it to be downloadable on PC, because I imagine this is the kind of thing PC gamers like. But I would also like the option of having it portable to mobile or tablets.
First I thought of C# and Unity or Xamarin. Since this would port to most mobile platforms. And using Unity I could get a standalone app. But C# is hard to port to anything else. There is C# native coming out soon and Visual Studio 2015 is good for mobile. C# keeps changing all the time and could end up a bloated language.
Then I thought of Javascript as the most common language and not likely to die out any time soon. It also has the advantage that you can program in the cloud. You are not tied to Visual Studio. If Flash was still alive there is the other advantage that it is similar to Actionscript.
C++ is not really enjoyable to write in anymore. And performance is not really critical for this game. Rather, I prefer a safe language.
Python, I can’t really see the advantage of using. Except that it is taught in schools, so if I made it open source lots of people would understand it.
Which language to bet on? And not regret it a year down the road??
Why should you regret it to use C# more than any other language? Every language changes over time, unless it is not anymore used. I also don’t understand what C# native has to do with this decision. Unity is developing il2cpp which you may understand as native C# as well or even native .Net. Further, if you picked Unity, there is almost no need to think about porting your C# code, because the really hard work was already done by Unity.
I have the impression that you are mixing up things regarding C# that are not relevant if you decide to go with a specific solution like Unity or Xamarin.
Well, the issue is that if I started in C sharp but then decided I don’t want to use Unity then it’s hard to port C sharp to a native application. e.g. if I wanted to use Flash instead or even Unreal. Also, if I make my games fairly modular, it would be nice to reuse my code in other environments.
And if Windows dies off in 5 years because Windows 10 bombs, I’ll be stuck with a lot of C sharp code with no .Net to run it on. OK, maybe not that likely…
To me C sharp seems a very Microsoft centred product which only really works best with Microsoft tools like Visual Studio. But if I wanted to do some dev in the cloud or on a Mac I can’t use visual studio(??) Whereas there are many Javascript and Python based IDEs sprouting up in the cloud. Also if you wanted to interface C sharp libraries with other languages you usually need .Net installed.
A pity there is no option to use Python as a Unity language. As that is also used for scripting in things like Inkscape and Blender.
What someone should invent is a Babel Fish that translates all languages into each other.
I don’t think there’s an ideal solution at present. Just looking for the least painful.
P.S.
ilt2cpp looks interesting. So that will convert C sharp into C++ code? Could be useful outside of Unity too.
Mono performance is even worse than that of .NET in the benchmarks I know off.
E.g. in this you have to scroll a while to find the first .NET entry, and even longer for a Mono entry: https://www.techempower.com/benchmarks/#section=data-r9
E.g. Python, Lua, Javascript, PHP, Ruby and of course Java and C++ handle many more requests per second than .NET.
You’d best start off with one of dozens of open source genealogy software out there. It’s a pre-designed database for you. Ignore the language and go for the one you think is designed with a nice API so you can hook into it & extend it.
If you create code in an environment like Unity, there is going to be a lot of code that is not reusable anyways. E.g. all the UI code you write is not going to be reusable. That is the case for all the code that uses any Unity specific functionality which is usually the majority.
It is usually not realistic to expect that you can write code that can be used in other environments.
This kind of statement shows more than anything else a lack of experience. You are trying to find the ultimate, the best solution which does not exist. What matters is that you know how to use the environment and that you learn to code.
Don’t think this far ahead and start by actually making the game. If your game gets enough success such that you actually need to port it to something else in a few years time then go to 2.
You can’t reuse it because you don’t develop a software that can be opened and recompiled in a C# ide or Unreal for example. It will simply not open. You develop a Unity game in Unity. Which is a closed source game engine.
And in general you cannot transfer a Unity game to another game engine without a rewrite. Unity has a very special way to deal with the assets for example.
As mentioned by @Tiles already, it will not work in any other environment. A menu is in general not that complex to build. If you think of something more complex like even an inventory that supports drag and drop from and into the game world and in the game world you also have the ability to use gestures to steer the camera. Theoretically, one could make this kind of code portable among different environments, but it is usually not worth the effort. But it will clearly not just work in any other environment.
It will be possible however to reuse most implementation ideas, but that is definitely not true for the code.
Edit: In the original example I meant code that relies on the Unity UI or OnGUI which can definitely not be reused at all.