Using JAVA to develop 3D game? help plz.

Started by
22 comments, last by Challenger17 19 years, 11 months ago
Java will probably work well for your purposes.

Using a scenegraph architecture helps productivity but I would not recommend Java3D, the multi-threaded architecture that makes it suitable for multi-processor scientific visualizations means trouble for most games. Better alternatives include the Xith3D project, which is a game-optimized open source port of Java3D, or straight OpenGL (through LWJGL or JOGL).

To debate with dmikesell
quote:The fact that the overwhelming majority of games are still done in C and C++, however, says (to me anyway) that Java isn't ready for this arena.

There aren't any JavaVMs available for consoles, that's the only really good reason why Java isn't ready for AAA-level development of titles suitable for consoles.

Then there are of course other reasons why established firms may not be ready for Java development yet. For instance, there will be a cost associated with having their programmers learn the language and its tools, and their productivity tools may be tied C/C++.

That equation is likely to shift with time though. Java development is very common in other industries than game development and at colleges, both sources for recruitment to the game industry.
quote:If anything, C# will start taking "market share" away from C/C++ in the future, not Java.

Pity that Microsoft started competing with Sony in the console market. That move probably ensured that C# will never make it onto the PS2. Sure, Java may never make it onto the Xbox, but the PS2 is still BY FAR the most important console and Java just has to cross that hurdle to become a very attractive candidate for AAA-level development.

Java-compiler firm Excelsior (developers of JET) have mentioned in the forums at javagaming.org that they have been in contact with Sony and Sun regarding the terms of a PS2 compile-target, then there is also GCJ, and the KaffeVM has been ported to Linux for the PS2. It wouldn't surprise me if some company drops a Java game script engine into one of its PS2 games in the near future.

We have also seen several off-the-shelf titles developed in Java in genres that may not be suitable for console ports (or by companies not eligable for console licenses), and it will be very interesting to see what happens when one such game really hits it big in the market (think Doom's effects for C development over assembly).

Still, just as there are still plenty of business systems in COBOL, C++ will be around long after something new (Java, C#, D, whatever) pushes it from its top position in desktop/console-AAA-client-game development (Java already owns mobile development, C++'s position is becoming contested on the server side, and Director is a strong contender for non-AAA level games such as children's games).

[edited by - HenryAPe on April 16, 2004 7:23:33 PM]
Advertisement
Java is not necessarily bad for games, I just wouldnt say it is a viable language for high-profile, mainstream, performance games.

However, I''ve seen J2ME games running on high-end cellphones that can do fancy 3d graphics. Also, voxel graphics is always an alternative to 3d-polygons.

One more thing: with Java, it''s "write once, debug everywhere."
There is also a very promising 3D API in Java called jME (jMonkey Engine). http://www.mojomonkeycoding.com. This looks very interesting, and I was more impressed by it than Xith3D.
quote:Original post by nonnus29
There are two big problems with using Java in 3d:

1. Loading binary files - you can''t cast a chunk of memory to a MD2 header or whatever. You have to parse the entire file.


nope

quote:
2. Java does bounds checking on arrays; for processing massive amounts of vertex information this can be a noticable performance hit.


which is why you shouldn''t try to force c++ style on java. use the proper way to do it using buffers, this is the way lwjgl does it, and it''s quite fast for large amounts of vertex data

quote:
Otherwise various benchmarks have shown that managed, just in time compiled code is faster than native code (this is true for c# and java). The future is managed code.


of course. lots of people compare equal code in c++/java and say c++ has a performance edge. well, if i''m developing a game, which will turn out faster: using c++, and spending a week hunting down all the memory bugs, or using java(or for those inclined, c#) and spending that week a, say, O(N^2) algorithm into O(N)? you can program the whole thing in assembly even, and as andre lamothe says all the assembly in the world ain''t going to make a O(N^2) algorithm much faster.

sure c++ may be faster in benchmarks but we''ll see how many jit''d (or managed) games show up in the future.

This topic is closed to new replies.

Advertisement