Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

3d game programming in Java

Tags:

java

3d

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.

like image 706
Alex Avatar asked Feb 02 '23 19:02

Alex


1 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.

like image 82
DJClayworth Avatar answered Feb 08 '23 16:02

DJClayworth