Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Arch@on

[java] Java's capacities

This topic is 6821 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
And I assume that if anybody was willing to rewrite the classes with parametric types, you would have a pretty good speed.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!