[java] Java's capacities

Started by
13 comments, last by Arch@on 24 years ago
I think this is very stoppig question. What are really pure Java''s capacities? Is it''s speed enough for Secret of Mana(FF3-4 style) style game where we move, let''s say 32x64 bitmaps maximally 15 at time in scrolling world with full sound enviroments and in real time? What is completely the toppest cap of Java? Multiple threads running sounds and graphics?
Advertisement
I guess that really depends on your hardware. I''m developing an overhead rpg like ff4. Unoptimized on my PII 300 MHz it takes about 70% cpu, no NPCs no Sound, no animations. That''s why it''s on hold. I''m using Sun''s runtime and Sun''s compiler, if i used IBM''s it would probably run a little better. Anyone else have some numbers?
Jim, are you using the Java 2D routines for your graphics or are you using standard AWT graphic techniques?
Another thing, are you using jdk1.3 rc2? I hear Sun will release jdk1.3 by the end of the month but even the rc 2 version (2nd beta) that is out now does wonders for performance. Personally I think you will be able to create most non-3d games with Java when jdk1.3 is released, if you know what you are doing that is. It''s so much up to the programmer when you want to squeeze performance out of Java.

Henry
And I assume that if anybody was willing to rewrite the classes with parametric types, you would have a pretty good speed.
I think I''m using both awt and 2D stuff. 1.3 really only speeds up swing gui components noticably. I have run and compiled this game under both 1.2.2 and 1.3 rc1 with no noticable difference.
I found the following site that may be of some use to you...

http://www.cs.cmu.edu/~jch/java/speed.html

New to JDK 1.3 is the "AWT Native Interface". This lets you integrate NATIVE rendering engines into the Java2 platform for best rendering performance.

From the JDK 1.3 documentation, under AWT Enhancements:

"In the most common usage, four steps are involved:

1. Define a class that extends a Canvas.
2. Declare the paint method as native and load its shared library in the static block.
3. Use javah to generate a C/C++ header file for the native paint method.
4. Write the native paint method and build it as a shared library".

Here''s a paper on how to use the AWT Native Interface:

http://java.sun.com/products/jdk/1.3/docs/guide/awt/AWT_Native_Interface.html

The implication here is that you can write your rendering pipeline in C++ and take full advantage of hardware graphics acceleration, and use Java for everything else.

Very, very cool stuff. While it limits the portability of the application, at least you still only have one layer of software to port -- the native paint method.

I am a Jedi, like my father before me
There are differences between jdk1.3 rc1 and rc2. The app I''m developing got totally useless when we ran it under rc1 (much slower than jdk1.2) but got a great speed boost under jdk1.3 rc2 (faster than 1.2). Now Sun has released rc3 but I have not tested it yet. Still, from my experiences with rc2, I think jdk1.3 will be great.

Henry
I heard that JDK 1.3 has some other cool features like RMF sound, well, I don''t know if it''s that cool.

I just can''t see why to create Java game which uses C++ source? It limits sometimes so critically portably so that your game sits like duck in Windows. Why create game with Java if it''s not runnable in any other systems than Windows?

We all can notice that Java''s speed is increasing, but when it is fast enough? Never... =) I think it''s fast enough when graphics engine takes only 30-50% from cpu time and sound enviroments takes 20%, rest of cpu time is used for calculating and threads on average system of course0. I have also noticed that good way to slow your game is to add more threads I don''t know if I am the only but I think that those threads are really slow or then i''m doing something wrong. I think we are able to do more advanched things when Java leaves some CPU time for nothing. See? Then we can use that overtime for cool tricks and effects.

What do you think about java2D?

Time comes, time goes and I only am.

This topic is closed to new replies.

Advertisement