Jump to content

  • Log In with Google      Sign In   
  • Create Account


[java] Getting more speed out of java


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
3 replies to this topic

#1 Kosh   Members   -  Reputation: 122

Like
Likes
Like

Posted 20 March 2000 - 11:32 PM

Hello everyone, I am interested in getting more speed out of java and well, I want to write a small but fast (enough) polygon engine, just something that can draw polygons, filling them in with a solid colour, no lightsourcing yet, just the polygons will do. But I have a question, how the hell to get more speed out of java. It''s terribly slow at even drawing a few pixels onto a 640x480 frame, let alone a full on fillpoly() routine. So, does anyone have any suggestions ? I am using MemorySourceImage as well, just in case someone suggests that, I am already using it, but apart from that, I am not sure about how I can get more speed. I have hash tabled the cos and sin values for use when rotating, this is done once for each object (done this way cause at the moment, I only have one object so....) anyone have any bright ideas kosh

Sponsor:

#2 Ingenu   Members   -  Reputation: 827

Like
Likes
Like

Posted 21 March 2000 - 02:19 AM

you can go and check this java engine :
http://www2.active.ch/~proxima/idx3d/idx3d.htm

You can use Opengl :
http://www.jausoft.com/gl4java/

or the java3d API (OpenGL or Direct3D):
http://java.sun.com

and it''ll help you.

You could use a JIT compiler, as well.
Can''t help you more cause I''m tired and have many things to do ;o)

-* Sounds, music and story makes the difference between good and great games *-

#3 Jim_Ross   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 March 2000 - 02:55 AM

The black art of java game programming has a nice Polygon 3D engine and it runs at about 60 fps. Go to a book store and buy it or read it there. Since you''re already in the process of making one you should be able to pick up on their method easily.

#4 Captain Goatse   Banned   -  Reputation: 100

Like
Likes
Like

Posted 21 March 2000 - 04:20 AM

Neat trick for everyone, use optimize code toggle in your compieler, it proviedes small speed increase. Also finalize your paint and draw everything in update.

Final public void paint(Graphics g)
{
update(g);
}

public void update(Graphics g)
{
}
Do it something like this. It is faster if you do use canvas or applet


Time comes, time goes and I only am.




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