Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Java OpenGL bindings the illusion  (Read 7455 times)
0 Members and 1 Guest are viewing this topic.
Offline zingbat

Senior Devvie




Java games rock!


« Posted 2003-07-21 18:42:49 »

Everyone is fascinated by that aproach and saying that binding open gl is the way to go for java games. Then they make some benchmarks showing some balls bouncing arround and pulling out great frame rates.

But this is just an illusion, Java3D does a lot more things than visualizing geometry. It does scene graph traversal and optimization, behavior and lod everything itegrated in the model. A game is much more than some balls bouncing on the screen, and thats why java bindings will never replace java 3d.

Read my avatar message: Java3D rules.  Tongue

Of course that many people report performance problems but Java3D is a high level graphics API. Most of the problems come from bad use of memory not leaving time for the gc to work, not calling the gc immedeatly after setup, not stoping the renderer during setup,  excess use of memory allocation during rendering times (which should be used only during setup phases), dangling sub-graph trees, you name it. In java3d there are one million ways to screw up your code if you don't read the specification right.

With all this said of course that java3d cannot compete with a C++ engine, neither an open gl binding running any real game. But we can use your imagination and make games that don't render so much polygons and don't use so much heavy textures. With this in mind java3d has anything we need to build great games. Remenber that a game quality is not measured by the number of polygons it is capable of drawing per frame.
Offline Mojomonkey

Senior Devvie




ooh ooh eee eeee


« Reply #1 - Posted 2003-07-21 19:12:40 »

Quote

Read my avatar message: Java3D rules.  


No... your avatar says Java games rock!

That being said... what's your point? Use Java3D. Nobody's stopping you.

Don't send a man to do a monkey's work.
Offline misterX

Junior Devvie




java forever!


« Reply #2 - Posted 2003-07-21 19:26:54 »

hey zingbat, i couldn't have say it better!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cfmdobbie

Senior Devvie


Medals: 1


Who, me?


« Reply #3 - Posted 2003-07-21 21:09:18 »

Yeah, but I *like* using OpenGL! Grin

Hellomynameis Charlie Dobbie.
Offline William

Junior Devvie




No Exit


« Reply #4 - Posted 2003-07-21 22:22:08 »

Well, the original poster's experience of Java3D certainly differs from mine.

The real problems that I have had with Java3D, the ones that can not be worked around and would be labeled 'showstoppers' in commercial applications, are none of the issues mentioned above. They also do not have to do with reading the specification wrong, rather they have had to do with core design decisions of the API and its proprietary nature. Those problems are also solved by an open API like JOGL.

Specificly,  Java3D's multi-threaded and opaque architecture as well as political issues surrounding the API is keeping Java3D from being a serious alternative for typical consumer-grade multimedia. The political issues have to do with the API being closed source so developers can not fix the architecture problems and the inter-company issues that is stopping Java3D from being available on Mac.

Just try playing sound with JavaSound or JMF (even worse with video) while rendering a slightly complex scene and watch the thread-chaos either turn the rendering into a slideshow or make the sound stutter. The opaque architecture offers very little opportunity for the programmer to affect any of this and the closed source policy prevents programmers from fixing or working around the bugs in Java3D's own sound API, bugs that have plagued the API from day one and are still not solved in the most recent release.

Sure, you can write some limited games, such as Law and Order, in Java3D, but I bet Shockwave3D would have been a much better alternative for the job. Especially with its tight integration with popular 3D-modeling apps and its Mac portability. The developers apparently had to port the game to GL4Java to get Mac portability, but that wasn not too hard because the game did not use much 3D at all (which is why they could even use Java3D).

Another reason for using an OpenGL binding is of course because such bindings tend to support extensions, such as programmable shaders, much quicker than Java3D, but that's not such a big problem YET since most consumers still seem to have cards without programmable shaders.

I hope I have cleared up some of the motivations behind using a 3rd party OpenGL binding. I am just curious, if Zingbat and MisterX really thinks that Java can't compete with C++ for real games, are you guys just here to learn how to use Java for scripting in your C++ engines? or are you maybe working strictly on the server side? Anyway, I don't think that belief is shared by most developers here.
Offline shawnkendall

Senior Devvie





« Reply #5 - Posted 2003-07-22 00:16:26 »

No stencil buffer access = no shadows #1
No hardware shader access, vertex or fragment. = no shadows #2

Shadows built with user defined and control geometry, yes.
I've doen it, but it is a pain and CPU intensive, especially for many objects.

Multi-pass rendering beyond the multi-texture support is extremely cumbersome is at best.

IMHO, it's non-extendible renderer is it's greatest weakness ( and would-be greatest revision effort)

Nuff for now.


I have been programming Java3D for 5 years now.  It did a great job for many different applications as well as games.
Unfortunately even low-end game graphics have raced passed J3D 1.3.1 renderer.

Yes, scene graphs are nice.  
Unfortunately, due to the way graphics hardware evolves, close access is probably going to be needed by most game developers to stay visually competitive.
Of course, graphics aren't everything.
But then again, movies stars aren't ugly. ;-)

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline tortoise

Junior Devvie




<3 Shmups


« Reply #6 - Posted 2003-07-22 00:55:19 »

I've looked into Java3D a bit. But the lack of Mac support (and if memory serves its Linux support isn't so hot either), I stopped. It doesn't make sense to go with Java but then deny yourself one of Java's greatest strengths, relative ease of going cross platform.
Offline kevglass

« JGO Spiffy Duke »


Medals: 200
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #7 - Posted 2003-07-22 04:08:20 »

So what we're all saying is, Java 3D needs more development?

Kev

8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161