www.jpct.net

General => News => Topic started by: EgonOlsen on March 29, 2008, 05:33:45 pm

Title: Simple physics demo
Post by: EgonOlsen on March 29, 2008, 05:33:45 pm
Here's a new webstart demo: http://www.jpct.net/demos/jbullet/jbullet.jnlp (http://www.jpct.net/demos/jbullet/jbullet.jnlp)

It's based on the code posted in this thread: http://www.jpct.net/forum2/index.php/topic,1079.0.html (http://www.jpct.net/forum2/index.php/topic,1079.0.html)

I won't release the sources of this demo, because they are a bunch of hacks. However, the results are quite nice IMHO. Enjoy!
Title: Re: Simple physics demo
Post by: raft on March 29, 2008, 07:55:49 pm
quite impressive :) it's nice to see that missing libraries for java game development are fulfilled one by one
Title: Re: Simple physics demo
Post by: fireside on March 30, 2008, 06:47:55 am
Not bad. Bullet is constantly being worked on so it's pretty impressive.  It depends on the game whether physics are necessary.  It's nice to be able to have the option. 
Title: Re: Simple physics demo
Post by: JavaMan on March 30, 2008, 12:46:25 pm
That is so cool! Is Bullet written all in Java? Those cubes bounced around so smoothly, I didn't think Java could do that. :o

Jman
Title: Re: Simple physics demo
Post by: EgonOlsen on March 30, 2008, 02:42:44 pm
That is so cool! Is Bullet written all in Java?
Bullet is C++, but jBullet (which was used in the demo) is all Java. It's a straight port of the C++ version.
Title: Re: Simple physics demo
Post by: JavaMan on March 31, 2008, 01:34:53 pm
Thats impressive. Well, at least I think so. Maybe Java has been fast for a while, but when I first learned the language, I heard all this 'its too slow! to do anything realistic', so the fact that Java is fast enough to calculate all the "stuff" to make those boxes jump around surprises me.
Title: Re: Simple physics demo
Post by: EgonOlsen on March 31, 2008, 04:04:34 pm
Hotspot does quite a good job at optimizing and compiling Java bytecode to native code nowadays. It's dynamic compilation can even be faster than the static compilation of C/C++ because it can optimize directly for the underlying hardware. The bad news are, that this does not happen as often as i would like to see it. However, the situation improves over time...
Title: Re: Simple physics demo
Post by: JavaMan on March 31, 2008, 06:49:33 pm
I read about the hotspot, but I was a little foggy on what it is. So, does it happen in places besides applets? Thats what it seemed to me from what I read.
Title: Re: Simple physics demo
Post by: EgonOlsen on March 31, 2008, 07:08:59 pm
No, it's part of the JVM and always active. In applets as well as in applications. It's the compiler that compiles Java byte code to native code at runtime. You'll find more info here: http://java.sun.com/javase/technologies/hotspot/ (http://java.sun.com/javase/technologies/hotspot/)
Title: Re: Simple physics demo
Post by: JavaMan on April 01, 2008, 01:59:29 pm
Thanks for the link, looks like a great thing in the jre!