3 ms·
You don't think it has anything to do with the abstraction and indirection levels that java operates at? Where are these well coded java games that look like so
by flukus 9y ago
You don't think it has anything to do with the abstraction and indirection levels that java operates at? Where are these well coded java games that look like something from this decade?
- pjmlp 9y agoGood Java programmers are better payed to write High Performance Trading systems, than working on games with their low salaries and crazy schedules. Yes, there are some performance issues regarding lack of value types, but not every single game is going to be the next Crysis. Yet it appears by some in the game community that if language X cannot be used for doing Crysis than it is not worth it, let alone that most likely they will never finish their game. Unity's runtime is a fossilized version of Mono, with much more performance issues than OpenJDK, yet indies flock to them. Only because they are deeply committed "to all or nothing", in what concerns advancing the status of doing game development in .NET. Since they created their own AOT compiler (IL2CPP) they have even started to port sub-components from C++ to C#.
- jimmcslim 9y agoUnity 2017.1 includes an updated version of Mono supporting .NET 4.6. Still experimental at the moment, but coming out of the deep freeze that it has been in for a while.
- nunobrito 9y agoI've noted this to be true in regards to salary. I've been writing high-performance Java code since years (chewing a few trillion computer files as fast as possible) and we certainly would have switched to anything else such as C++ if it was faster. Our internal performance testing is ranking Java on par with the C++ implementations of the same algorithm (performance typically flattens until a bottleneck is reached such as disk read speed) or completing the same tasks faster. In one side this is due to the JVM optimizations done automatically, the other side is having developers that understand how to write efficient code. This does require an experienced developer which understands how his code is impacting performance. For example, avoiding ArrayLists or String objects and learning to use direct arrays or char objects. I can see LWJGL being useful, most particularly to help keep the infrastructure under the same language so that development and long-term maintenance are not a nightmare.
- flukus 9y ago> 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.
- pjmlp 9y ago> It's why java/c# will never be as fast as c. 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. https://github.com/dotnet/roslyn/blob/master/docs/Language%20Feature%20Status.md https://github.com/dotnet/roslyn/blob/master/docs/Language%2... 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. https://www.infoq.com/articles/high-performance-dotnet https://www.infoq.com/articles/high-performance-dotnet 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.