MrCunningham
Member
The only real upside to java is its portability.
Java has a lot of advantages other than portability. Its safer and easier to write code thats less likely to crash in it. But yeah, like people here have said 1.) Its not close enough to the metal for game devs 2.) garbage collection can happen at random times and cause jank. The second is a little bit bunk IMO. App developers deal with it. You profile. You avoid generating large amounts of garbage when you don't need to. Same optimizations game devs do now. But I've heard devs cite it.The only real upside to java is its portability.
Java has a lot of advantages other than portability. Its safer and easier to write code thats less likely to crash in it. But yeah, like people here have said 1.) Its not close enough to the metal for game devs 2.) garbage collection can happen at random times and cause jank. The second is a little bit bunk IMO. App developers deal with it. You profile. You avoid generating large amounts of garbage when you don't need to. Same optimizations game devs do now. But I've heard devs cite it.
Games do use high level languages occasionally. At least, I remember some dev from EA claiming the SimCity menus (and the PS4's menus for that matter) were written in Javascript (not Java) and WebGL.
Java has a lot of advantages other than portability. Its safer and easier to write code thats less likely to crash in it. But yeah, like people here have said 1.) Its not close enough to the metal for game devs 2.) garbage collection can happen at random times and cause jank. The second is a little bit bunk IMO. App developers deal with it. You profile. You avoid generating large amounts of garbage when you don't need to. Same optimizations game devs do now. But I've heard devs cite it.
Games do use high level languages occasionally. At least, I remember some dev from EA claiming the SimCity menus (and the PS4's menus for that matter) were written in Javascript (not Java) and WebGL.
Those answers aren't any better than those in this thread. Pretty much every valid technical reason mentioned there has also been mentioned here, and some of the reasons to use Java they propose (like portability) have been debunked.In case the OP isn't aware StackOverflow and StackExchange have much better answers to this question and questions related to programming in general.
By the way, you guys bitching about C or Java should get involved in a project that involves mission critical legacy systems written in COBOL.
In the end you have to work with what you get. That's why, ultimately, good knowledge of sound software engineering methods is way more valuable than the programming language.
My uni recently switched to a new teaching method for the intro-level class where students don't even know what a string is until halfway through the semester and don't even know how to manipulate it until a week or two later.
For Christ's sake.
As the guy who founded javagaming.org back in 2001, which was turned over to the community when Sun was purchased by Oracle, I have to say that I find this thread quite interesting...
And, yes, the JOGL, JInput and JOAL drivers all originated with us there. LWJGL, a competing API that did not rely on Swing/AWT, also had its start in that community.
Bit of a vacuous statement to make.Java is a terrible language. For one.
I'm waiting to hear why it's bad first. It's a modern programming language that is platform independant.
I'm waiting to hear why it's bad first.
Because people really want somebody to pay them to write code in that trendy language they just picked up.
It never really happens, but you can't blame people for trying.
At the end of the day. people just want you to write shit in something that will work and be supported. In the games industry? That isn't Java.
Maybe if Microsoft had killed it properly, DirectX could have integrated their own version. That never happened and they moved in a different direction after.
The proposed specification is of a J2ME Profile that covers nine areas of game development:
1. 3D Modeling and Rendering for Games
2. 3D Physics Modeling for Games
3. 3D Character Animation for Games
4. 2D Rendering and Video Buffer Flipping for Games
5. Game Marshalling and Networked Communication
6. Streaming Media for Games
7. Sound for Games
8. Game Controllers
9. Hardware Access for Games
We see the Java Games Profile as potentially using existing technologies in the following areas:
1. General Programming Functionality
We see the general programming environment as a JVM with support for access to memory outside of the Java heap. The new IO package addresses two key areas: efficient I/O for loading game data into memory quickly and access to the memory space outside the Java heap from within Java. This is a critical facility for some kinds of game coding.
2. 2D Graphics
Support is desirable for video buffer management and page flipping, hardware accelerated BLT, line draw, and rectangular fill where provided by host hardware. Java2D's new VolatileImage and updated Graphics2D classes, combined with AWT's new fullscreen mode and BufferStrategy classes already provide a well-defined interface to such functionality.
3. 3D Graphics
Full support for advanced hardware-assisted 3D rendering with a high degree of flexibility and control over the render process is desirable, as is access to render primitives to build fancy effects (i.e. reflection mapping, stencil buffer based shadow volumes). Java3D has much of this already.
4. Controller Input
Discovery of and access to game controllers such as joysticks and steering wheels is necessary. Java3D provides basic controller access. While it may be desirable to put a simpler, non-3D oriented interface on game controllers, we suspect that this can be done through a small amount of glue- ode that wraps the existing Java3D input functionality.
5. Advanced Audio
MP3 and Midi playback, streaming audio, and voice codec for low-bandwidth transmission across the net are required. Much of this is provided by JMF2.0. Java3D supports 3D spatial sound positioning. There are still some open questions about how this interfaces to JMF 2.0 but we expect to work those issues, if any, out in the expert group.
6. Streaming Video
High quality video playback is required for 'cut scenes'. This is provided in JMF 2.0.
7. Game Marshalling
We expect to be able to use components of the GameSpy Java APIs as the core functionality of a reference implementation of a general game marshalling API. All that would need writing is the glue code to convert the visible proprietary GameSpy API to the agreed-upon standard API.
8. Physics Engine
Math Engine already has a highly respected physics modeler in C/C++ and has expressed interest in working on the reference implementation of a Java physics modeling API.
Meanwhile all the engines game developers will use have hooks into scripting languages or C.
So there it is.
I have to thank OP and all the people involved in this thread, it's really a good read. It's helping me to reinvigorate my passion for programming and to get over my convinctions on the need of a strong OO structuring over everything, the primary aspect of java that always fascinated me.
Java along with few other alternatives is THE language when you consider enterprise web application..
Enterprise Java, heh.
Enterprise Java, heh.
Objective-C uses different reference types to prevent these issues. It has a very clever reference count system called ARC and it hadles object deallocation like a charm.Code I wrote few years ago was in C# and it dealt with pretty crazy explosions, dealing with that when it would occur would cause a "hitch" for a frame or so when the garbage collector did its work when things were destroyed in the game from the explosion such as destructibles. No amount of perf passes would solve it, it was solely due to the garbage collector not being efficient enough to deal with it. Nothing a programmer could have control over unless they were using a language like C/C++ that required the programmer to do all the memory management that could make this go away.
Not for nothing but all of the interactivity/menus/fiddly bits on BluRays are (or were, have not kept up) written in Java. In fact, check out the logos on the PS4 box...Java Powered logo still there.
Awesome! Now, head over to javagaming.org and get coding!
Java (and C# as well) run on top of a sort of virtual machine layer, unlike C++, this causes additional overhead and makes it unfavorable to write games with.
Although Runescape was pretty cool back in the day.
Objective-C uses different reference types to prevent these issues. It has a very clever reference count system called ARC and it hadles object deallocation like a charm.
Speaking of Objective-C: I really like developing in Sprite Kit. I'm making a game right now for OS X and Sprite Kit really provides great tools to start you off with whatever degree of boilerplate you desire. I have been using the frame updating libraries but I'm still free to create my own physics engine and all that other jazz. It's more fun to make it from scratch and this really just feels like an SDL-replacement for me.
Objective-C is a fantastic language to code games with for both iOS and OS X. Fantastic ecosystems and yummy BSD/UNIX.
One could argue that for a very long time objC was the better object-oriented C extension. At the very least it was absolutely orthogonal to the C features, unlike C++.This is literally the first time I've heard anyone say anything good about objective-c. It's a PHP-tier monstrosity, so glad they're killing it, Swift is actually quite nice.
Do you think Java is useful for ANYTHING?Those answers aren't any better than those in this thread. Pretty much every valid technical reason mentioned there has also been mentioned here, and some of the reasons to use Java they propose (like portability) have been debunked.
The truth is that C++ is far more portable across all devices relevant for games than Java is.
There are faster and better alternatives.
Damning with faint praise.Java as a programming language is fine.
As I said earlier in the thread, it's a useful skill to have for (i) maintaining Java codebases, (ii) writing stuff that needs to interact with Java applications, and (iii) using Java libraries.Do you think Java is useful for ANYTHING?
You do realize that's an introductory course in software optimisations, right? It can hardly teach a seasoned game developer anything.If you're not really into programming stuff here's a by the numbers comparison between Java and C in performance as an example - http://youtu.be/JzpkXLH9zLQ?t=27m51s Yes there's some programming stuff but you can just focus on the numbers he gives - the actual comparison is later on but I want to give you an example of the scale by providing the optimizing the Java code part first.
And yes, you'll be absolutely shocked at the end result And this should hopefully answer the question once and for all!
In fact, I'm half tempted to just download the entire course, get it burned into a few DVDs and sent to Ubisoft Montreal (addressed to the Assassin Creed and AnvilNext teams) - heck it might solve their performance issues xD
And then chuck in http://developer.amd.com/tools-and-sdks/graphics-development/gpu-perfstudio/ and https://developer.nvidia.com/nvidia-perfkit for good measure.
Thinking about it it's likely that they barely have enough time to do things like this - probably just rushing to push games out and then patch it after - sad thing in AAA games nowadays