I recently agreed to help a friend make a game he has been working on and I decided that I would prefer to write it in Java. I am unsure what the best route is to take for 3D in Java. I have found that most everyone talks about Java 3d for 3d graphics in Java, which seems to basically be a wrapper for Directx and openGL but I have also found that Java 3d hasn't been in active development since 2008. Is it still the best thing to use or is there something with more active development that would be better. I have seen some discussion about some other APIs but Java 3d seems to have better documentation and there are some fairly decent books on 3d programming in Java that all seem to be based on Java 3d.
Add a comment
|
5 Answers
There are a number of options you have when writing 3D apps in Java.
- JOGL is a very thin wrapper for OpenGL written in Java. Using it involves learning to program in OpenGL, which is no small undertaking. It does allow you to maximize your performance at the cost of a big increase in development time. If you happen to be familiar with OpenGL already , or need very low level functionality, this is your best choice.
- Java3D is an object oriented extensions to Java that is easier to use then JOGL and has the advantage of being supported by the Java community. It's less used than some of the other solutions.
- LWJGL (Lightweight Java Game Library) is a is a library for making games in Java with 2D and 3D graphics, and it also supports sound (OpenAL), and provides many useful features for games development. It's less suitable for other 3D development.
- There are a number of other game engines built on LWJGL and the other libraries that provide a greater range of features than any of the others. JMonkeyEngine is probably the frontrunner of these. They will provide more functionality for you in terms of view control, animation etc.
Which book you read entirely depends on which choice you make above.
1 Comment
Alex
I suppose JOGL probably wouldn't be the best thing for me to use, then. I don't really have a problem with learning OpenGL, but I'm not currently planning to do tons of 3D development, so it would probably be better to go with something that I can learn faster. If anyone could recommend good books for LWJGL and JMonkeyEngine I would be interested in looking into those. I prefer good documentation that will help me really understand how things work over bad tutorials with sloppy code examples, so a really good book and good official documentation are important to me.
JOGL is a modern replacement under active development. It's basically just bindings to the OpenGL library.
Comments
Have a look at jMonkeyEngine and LWJGL.
jMonkeyEngine is being actively developed and it includes a complete toolkit and IDE for creating 3D graphics applications in Java.
LWJGL (Lightweight Java Game Library) is a library for making games in Java with 2D and 3D graphics, and it also supports sound (OpenAL).