Java performance for 3D game

Hello all, I created counter in loop in start() function in SimpleGame(BasicGame).java sample for measure cycles per second. My integrated graphics show 400 FPS on clean scene with 2D text showing FPS. When I add 50 spheres to scene, 30 FPS is displayed. My scene need 50-100 objects. So I'm not able build game with more complicated objects becouse performace will be horrible? But simple 3D games with lot of objects runs well on my computer so what is wrong? Thank you for help.

Reduce the depth buffer / resolution / bit depth



Obiviously your problems come from the driver not fully supporting your format and emulating it, hence it is damn slow.

Update driver or find a supported format

  1. Reuse Geometries (TestSharedMesh)
  2. lock() all geometries that are static
  3. jme is a scene graph API, which basically means that it is slowing down when the graph tree gets to deep and/or to wide. One Geometry with 100000 triangles will run significantly faster than 100 geometries with 1000 triangles each although the same amount of triangles is rendered.

Point being a very crude test does not give you very useful indications of game performance.

JME is a general purpose engine which means it doesn't do the optimization for you, for a specific type of game. You need to look at the requirements of your game and optimize accordingly.

I understand. I search general reply, not specific. I want try make easy lightweight game.



I tested TestSharedMesh, there are textured spheres and FPS is 10 with less than 50 sphere displayed and this is easy scene. I tested it on Core2 Duo 2.33GHz with integrated Q35 chipset graphics. I have no idea what I can do with this hardware, but I have aquarium screen saver and I tested 50 fishes are displayed and swims smoothly, means > 30 FPS.



So my question is when computer is able display 50 fishes as they smoothly swims, is it possible to do same with Java? Why TestSharedMesh is so slow with simples objects and easier scene?

Is it problem with java<->opengl/directx interface setting or is it general problem with Java?



Thank you for help.

I wonder why your test with TestSharedMesh ran with such a low fps.

My computer has a Core2 duo 2,2GHz with an integrated GMA X3100 and not even the latest drivers (getting them now :P).

When I ran TestSharedMesh I couldn't quite get 50 spheres into my view at one time, but with 40 the stats showed about 80 fps at 800x600 and about 70 fps at 1024x768. Are you using the stats in the JME window (F4)?

What is the OpenGL support of your card?

GeniuZ said:
So my question is when computer is able display 50 fishes as they smoothly swims, is it possible to do same with Java? Why TestSharedMesh is so slow with simples objects and easier scene?
Is it problem with java<->opengl/directx interface setting or is it general problem with Java?


What is your CPU load when running this test?

Ok, thank you, I found that software rendering is used (GDI Generic), but I don't why.

Need I any minimal version OpenGL?

You might take a look at what others have experienced here

GeniuZ said:

Ok, thank you, I found that software rendering is used (GDI Generic), but I don't why.
Need I any minimal version OpenGL?


Windows should have OpenGL installed, but if you're getting that renderer then something's probably wrong with your graphics card drivers. What graphics card do you have? And have you tried getting the latest drivers for it from the vendor?

You should definitely try updating your drivers to the latest version.

I just updated mine (GMA X3100 on Windows XP Professional) and the fps in TestSharedMesh went from 70-80 to about 180 with about 40 spheres!

Tumaini said:

You should definitely try updating your drivers to the latest version.
I just updated mine (GMA X3100 on Windows XP Professional) and the fps in TestSharedMesh went from 70-80 to about 180 with about 40 spheres!

But will it run Crysis?  :D
SomethingNew said:

Tumaini said:

You should definitely try updating your drivers to the latest version.
I just updated mine (GMA X3100 on Windows XP Professional) and the fps in TestSharedMesh went from 70-80 to about 180 with about 40 spheres!

But will it run Crysis?  :D


I believe the term is:

CAN IT CRYSIS?

Seriously - saw that on a forum post on some hardware board like a year ago.

Well I can say that it is not a java/jme issue directly,

I was able to load a orginal DroidControll ship modell with over 1 million polygons in jme and still had 180fps :slight_smile:

So I would say basically jme shouldn't be considert as a to high limitation, while it is probably not the best Idea for building a crysis like game, you will easily reach ut2004 with a good framerate.



But just out of intrest how many sides do you use for your spheres?

Intel GMA X4500 HD can run Crysis at lowest resolution and lowest settings at like 7 fps.

Everest says:

I have GMA 3100 (without X) (driver update was first what I does)

Driver is igxprd32.dll version 6.14.10.4957

OpenGL is version 1.4.0 - Build 7.14.10.4957

OpenGL DLL 5.1.2600.5512(xpsp.080413-0845)



When I choose LWJGL withou software rendering allowed, this exception shows:

Pixel format not accelerated



Sphere is constructed this way:

Sphere sphere1 = new Sphere("Sphere nummer eins", new Vector3f(0,0,0), 20, 20, 1);



When I press F4-stats program stops with this exception:

SEVERE: Exception in game loop java.nio.BufferOverflowException

What is the manufacturer of your computer?

They should have an updated driver for you.

6.14.10.4957 is pretty old by now.

I think GMA 3100 would use the same driver as X3100 (though you should check).

For X3100 (and other accelerators with the GM965 chip) at least HP has got a driver with version 6.14.10.5043.

That driver updated my card to use OpenGL 2.0. Even the rendering test for 2.1 in OpenGL Extensions Viewer passed with over 100 fps.

My manufacturer is Dell. No newer driver I found on manufacturer website, so I downloaded driver directly from Intel. I cracked setup.exe becouse it says manufacturer have custom functions implemented in driver and I must install manufacturer driver. Now I have installed 14.37.1.5029 version and system is ready and go.

I found nice table with Intel graphics features 许多菠萝的英语怎么说 菠萝怎么读英语怎么说 菠萝英语怎么说读 菠萝英语怎么说谐音 - 晋尧qq玩网

So I can have only OpenGL 1.4 version. When I run screensaver CPU consumption is very low

so there must be any 3D acceleration (maybe only for DirectX?) but I still can't run Java with accelerated OpenGL…

That table is probably largely incorrect as it's outdated (seems to be from 2007).

Newer drivers for some of those chips have enabled better OpenGL support.

Did you try running OpenGL Extensions Viewer after updating your driver?

Is TestSharedMesh still running at a low fps?

TestShaderMesh - same result. OpenGL Extensions Viewer render test uses CPU.

But this is good for testing game with software rendering, I know now I must use

maximal simple objects and precalculated animations for best performance.