Which API?

What API is the best for 3d Game programming? JOGL, Xith3d, OGL4Java etc. I want to start programming but I dont know which one to choose. I tried Xith3d but I cant get it working. Sorry if this has been asked before but the search keeps timing out.

There’s no true answer to that.

JOGL/GL4Java are low-level APIs. Basically, you need them if you need to render a triangle.

Xith3D is a high-level API on top of JOGL, but is not a very mature and stable API bc. it seems to be under heavy development. So crashes have to be expected.

Java3D is mature and stable, but lacks latest features and has an unclear future. But at least its still good to get started and have something on the screen.

Maybe its a good hint to start with Java3D, make some experience and than decide wether to go towards an own engine bases on JOGL (a scenegraph like Java3D/Xith3D is not always the best choice) or later port to another scenegraph.

There are even more options like LWJGL on the level of JOGL/GL4Java or OpenMind as a scenegraph engine.

I concur with herkules - Java3D is basic but stable and there are a fair few tutorials for it around the place. It is consequently a really good learning environment and once you understand it you will be able to apply that knowledge to a different platform if you need to.

In a way learning 3d programming is like learning to program in that what programming language you learn with isn’t as important as the processes and techniques of programming you learn.

alzoid,

You can use the OpenGL wrappers (JOGL, GL4Java and LWJGL) but then you would have to build your own dedicated scenegraph for your game (which has it’s advantages). If you are prepared to sacrifice a few frames per second then a scenegraph like Xith3D can massivly reduce development time. Indeed such scenegraphs can sometimes even inclrease the fps rate due to optimisations (Xith3D already has caching enabled were static objects are automatially cached on the video card).

As for your problem, just be patient - the issue which is causing your problem is being looked into. Maybe if you started a new topic, or submitted an issue to the project it would be bumped up the list. I tried to debug and fix the code using Windows but had (different) problems (I am developing in linux).

Maybe having a play with JOGL would be a good idea - you’ll soon see just how primitive the API is (which is actually a good point speed wise and makes it excellent to build scenegraphs and game engines on).

Will.

I still maintain that it is easier to learn to use a higher level api and then work down, I may be wrong.

As a bit of an aside, what are the alternatives to a scenegraph for representing a 3d environment?

Because scenegraph is such an abstract term pretty much any structure you build to manage a 3d scene can be considered a primitive scenegraph. So there arn’t really any alternatives.

Kev

There’s a similar thread on java.sun.com.
I doubt that it adds much new to this discussion, but anyway. Maybe it’s worth a look though.

http://forum.java.sun.com/thread.jsp?forum=21&thread=437870&tstart=0&trange=15

[quote]As a bit of an aside, what are the alternatives to a scenegraph for representing a 3d environment?
[/quote]
Instead of sticking the 3d object in a graph, you draw the objects that you need, when you need it. In some situations it’s more work manipulating the scene graph, than just drawing it explisitly.

Hm hm …

A scenegraph is one possible mean to find out which objects have to rendered. Its not that you manipulate the scenegraph for that.

BSP structures, portals and such are other options to design a graphics engine.

Many game engines are organized quite flat (e.g. maintain a scene and a list of objects in the scene), which is kind of a subset of a scenegraph. But this flat structure can than be optimized to certain environments, which makes some game engines that quick.

I’d highly recommend separating your spatial tree (be it bsp, quad or oct tree) from your actual scene graph/description. If you attempt to mung both of them together you’ll end up making compromises and end up with a structure thats inefficiant for both :frowning:

Bearing in mind what kev said that a scenegraph can be pretty much anything. A simple linked list of game objects could be good enough, or you might need a proper DAG tree with transform nodes, geometry nodes etc. Equally, you might need a fancy scenegraph but if your levels are small or the whole thing is displayed constantly you might not need a proper spatial tree, and you could just have a list of visible objects with some quick and inaccurate frustum culling.

Xith might be a good idea to start with, you get to toy with a higher level API, but can go down to low level GL if need be. Other than that any are suitable (although i’d avoid Java3D…).