> Good Java programmers are better payed to write High Performance Trading systems, than working on games with their low salaries and crazy schedules.
So do good c/c++ programmers, especially now that it's increasingly rarely taught in university and there is less fresh meat coming into the industry, yet games still get made.
> Yes, there are some performance issues regarding lack of value types, but not every single game is going to be the next Crysis.
It's not just value types, it's reference indirection everywhere. You can't declare an array of objects for example, only an array of references to objects, which isn't cache friendly. There are similar issues if you want to actually use many of the features higher level languages come with. It's why java/c# will never be as fast as c.
As far as unity goes, all the heavy lifting in the game engine is still done in c/c++, c# is only used as a scripting language. As far as I understand LWJGL, it is not analogous to unity, it's not a game engine but a low level library to write a game engine with.
C# has value types, added local references and reference returns on C# 7, and they will be adding more features from System C# (Midori) in the 7.1, 7.2 and 8.0 releases.
Microsoft recently did an interview where they admitted they only cared to make their native code compilers for .NET "good enough" and are now planning on changing that.
Also .NET Native actually makes use of the same backend as Visual C++.
Java is not yet there with value types, but in about 5 years time, Java 10 will be here with them. They are also available in prototype form today for anyone that wants to play with them.
I wrote my first games on a Timex 2068, since then I have witness and took part in many variations of this subject.
Started with, no serious game programmer would use anything other than Assembly. C, Pascal, Basic, Modula-2 lack the register control, memory layouts, instruction count, ability to self modifying code that Assembly allows for.
Followed by, no serious game programmer would use anything other than C or Pascal. C++ adds too much bloat to make any game worthwhile playing.
Now he are on, no serious game programmer would use anything other than C or C++. Java, C# and other type safe languages will never perform as good as C and C++.
Fact is that the majority of games I see on the stores aren't really AAA pushing the hardware limit, many of which have graphics and gameplay that could have been done with AMOS on an Amiga 500 and people would hardly notice.
> As far as unity goes, all the heavy lifting in the game engine is still done in c/c++, c# is only used as a scripting language
Since IL2CPP got mature some of that C++ code is actually C# code. If you pay attention to the Unite 2016 and 2017 keynotes they are rewriting the not so performance critical components from C++ to C#.
Finally the programming language compilers that come with the games consoles and OS SDKs also play a big role, and games developers tend to stick with what they get with the SDKs.
> I wrote my first games on a Timex 2068, since then I have witness and took part in many variations of this subject.
Ever play text adventures? Even back then a lot of non-critical code was written in higher level scripting languages. I'll even go out on a limb and assume you know what the AGI engine is.
> Followed by, no serious game programmer would use anything other than C or Pascal. C++ adds too much bloat to make any game worthwhile playing.
We haven't moved beyond this point AFAIK, most games will use either c or the zero cost parts of c++ for the core engine.
> Java, C# and other type safe languages will never perform as good as C and C++.
For 20 years now I've been hearing java will match the speed of c one day, yet I'm still waiting. Fool me once shame on you...
> For 20 years now I've been hearing java will match the speed of c one day, yet I'm still waiting. Fool me once shame on you..
Just like C will never match the speed of Assembly and people are pretty ok with it. Also C compiled without UB optimization tricks isn't that fast.
C had 40 years of compiler optimizations, so Java still has 20 years to catch up, back in the 8 and 16 bit days junior Assembly coders could write better code than C compilers would generate.
For most people being a few ms slower doesn't matter at all, specially if they aren't playing Crysis, Battlefield or any other AAA game.
So do good c/c++ programmers, especially now that it's increasingly rarely taught in university and there is less fresh meat coming into the industry, yet games still get made.
> Yes, there are some performance issues regarding lack of value types, but not every single game is going to be the next Crysis.
It's not just value types, it's reference indirection everywhere. You can't declare an array of objects for example, only an array of references to objects, which isn't cache friendly. There are similar issues if you want to actually use many of the features higher level languages come with. It's why java/c# will never be as fast as c.
As far as unity goes, all the heavy lifting in the game engine is still done in c/c++, c# is only used as a scripting language. As far as I understand LWJGL, it is not analogous to unity, it's not a game engine but a low level library to write a game engine with.