[java] Java3D vs. GL4Java

Started by
37 comments, last by WoolyLoach 21 years, 7 months ago
Nope, I''ve had many a heated discussions with Jacob. I just wanted to make sure people did not think I was personally downing his work, I just question his conclusions. He seemed to have problems with java3d and other 100% pure solutions becuase he had written his own JNI/C++ framework for 3d rendering ( java3d was not availible then ).

If you think you have a hedache now, just wait till you start actually programming the game logic!!! Forget about 3d, I''m just taking the AI and other NPC code.
Advertisement
Well, after a more or less sleepless night worrying about everything in the Universe I''ve come to a decision: I''m going to start out down my merry path to Hell with Java3D. There looks to be some good activity going on with Java and gaming, and my life is difficult enough without having to add developing an entire 3D engine from the lowest level up to it! Sure, no shaders etc. until late 2003 from the looks of the JSRs I''ve seen, but with the Java Game Profile and the Java3D 1.4 stuff it _looks_ like things are (if nothing else) on the right path.

If I have to, I can always get dirty and use JNI until I get what I want native (heh heh heh evil spud that I am).

I see no reason why I can''t get 30fps on what I expect to be the ''midrange'' consumer box by my ship date (late next year). My only real concern is how to best get the proper JRE and Java3D libs onto the users machine, but (famous last words) I''ll burn that bridge when I come to it!
Wooly Games for Wooly Minds!
Java3d can be loaded dynamicly with Webstart!

You just need to craft a proper xml file and you application will automatically install J3d if it''s not already installed. Check out the javagaming.org forums for exact info.

Good choice. You don''t need shaders to make a game. Gameplay is the most important factor, everything else is just eyecandy.
Well, it appears that my target customers aren''t interested in downloading 20MB+ of JRE/JAI/JMF/Java3D just to check out my demo. Ugh, I knew I had to eat the download cost of the JRE (at 12MB for the 1.4 JRE International/Windows version) but the rest of it is pretty much death-in-a-bucket.

Pragmatically, I''m left with no choice but to get dirty and use JNI to go down into a native engine written in C++ and, at least, remove the JAI/JMF/Java3D download burden from my (potential) customers (that''s about 15MB worth of stuff, by the way). Maybe by the time I ship everyone in the world will have broadband, but.. I kind of doubt it.

What a long, strange trip it''s been.
Wooly Games for Wooly Minds!
Maybe this is a small consolation, but why not get the English-only version (a tiny amount less than 9 Mb by my count)? And you can include a stripped down version of the JMF with your program if you use the Customizer included with it. Still, you''re talking about 10 Mb, and then plus your program data/code... but that''s still a significant amount shaved off of what you''re talking about.

-pirate_dau
Hi,

This is a bit of a problem that im facing too.
But im making a 3d engine, so I can just spend more time on the 3d coding.
Problem remains:

Java3d
pro: Well suported, high level, good performance
con: slow implementation time for new features

OpenGL4Java
pro: fast, will expose all the features of the hardware.
con: Doesnt apear to be very well suported ATM

If you want all the possible options, you can use GL4Java.
Then again java3d is bound to support it too within time.
Keep in mind that designing a game can take up to a few years (by which time java3d might include all the extra''s)

I want to avoid the whole AWT/Swing part for 3d rendering, so I will most likely use JNI (C++, ugh) and SDL

Any ideas?
"There is a $500 fine for detonating explosives within the confines of a city"
Well, my issues weren''t just with download size, I had problems with poor functionality with audio (for both sound effects and music) and the need to throw in bloated class libs just to be able to read certain image formats and play video. No single thing in and of itself was the deal-breaker, but combined, there were too many problems to make going ''pure Java'' worthwhile. Sure, maybe Java3D will have most of what I need by the end of my 18-24 month development cycle.. but, of course, I''ll have access to the latest and greatest and still end up ahead. I should have known there were going to be Problems(tm) when I discovered that the Java3D collision detection system was asynchronous and I''d have to write my own to prevent collisions from happening in the first place (a couple of threads on www.javagaming.org on this topic if you want to find out what I''m talking about).

I''ll do my engine in DirectX, use the invocation API to start up a JVM, then run the primary game code in Java and let it control the engine via JNI. I''ll abandon cross-platform compatability for now, it''s not critical to the product. It''s an ugly solution but a pragmatic one.
Wooly Games for Wooly Minds!
Nooo WoolyLoach, don''t do it!

First examine:
http://www.javagaming.org/samplecode/Terrain.zip
(needs Geforce) - there''s your Java performance.

Then examine:
http://sourceforge.net/projects/java-game-lib

The answer to most of your troubles I should hope. There should be alpha code up within the next two weeks and beta in about 4.

And the best bit is the whole lot should weigh in at under 400k.

My other advice to you is not to use complex data formats such as .PNG and the like but to encode them at development time into a far simpler format without the heavyweight library overhead (eg. just zip 32bit ARGBs and prepend the image width, height, and depth etc as ints). Same goes for sounds.

Another thing to note is that using LWJGL you have no reliance on AWT, and therefore no reliance on Sun. You are free to compile your game with Jet (which, when I compiled the terrain demo above, gave me performance on a par with server VM but with a vastly quicker startup time) or even GCJ.

Cas

Cas
Warm up the frying pan, I''m going to eat my words! Anyone got mustard? :0

I''ve spent the past several days working on various parts of my design for the engine. I then sat down and estimated how long it would take me to complete just the basics - octree-based scene graph handler, renderer, collision detection, file loaders, specialized tools - JUST the engine and supporting stuff, no "game". Figuring evenings and weekends (can''t always get away with coding games at work lol, I''m an embedded systems engineer and having MD3 models running around on the screen doesn''t classify as "embedded software") - I''ll have it done around Q3 2003. Then add another 10-12 months for game logic, game artwork/assets, testing, debugging.. ugh.. maybe I ship a game right about the time I retire! :-/

Sooo, I''m going to implement my first title as a Dungeon Siege total conversion (lol, really, I mean it) while working on Java/Java3D stuff and pushing to get more "game oriented" functionality into Java (or waiting for the Java Game Library) and slowly forging a Java engine suitable for my NEXT game. This way I get to "work on the game" and lower my frustration level, while giving time (and trying to push lol) for Java and/or Java3d and/or Java game libraries to Get Where I Want Them.

There''s nothing like sitting down for several days, working on a design for your own scene graph, then downloading and reading through someone''s open-source code, and realizing that you''ve got a year of work at least to make you realize it''s better to try to leverage existing assets instead of dying of old age before shipping (!!).
Wooly Games for Wooly Minds!
quote:Original post by princec

First examine:
http://www.javagaming.org/samplecode/Terrain.zip
(needs Geforce) - there''s your Java performance.

Then examine:
http://sourceforge.net/projects/java-game-lib


Cas



Yes, I saw it yesterday....NICE!

Im thinking of using it for my 3d engine
"There is a $500 fine for detonating explosives within the confines of a city"

This topic is closed to new replies.

Advertisement