Main Menu

Simple physics demo

Started by EgonOlsen, March 29, 2008, 05:33:45 PM

Previous topic - Next topic

EgonOlsen

Here's a new webstart demo: 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

I won't release the sources of this demo, because they are a bunch of hacks. However, the results are quite nice IMHO. Enjoy!

raft

quite impressive :) it's nice to see that missing libraries for java game development are fulfilled one by one

fireside

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. 
click here->Fireside 7 Games<-

JavaMan

#3
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

EgonOlsen

Quote from: JavaMan on March 30, 2008, 12:46:25 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.

JavaMan

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.

EgonOlsen

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...

JavaMan

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.

EgonOlsen

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/

JavaMan

Thanks for the link, looks like a great thing in the jre!