[java] Java 3d game engine?

Started by
12 comments, last by GameDev.net 19 years, 8 months ago
People who have no (or minimal) experience with Java tend to believe the worst. And for those saying there is no correct answer to this question, you are just wrong. The correct answer is, 'yes Java can be used to create 3D game engines, but may not be the best choice based upon project requirements'.

The biggest negative for Java is not performance. For boxed titles it is platform support - currently nothing on consoles. For titles distributed online JRE market penetration could be a problem (but might not be for every title). The first is not an issue if you aren't planning a release on any consoles, and the second is nowhere near as bad as it used to be. 50% of all new computers sold come with the latest Sun JRE preinstalled now, thanks to deals Sun has made with OEMs such as Dell over the past year or so.

I think your friends will be fine considering they have an education in Java. Forget about the 5 year old rumors. Java games are competitive when created by someone who knows what they are doing. A beginning C++ programmer will likely produce suboptimal C++ code, but a veteran will know the pitfalls and tricks of the trade. The same is true of Java. This...

Quote:
One of the fundamental problems is that object instanciation is very expensive in java


...is an example of inexperience and/or misinformation. Object instantiation in Java is faster than C++. This is one of the benefits of garbage collection. The reason Java programmers use object pools and such is not to avoid allocating new objects, but to avoid generating a boatload of garbage. And even then only when a GC profiler indicates there is a problem.

That's another great thing about Java, is the profiling and debugging features built in to the VM. There's a plethora of free and commercial tools to help you tune a Java app. VM parameters can be used to adjust min and max heap size, the type of GC to use, server/client VM... many options. Proper use of these tools in conjunction with solid code help get the best performance possible from a Java app. Without all of the optimizing you still get acceptable performance, but someone who really knows what they are doing can do amazing things.
Advertisement
It's worth pointing out that nearly all mobile devices (primarily cell phones) are using Java for games, and its not exactly like they have CPU cycles to spare. So performance can't be all that bad.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Promit, compare the Mophun games to the Java games :P
aldacron,

if somebody say there is no correct answer, than he is right, you state the exact defintion why: It depends on project requirements...
as said before java has pros and cons as every other language... some programms i write in haskell because of speed and mathematic comfort... some guis in vb... a lot in java...
it always depends on project requirements...

overall you can say, java made a big jump in nearly all parts of programming, in some it got best... others have to be compensated... you can write a simple java programm that cann be so damn slow, because you used methods not deigned for that kind of operation, ornot optimized... same could be done in c... a c programm can be fast and slow, depends on programming, plattform (and the programming on it) etc etc...

java is a good language, and there is nothing wrong on trying to do a good 3d engine in java... java will get better and better...
www.wurmonline.com as example, do a online game in java...

This topic is closed to new replies.

Advertisement