Author Topic: Simple physics demo  (Read 5675 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Simple physics demo
« on: March 29, 2008, 05:33:45 pm »
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!

Offline raft

  • quad
  • ******
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: Simple physics demo
« Reply #1 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

Offline fireside

  • double
  • *****
  • Posts: 605
    • View Profile
Re: Simple physics demo
« Reply #2 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. 
click here->Fireside 7 Games<-

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Simple physics demo
« Reply #3 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
« Last Edit: March 30, 2008, 12:49:05 pm by JavaMan »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Simple physics demo
« Reply #4 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.

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Simple physics demo
« Reply #5 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Simple physics demo
« Reply #6 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...

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Simple physics demo
« Reply #7 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Simple physics demo
« Reply #8 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/

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Simple physics demo
« Reply #9 on: April 01, 2008, 01:59:29 pm »
Thanks for the link, looks like a great thing in the jre!