hi guys, I just wanted to share with you some of my experience with using Java and Java3D in a games project.
Below I will compare my initial reasoning for choosing Java/Java3D with my experience so far with Java/Java3D
Before starting developing the game I considered a wide array of different 3D-API’s and languages.
My initial reasoning for choosing Java/Java3d
-
The game-code will run on a huge array of platforms.
-
Java3D is not yet a part of Java2, but it will probably soon be.
-
Java is fast enough on todays computers.
-
Java and Java3D has a huge library of ready-to-use code in the API. Many important things that I need in my game are readily available for me to use.
-
The internet is full of articles and source-code ready to use. Not that much Java3D really, but Java stuff is everywhere.
-
I will save a lot of time using Java/Java3D.
My experience so far with Java/Java3D
-
All of my expectations above came through except the fact that Java3D now has an uncertain future (Please read the ongoing debate about JOGL vs. Java3D).
-
Much of the API-functions in Java3D is extremely usefull and saves you a lot of work.
-
There are some dangerous pitfalls in Java3D in terms of performance. However, I found simple sollutions to these problems either on Sun’s pages or on www.j3d.org.
All in all I choose to continue using Java3D. It works and it is a mature 3D API ready to use. But, I make sure that the structuring of my code allows for easy porting to another API if neccessary.
If you decide to use Java3D despite the ongoing debate about its viability, make sure you isolate all the Java3D code in generalized classes. This means that you shouldnt have Java3D code spread around in the game’s sources. Design the Java3D part as a set of interfaces. This will make it easy to convert to another 3D-API in the future, and it is a nice way of organizing the programming of a game.
FG