Comment by wffurr
4 months ago
>> a bit as if people went for C++ instead of a JVM language "because the JVM is slow" (spoiler: it is not)
The OP is doing game development. It’s possible to write a performant game in Java but you end up fighting the garbage collector the whole way and can’t use much library code because it’s just not written for predictable performance.
I didn't mean that the OP should use Java. BTW the OP does not use C++, but Rust.
This said, they moved to Unity, which is C#, which is garbage collected, right?
C# also has "Value Types" which can be stack allocated and passed by value. They're used extensively in game dev.
You can already get halfway there with Java, by making use of Panama, even if not exposed at language level.
And lets be real, how many devs manage to sell as many copies as Minecraft?
Too much discussion about what language to use, instead of what game to make.
Hopefully that changes once Java releases their value types.
C#/.NET has huge feature area for low-level/hands-on memory manipulation, which is highly relevant to gamedev.
The core unity game engine is c++ that you can't access, but all unity games are written in c#.
And you could do that with any garbage collected language, right? You could reuse that C++ core with a JVM language.
Unity games are C#, the engine itself is C++.