My friend and I have started to work on a simple java game and we are hoping to use some sort of 3d implementation. We are not too sure what would be a better course of action with respect to gl4java or Java3d. Is there a learning curve difference between these two, and is there a significant performance difference as well? Which is the best one to use overall?
You’d probably not want to consider gl4java but rather JOGL or LWJGL. Because GL4Java is older and not supported anymore. JOGL is essentially the “new GL4Java”, LWJGL has been dubbed by some “the directx of Java”, although I’ve never used it myself.
snafu?
Direct X of java ??? ??? ???
LWJGL is esentially a OpenGL, OpenAL & input binding - which cuts out all the cruft, thus producing a simpler, smaller, faster, leaner, meaner <, insert more fancy words here> game api, yet seen on the Java Platform!
Just repeating what I’ve heard (mostly on gamedev.net). Like I said I haven’t gotten around to LWJGL yet. But it is the only Java library that tackles all the major areas, that’s probably where the comparison comes from.
I went to the LWJGL website. THe version is:
pre alpha 0.7? I can imagine the bugs.
Does anyone have any info about what was used out of all those beautiful 3d APIs for java to create Alien Flux, or even that older game Roboforge.
What would be the best choice for a 2d game - simple tile engine, texture loading ( perhaps tga ), not too slow.
All releases of LWJGL have been marked alpha, since they’re not feature complete!. The api itself isn’t buggy at all - just not done yet.
[quote]Does anyone have any info about what was used out of all those beautiful 3d APIs for java to create Alien Flux, or even that older game Roboforge.
[/quote]
Alien Flux uses LWJGL, and Roboforge used the (now defunct?) Java 3D
What is this doing in Java2D ??!!? ;D
If you’re looking to do a simple 2D game, why not consider simply using Java2D and not getting dependant on any of these native libraries.
If you’re looking to do a simple 3D game, I’d say go for Java3D, or soon Xith. Since if you’re not doing anything to fast then its going to make it much easier on you…
If you’re really looking to do a fast action packed 3D game, go for either JOGL and LWJGL. Not much difference between them for all intents and purposes. The LWJGL community and support seems a little more well formed atm…
Kev
[quote]What is this doing in Java2D ??!!? ;D
If you’re looking to do a simple 2D game, why not consider simply using Java2D and not getting dependant on any of these native libraries.
[/quote]
But the problem is the game truly has to be very simple to run well on Linux, and you’ve still gotta be quite vigilant and creative to pull it off. I dunno what the situation is with MacOSX and Java2D.
If Windows is all you care about and you just want 2D, then Java2D’s a perfectly fine choice. Otherwise I’d consider something else.
Agreed, Java 2D works far better on windows,
But if you move to something like LWJGL or JOGL you’re going to have to write a whole bunch of stuff to make it easy to develop 2D. As to being vigilant, you’ve really got to be very careful if you’re working in GL, maybe more so than in Java2D.
Either way, if we’re talking really simple, Java 2D is going to be easier to get to grips with.
Kev
We should have a simple, game oriented, 2D graphics library that uses JOGL or LWJGL on the backend. Just simple things like drawing the sprites, rotation, scaling, alpha transparency, etc. Then you could both make simple (or even not so simple) 2D games that are hardware accelerated and capable of effects that Java2D could only dream of without mucking around with low level GL.
My game basically does that, it’s just not entirely general. I believe yours does too kevglass? And I think a few others around here are doing the same thing. Maybe a collaboration and pooling of code could have some nice results.
Actually, my stuff abstracts a layer above JOGL and Java2D in a general fashion. I made it available (and can do again if anyone wants it), but I hear that Java 2D is going to be reimplemented ontop of OpenGL so maybe its best just to wait for that…
Kev
[quote]I hear that Java 2D is going to be reimplemented ontop of OpenGL so maybe its best just to wait for that…
[/quote]
Hmm… so,e kind of hybrid both of 2D and 3D ? an universal grafic API?!
OpenGL isn’t only 3D, its a generic graphics library, so Java2D will work exactly as it does now, produce the same results but much faster with hardware (hopefully). Plus it might help with some of the compatibility problems.
Kev