Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


[java] Java's capacities


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
14 replies to this topic

#1 Captain Goatse   Banned   -  Reputation: 100

Like
Likes
Like

Posted 13 April 2000 - 01:24 AM

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?

Sponsor:

#2 Jim_Ross   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 April 2000 - 02:45 AM

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?

#3 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 13 April 2000 - 03:55 AM

Jim, are you using the Java 2D routines for your graphics or are you using standard AWT graphic techniques?


#4 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 13 April 2000 - 05:34 AM

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

#5 Altmann   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 April 2000 - 02:55 AM

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

#6 Jim_Ross   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 April 2000 - 04:05 AM

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.

#7 Jerry Lynn   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 April 2000 - 04:54 AM

I found the following site that may be of some use to you...

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



#8 SteveMeister   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 April 2000 - 05:50 AM

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.



#9 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 14 April 2000 - 01:16 PM

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

#10 Captain Goatse   Banned   -  Reputation: 100

Like
Likes
Like

Posted 14 April 2000 - 06:48 PM

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.

#11 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 15 April 2000 - 01:55 AM

The reason you want to use Java is that it will cut your development time in half (even more if you plan to develop for more than 1 platform) and reduce the amount of bugs in your code... and the size of your code. We use native code for the Windows version of our software but that is just to get around a performance bug in Windows so the pure Java version of the software should work nicely on platforms without that bug.

Henry



#12 Jim_Ross   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 April 2000 - 06:59 AM

I tend to agree that in the real world development time is more highly rated than WORA. Wasn''t making the paint() method native always an option? I must remind everyone that the engine is completely unoptimized as it stands, not because I don''t know how to optimize, but because I would rather get all the functionality finished.

#13 Smoo   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 April 2000 - 11:59 AM

Hey Jim, I was wondering if you had a working demo of your game.

The main reason I ask is because all the pure java games that I''ve seen on the net are small, simple applets or apps.
It''ll be good to see something more than just a pong-sized game.

Smoo

#14 Jim_Ross   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 April 2000 - 12:23 PM

Well, right now it''s still pongs sized, in the amount of things you can do. I''m stumped on comming up with a map format, and a map maker... Any suggestions or help would be awesome

#15 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 15 April 2000 - 03:25 PM

Java''s speed in different cases really depends on the type of application and perhaps even more importantly on the JVM. Last year I was developing a simple top-down scrolling shooter in Java, since I wanted it to be cross-platform and I was running in Windows. I quickly learned that newer JVM versions are not always faster (when 1.2 was released the speed of the app became horribly slow.. most graphics things did for that matter). Java support on Macintosh was/is horrible! The only half decent JVM at that time was the Netscape one.. and in the end the game didn''t run on Macs (a demo of it I did earlier, much simpler, same graphics code but very different game code, did run though.. so with some debugging I probably could''ve gotten it to run). Java is a good language.. if only the JVMs were good too. Windows is the one platform with (what I think is) by far the best support for Java. If you develop for Windows, might as well do your graphics code in another language. Graphics aside, Java should be fast enough for almost everything in a game (excluding any JVM perks that I''m not aware of).

Short version: Java''s graphics speed is slow. Some OS/JVM combinations is better, some its much worse. If you want it to run on a certain JVM/OS test it there throughout development. Small bugs can be in the most trivial functions and those are the worst to find. Have fun!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS