LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Fool Running on November 22, 2005, 21:35:29

Title: Physics?
Post by: Fool Running on November 22, 2005, 21:35:29
LWJGL has built in support for graphics/sound/controls, has any of the dev thought about support for a free, multiplatform physics library. (for example: http://newtondynamics.com/)
I ask because I'm looking to putting some kind of physics into my game engine (having no idea where to start :? ) and I'm guessing others are wanting to do the same and I thought "why not have it in LWJGL?"  :lol:
Title: Physics?
Post by: CaseyB on November 22, 2005, 23:02:29
I think that would be very cool!  It would be a seperate module and optional so ti could still remain "Light Weight."
Title: Physics?
Post by: lightbringer on November 22, 2005, 23:42:05
You want to turn LWJGL into a kitchen sink, eh?  :D

For now you might be interested in the ode bindings for java. And there's some work underway for a native rewrite (ie, no jni). JGO physics forums have some useful info on this. However, I haven't tried ode, it's a bit over my head right now, so I can't comment meaningfully on it.
Title: Physics?
Post by: CaptainJester on November 23, 2005, 12:05:44
I think jME has a physics component.

http://www.jmonkeyengine.com
Title: Physics?
Post by: napier on November 23, 2005, 15:52:20
A "lightweight" physics engine sounds like a good idea.

But I'm not sure what you mean by "have it in LWJGL".  A physics engine shouldn't be involved in graphics.  A physics engine handles physics mathematics and simulation of motion in a coordinate system, but the visual representation is up to the rendering libes, ie. your game.  

So the engine could be used in any Java system, which I think is a handy selling point.
Title: hmmmmmmm....
Post by: Fool Running on November 23, 2005, 18:46:50
QuoteFor now you might be interested in the ode bindings for java
ODE is the type of thing I was thinking about. Thanks!  :lol:

QuoteBut I'm not sure what you mean by "have it in LWJGL"
I meant that LWJGL could have the Java binding like it has the binding for OpenGL and FMOD with maybe some usefull utility methods for making it easier to set up in games.
The Java ODE binding is pretty much what I was thinking.  :D
Title: Physics?
Post by: ilazarte on January 04, 2006, 05:02:38
what about a direct x binding?  the future of opengl on win64 looks bleak.  

with regard to physics, i think there is an jode project already out there...
https://odejava.dev.java.net/
Title: Physics?
Post by: Matzon on January 04, 2006, 07:09:51
it's pretty hard to get a direct x binding to work on Mac and Linux ;)
Don't worry - OpenGL will still be around in 10 years
Title: Physics?
Post by: ilazarte on January 04, 2006, 09:43:19
i dont doubt ogl will be here :)
i just think microsoft is trying to turn the world into

linux/mac/java/opensource*
vs.
win32/win64/.net/m$version*

i just hope java can stay somewhat neutral...

honestly i dont know much about anything with regard to game dev, but its really fun and rewarding learning all these new apis.
Title: Physics?
Post by: darkprophet on January 04, 2006, 12:39:29
The only reason anyone would use DX over OpenGL is to get better features from older cards. Take the ATI 9200 ( which is basically an 8500) it has support for HLSL shaders, yet failes to even have ARB_fragment_program shaders let along ARB_fragment_shader !

OpenGL will be around for many many years...dont believe the hype :)

DP
Title: Physics?
Post by: spasi on January 04, 2006, 13:55:11
You're wrong, with a 9200+HLSL you can't do everything you could do with ARB_fragment_program/shader. The only pixel shader profile supported under DX by an R200 chip is PS1.4 (and 1.1 of course). Which is equivalent to the ATI_fragment_shader extension, which is available under OpenGL with a 9200.

The only reason to use DX is broader support and more stable drivers.
Title: Physics?
Post by: darkprophet on January 05, 2006, 01:21:14
Oh...my bad! Ive still seen lenticular halos implemented in DirectX under this arch and i haven't seen that done in OpenGL (for this card).

The point that im making is that R200 has *some* HLSL support, but it has *no* GLSL support. It would have been better (alot better), if it would support some limited functionality of glsl (or even arbfp!)

DP