On the topic of Java

After reading all the “I’m in!” post’s I feel I can safely say that Java will be the most used programming language in the entire Jam. I myself am going to be using Java for LD. But all that is besides the point. My question is, how many people here would agree that soon Java is going to replace C++ in a maybe no so distant future. Obviously not going to happen over the course of a year but it is a serious possibility. Not just because people are using it in the Ludum Dare but because it offers lots of control while remaining clean and simple. Maybe not everything about games will writing in Java as some parts of the LWJGL OpenGL port to Java is written in C++. Anyways these are my thoughts and as it is a discussion topic I would like to know what you guys think.

 

Thanks for reading and have a great LD!

EDIT: when I say replace C++ I mean in the game development industry

Comments

adventureloop
19. Aug 2013 · 17:49 UTC
I think we are seeing the peak of java as a game language. Universities are starting to stop teaching it, once that happens the downward curve will get bigger. You can only really expect to see a replacement for java once solid reusable engines start to appear. Right now if you want to roll your own and be used on multiple platforms java lwjgl is the easiest way.
herpdermit
19. Aug 2013 · 17:54 UTC
You make a very good point. Another thing I thought of after writing this post is that Java has some security flaws that need to be addressed before it can be used by any big game development companies. Maybe once this is addressed that would change the playing field. Also is there an article or some other reading piece that you could link me to about the statement you made about universities no longer teaching java?
h4tch
19. Aug 2013 · 18:11 UTC
Java is good for cross-platform PC/Mobile games, but C/C++ is better supported on consoles. But with LLVM, C++ can be compiled to Javascript and run on the web, which Unigine and the Unreal Engine have done.

Personally, I using the appoach of C++ engine library with scripting(Lua) support embedded within it.
soulrot
19. Aug 2013 · 18:21 UTC
Imagine Crysis running on Java instead of C++. Imagine the slideshow you will get.
herpdermit
19. Aug 2013 · 18:23 UTC
That is a good point h4tch. One I have already thought of. There is always investment in upgrading though to keep the speed of development going fast while having rich content. The game industry may one day “need” something like Java for all of the benefits. Though I am still young (16 years of age) I know that C++ wasn’t always thought of as a speedy language, and would have not been used for professional game development.
D-e-X
19. Aug 2013 · 19:13 UTC
I doubt Java will replace C++ any time soon.. C++ has been and is the industry standard for good reasons. Java is just not efficient enough *YET* and may never be as efficient as well written C++ vs well written Java, it takes away a lot of control to be the high-level and accessible language that it is, and it’s just an immense resource hogger on top of that. I think personally for a lot of games, especially smaller ones Java may be the preferred language because it just lets you worry more about just making a game, which is where the accessibility and abstraction comes in handy, but for big commercial engines and AAA titles, I don’t see Java ever ‘replacing’ C++.
Blupsy
19. Aug 2013 · 19:14 UTC
One of the main benefits of C++ is being able to manage your memory and having low level control over your program. While Java has many neat features, not having to manage your memory can be both a positive and negative. C++ is used to squeeze every drop of performance out of hardware, and even though technology will increase, so too will the demand on it. While I don’t necessarily think that C++ will reign indefinitely, I don’t ever see Java being the one to replace it. It’ll most likely get ousted by a language supporting low level control while shedding some of the clunky artifacts C++ carries with it, (I know there are a couple up and coming at the moment, I just can’t remember what they’re called). Java certainly has it’s place in game development, but at the helm of AAA game development, even in the future, isn’t one of them in my opinion.
19. Aug 2013 · 20:07 UTC
So, as a long-time developer, with C++ being literally my first language, I’m going to have to say that Java won’t replace C++, but that hopefully, at some point in the not so distant future, C# will. C++ is just an awful language. The “do it yourself” memory management seems neat at first, but try to finish a large (>100,000 lines of code) project in C++, and you’ll find yourself slowing down more and more as time goes on. You’ll have to start doing crazy things just to make debugging easier, like integrating with memory monitors (Valgrind, etc.), overloading the “new” operator just so you can start finding memory leaks, etc. Alternatively, C++ has no generics (for that matter, Java doesn’t either). It has no reflection, no emission, and no ability to execute code from source on the fly (unless, of course, you want to compile an entire C++ compiler into your project, which is a major hack). C# can do all of these things, and, in the few places that performance really, really matters, you can just write a couple of C++ source files and compile them right in with your project.