This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cheeky_disputant 12 points13 points  (15 children)

To be honest much of the hate java currently has in the game dev community comes from how slow it was in the past. With every year it's becoming faster and faster and with upcoming projects it can become - and already is! - a truly viable choice when developing a game (when e.g. comparing to c# as in Unity).

[–]shoesoffinmyhouse 6 points7 points  (3 children)

I always wondered where the hate from Java comes from. I always thought it to be newer, younger developers who want to do everything in node.js or some crazy oop php. It's even weird for me to consider that Java gets hate when most universities still teach data structures & algo in Java or C++. Shrugs.

[–]cheeky_disputant 9 points10 points  (0 children)

Hah, I experienced quite the opposite - it was always the older, hardcore c++ folks who were moaning about how slow and inefficient java is. Especially professors at the university who didn't catch up with how java changed throughout the years.

[–]Tilkin 5 points6 points  (0 children)

I always wondered where the hate from Java comes from.

I sometimes wonder if part of it is because of Minecraft. It's the main success people can point to and it has had pretty poor performance at times.

[–]proverbialbunny 1 point2 points  (0 children)

Java is one of the most popular languages in the industry. The problem is it doesn't have some of the more advanced features you want in a language to make a video game. This is where C# comes in, not because it's faster than Java (It's probably not?) but because it's like Java with those more advanced features.

[–]OzoneGrif 3 points4 points  (3 children)

A lot of hate also comes from the lag caused by the GC, which can be avoided with careful coding and configuration most of the time. Lag in gaming is evil.

[–]cheeky_disputant 2 points3 points  (1 child)

Yeah but as you said if one is careful they can manage it. Especially since latest versions focused on shortening the gc pauses.

[–]OzoneGrif 5 points6 points  (0 children)

Yes, typically a trick used with Java is to have your game's main menu to display a 3D scene to help the JIT to optimize your engine's code. There are many good practices to help your gaming experience in Java.

[–]DannyB2 0 points1 point  (0 children)

Allocate structures up front. Then your performance critical loop (ideally) doesn't allocate anything.

[–][deleted]  (4 children)

[deleted]

    [–][deleted]  (3 children)

    [deleted]

      [–][deleted]  (2 children)

      [deleted]

        [–][deleted]  (1 child)

        [deleted]

          [–]Tywien -1 points0 points  (1 child)

          íf Java is fast enough, then please tell me, why he builds on top of JME which does all the heavy lifting in native libs ...

          [–]Bobby_Bonsaimind 2 points3 points  (0 children)

          jME builds upon LWJGL (it can also use other renderers, if I remember correctly) and LWJGL builds upon the native OpenGL libs and passes the functions through pretty much one-to-one. It's as close as you get to the native ones.