[java] java performance

Started by
5 comments, last by thepixlyzdpitbull 23 years, 1 month ago
no. i''m not some guy who came here just to tell you people that java is too slow for games. in fact, i know this is NOT true. but i have NEVER written a game in java before (in the form of an application) and i want to know, how fast will a game go when compiled natively? at about Perfect Dark speed? (Perfect Dark IS slower than Quake) N.B.- i''m thinking of making an FPS
------------------You will be told only what you need to know. Reading it backwards will not help you. YOU CANNOT DECIPHER THE CODE.
Advertisement
Hi,

Running something in pure Java that is natively compiled is in my experience a factor of 2 slower than the equivalent in C++. Not doing native compilation is even much slower.

However, even this slowness can be overcome by using libraries that are written in C++ for stuff where the CPU uses most of the time. The result is often only slowdowns compared to Quake with only a few percent.

And you don''t believe me? I have myself written a Java interface for the 6DX 3D engine from Eldermage Inc. and it is very well able to compete with Quake II - both in speed (framerate) and graphics quality.

Check it out at:
http://www.rolemaker.dk/JWindows/6DX/index.htm
(this site also suggests a few alternative libraries)

Using the library above you will have a Java first person shooter up and running in no time. You can even use Quark (the Quake level editor) to make levels or import levels from Quake or most other first person shooters directly into it.

If you have questions about how the engine works just mail me direct or use the mailing list at Eldermage, Inc. (www.eldermage.com)

Jacob Marner
Jacob Marner, M.Sc.Console Programmer, Deadline Games
If you''re not hung-up on the MS vs Sun stuff you might give VJ++ 6.0 a try... it''s really fast and the programs hook directly into the MS JVM so the EXEs are really small.

On the bad side, MS threw the case and so no more VJ++, just C#. Which in a way might be good because I picked up mine for under $30.

ceemar
hey, thanks! and now that i got help from you guys, you''ll be seeing alot more of me.

-Ryan
------------------You will be told only what you need to know. Reading it backwards will not help you. YOU CANNOT DECIPHER THE CODE.
Don''t use VJ++. It is crap.

1. It is not Java standard complying, so stuff compiled with it will not always run on other JVMs.
2. Its Windows support are outdated and quite limited.
3. It can build EXE files, but it is not a native compiler. It is merely a packaging utility that puts the bytecode into a EXE.
4. Its not updated anymore.

Go use a real Javo compiler instead. Plenty of good IDEs are available.

Jacob
Jacob Marner, M.Sc.Console Programmer, Deadline Games
I am not sure you are aiming for building a FPS game or a FPS game engine. If your goal is the later you may want to check out the OpenGL bindings for Java. I use Magician and I haven''t had any problems with performance. I have heard OpenGl4Java provides pretty good performance as well.

I have a list of them on the FAQ (The list maintained at the ARB has several broken links)

http://games.cpbinc.com/faq/ogl.asp#t3
oh, i''m making a game.
------------------You will be told only what you need to know. Reading it backwards will not help you. YOU CANNOT DECIPHER THE CODE.

This topic is closed to new replies.

Advertisement