Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Alternatives to ODE ? (pure java)  (Read 5338 times)
0 Members and 1 Guest are viewing this topic.
Offline c_lilian

Senior Devvie


Projects: 1


Java games will probably rock someday...


« Posted 2005-09-13 12:27:24 »

Hi,

I'm looking for a pure java physics engine to bind it to my modest software renderer prototype (unsigned applet stuff)...

Basically it's for collision detection, moving solid objects and applying forces to springs.

Is there something like that available somewhere, idealy open-source ?

Many thanks.

Lilian

Offline c_lilian

Senior Devvie


Projects: 1


Java games will probably rock someday...


« Reply #1 - Posted 2005-09-15 07:08:42 »

Nobody ?

I'm going to find out by myself... Sad

Lilian

Offline darkprophet

Senior Devvie




Go Go Gadget Arms


« Reply #2 - Posted 2005-09-15 09:10:52 »

Being honest, i haven't seen anything yet thats does what you want.

However, i did see a little applet (about a year ago) that does use a physics system to collide a set of boxes together, handled stacks pretty well actually. But it was 2D and it cost money...I also can't find the link now, but its somewhere on forum.java.sun.com

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #3 - Posted 2005-09-15 18:05:01 »

There was talk at one point of gradually migrating ODE to pure Java.  So it would be the same API with a pure Java implementation.  I still think that is a cool idea.

Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #4 - Posted 2005-09-15 18:16:00 »

There was talk at one point of gradually migrating ODE to pure Java.  So it would be the same API with a pure Java implementation.  I still think that is a cool idea.
I think so. Is there any open-source C++ to Java "pseudo-converter" existing ?
@c_lilian : I also found very irritating when nobody answers to questions on a forum. It's not evident to know if there's no answer to the question or if nobody does mind..

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline anarchotron

Junior Devvie




...precious bodily fluids.


« Reply #5 - Posted 2005-09-15 18:38:54 »

Yep I would prefer a pure-java solution for physics.  Porting an existing API like ODE 1:1 is preferable (to me) over coming up with a new one, even if it is 'more java-ish' or 'more OO'.
Offline c_lilian

Senior Devvie


Projects: 1


Java games will probably rock someday...


« Reply #6 - Posted 2005-09-15 18:39:37 »

There was talk at one point of gradually migrating ODE to pure Java.  So it would be the same API with a pure Java implementation.  I still think that is a cool idea.

+1 ! who starts the project ? Smiley

Offline anarchotron

Junior Devvie




...precious bodily fluids.


« Reply #7 - Posted 2005-09-15 18:41:53 »

It is additionally attractive because, to some degree, it _can_ be accomplished incrementally.  You can migrate operations, and the web of direct dependencies of those operations, to java in clumps, but continue to call into C++ when possible.  The task could potentially be far more pleasant than a monolithic port.
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #8 - Posted 2005-09-15 18:52:58 »

Exactly..  Of course there is still ample room to screw up..

I think one approach would be to start with the ODE bindings and try to push the 'native' methods lower and lower until they were gone... but I say that having never looked at the code, so it could be totally the wrong way to go about it.

Offline arne

Senior Devvie




money is the worst drug- we should not let it rule


« Reply #9 - Posted 2005-09-15 18:59:44 »

directly porting ODE to java would be stupid. If somebody would be doing such a thing it would be much better to code it object-oriented rightaway!

:: JOODE :: Xith3d :: OdeJava ::
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #10 - Posted 2005-09-15 19:15:52 »

Why do you say that?

The advatages that I can think of:
- users don't need to change their code, old code that used the ODE bindings continues to work
- the JNI overhead is eliminated
- with everything in the Java domain it will be easier to modify it in small bits towards a more OO  API, or you can just layer a more OO API over the original routines.

Offline anarchotron

Junior Devvie




...precious bodily fluids.


« Reply #11 - Posted 2005-09-15 19:24:37 »

Writing yet-another-API has a whole pile of requirements and tasks that go along with it, not least of which are designing, testing, documenting, and maintaining.  The scope of such a project is a good deal larger than changing the internals of a tried-and-true, well used, and documented api like ODE.  The purpose of ODE->java migration, to me, is pure performance.  I don't have a problem with the 'non OO' API of ODE any more than I have a problem with OpenGL or AL.
Offline Jackal von ÖRF

Junior Devvie





« Reply #12 - Posted 2005-09-15 19:29:10 »

But if you made a fresh start, it might be possible to make it better than ODE. What would be such features that commercial engines have but which ODE is missing? Any ideas how to improve ODE?

Sure it would be very hard to build a new physics engine, but I don't like the idea of rewriting something that somebody has already done, unless there is some considerable improvement over the existing system. How big performance increase can be expected from converting ODE to Java?

Offline anarchotron

Junior Devvie




...precious bodily fluids.


« Reply #13 - Posted 2005-09-15 19:36:10 »

Yep that's really the question... how much performance?

Is there a java profiler out there that is good enough to separate the operation time of a native call from the JNI overhead time?

Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #14 - Posted 2005-09-15 21:20:17 »

Well there is also the benefit of not needing to distribute a native DLL, so it will work anywhere that Java runs, without security restrictions.  Like unsigned applets and Web Started applications.

It will be easier for anyone to build for the same reason.

The only way I see the performance NOT getting a boost, is if the ODE native code uses SIMD instructions to optimize some things.  I don't think there are still a lot of issues with Java's floating point that would restrict the performance enough that getting rid of the JNI call overhead wouldn't balance out.

Either way, I think there are enough reasons to have a pure Java version of ODE that even if there was no performance gain at all, it would still be better.    Though I guess without operator overloading it will look a bit messier on the insides.

Offline c_lilian

Senior Devvie


Projects: 1


Java games will probably rock someday...


« Reply #15 - Posted 2005-09-16 06:21:51 »

Well there is also the benefit of not needing to distribute a native DLL, so it will work anywhere that Java runs, without security restrictions.  Like unsigned applets and Web Started applications.

It will be easier for anyone to build for the same reason.


Yes this was my original requirements... Also, the fact to sticking to ODE is that... wel... you don't have to understand anything on physics ! you just have to apply a receipe to translate C code to Java. A project like this could stay in sync with ODE and be maintained by java developpers not knowing much of physics, like me or others (well, I've studied theses things a while back to have enough understanding of ODE internals, but it was so easy to forget ! I don't want to refresh my memory Smiley )

Lilian

Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #16 - Posted 2005-09-16 15:21:56 »

I'm really interesting in all these things, you know, because I ~3 months ago I tried to port Cal3D (an animation library in C++) to Java. And I can say it really wasn't hard, but :
 - There was no JNI bindings, so I haven't tested the Java version, because it's still unfinished (suspended for now)
 - Cal3D is completely "clean" OO

I think :
 - It's a good idea to port ODE to Java
 - It would be very easy to transform C-like ODE functions to OO-style classes, really
 - I just don't know how we will do when a new ODE version will be out.. maybe we could work with diffs ?

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline c_lilian

Senior Devvie


Projects: 1


Java games will probably rock someday...


« Reply #17 - Posted 2005-09-16 16:28:37 »

It depends on the state of ODE... I don't know it much but took for granted it was already stabilized and production quality.

If it's the case, we'd just have to loosely follow its life cycle (not really needing to stay perfectly in sync).

Well... that's my 2 cents... (I'll have a look at the C source code before commenting on it again)

Lilian

Offline arne

Senior Devvie




money is the worst drug- we should not let it rule


« Reply #18 - Posted 2005-09-16 17:21:54 »

If we do something like this, couldn't we make like in the xith ? Where there are also two renderers that can be used. And jogl and lwjgl also got differences, so this would maybe the best idea (e.g. with things like "GeomTriMesh works fine for pureJava, but is buggy with ODE" )

:: JOODE :: Xith3d :: OdeJava ::
Offline arne

Senior Devvie




money is the worst drug- we should not let it rule


« Reply #19 - Posted 2005-09-16 17:22:45 »

It depends on the state of ODE... I don't know it much but took for granted it was already stabilized and production quality.

ODE is not stabilized, there are lots of bugs still.

:: JOODE :: Xith3d :: OdeJava ::
Offline Jeff

JGO Coder




Got any cats?


« Reply #20 - Posted 2005-09-23 03:55:25 »

SHawn Kendall at FullSail/IMILabs is developing one, but its Java3D specific so if your not doign J3D it wont help much.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #21 - Posted 2005-09-23 10:11:05 »

You can take a look at Noope :

http://www.srcf.ucam.org/nope/

It doesn't seems to be very powerful, but it's pure java.

I plan to make a binding of Newton Dynamics engine ( http://www.newtondynamics.com ). But you can't use it in applets..

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #22 - Posted 2005-09-24 00:31:15 »

You can take a look at Noope :

http://www.srcf.ucam.org/nope/

It doesn't seems to be very powerful, but it's pure java.

Site last updated 4 years ago.  All it does is simple particle physics (collisions and gravity between spheres).

In otherwords it doesn't look usful.  Not even as a starting point for a proper engine. (It's also GPL, not LGPL, so useless as a real library.)

Now if Shawn's API is Open Source and uses a suitable license, perhaps it would make a good starting point for a more general engine, that is, break the Java3D ties.

Hard to say what the best path is, other than there definitely appears to be some demand for a pure Java general purpose physics engine.  Bindings to the Newton Dynamics engine will at least offer some choice, ODE, or Newton Dynamics.  Has anyone asked the Newton Dynamics guys if they are interested in a pure Java port, perhaps they would be willing to share some ideas at least.

Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #23 - Posted 2005-09-24 12:52:09 »

Site last updated 4 years ago.  All it does is simple particle physics (collisions and gravity between spheres).

In otherwords it doesn't look usful.  Not even as a starting point for a proper engine. (It's also GPL, not LGPL, so useless as a real library.)

I never said the opposite.
I have to contact Newton Dynamics developers and will do so soon.

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline t_larkworthy

Senior Devvie


Medals: 1
Projects: 1


Google App Engine Rocks!


« Reply #24 - Posted 2005-09-24 22:07:16 »

I have been thining for a while that a java engine would be so much better. Less nightmares of random crashing without hope of debugging. ODE is designed so that a custom collision system can be inserted. I think that would be the way to go. I don't feel like the ODE collision system is really very good. I think it would be better to implement a new collision system based on OBBs:-
http://citeseer.csail.mit.edu/gottschalk96obbtree.html
if that were used you would have good collisions for boxes and rays. Shperes and such I think should just be implemnted as approximations using OBB trees. I think the major weakpoint of ODE is that new geometries have to be analytically coded for colisions with every other existing geometry. I say a better system is just stick to one type of collision situation and approximate to that. 
Still, its all talk. I don't think I have time to implement it. Depends on which direction my PhD goes.

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #25 - Posted 2005-09-25 00:16:26 »

+10

I just posted some thoughts in this thread: http://192.18.37.44/forums/index.php?topic=10914.15 but I'll reiterate them here.

arne, I think there are some merits in doing a 1:1 port in this case.  Odejava already provides an excellent O-O interface to ode, and since nobody here that I know of is a real Physics expert, keeping the java code as close to the C/C++ code as possible will help from a maintenance point of view.  The main differences would be removing pointers and replacing them with arrays or buffers.  It would also mean people could use the low-level pure-Java port with Russ's documentation.

A pure-java port of ODE would solve most of the problems that Odejava is suffering.  I think it is worth a crack.

Here's the big question.  Who here supporting this idea is actually prepared to walk the walk and code it.  I am, I have a vested interest in the future and stability of Odejava.  I would like to see at least 3 people on the team, that way if one person goes I won't be left carrying the whole thing by myself.  I would like to see people who are developing their own projects with Odejava and therefore also have a vested interest in the API.

Will.

Offline Jeff

JGO Coder




Got any cats?


« Reply #26 - Posted 2005-09-25 03:29:25 »

+10

I just posted some thoughts in this thread: http://192.18.37.44/forums/index.php?topic=10914.15 but I'll reiterate them here.

arne, I think there are some merits in doing a 1:1 port in this case.  Odejava already provides an excellent O-O interface to ode, and since nobody here that I know of is a real Physics expert,

Shawn's getting pretty close.  But as I say hes workign on his own J3D based system so whiel he might answer some questions i dont thin kyould ge thim to pitch in on code.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline arne

Senior Devvie




money is the worst drug- we should not let it rule


« Reply #27 - Posted 2005-09-25 19:14:27 »

+10

I just posted some thoughts in this thread: http://192.18.37.44/forums/index.php?topic=10914.15 but I'll reiterate them here.

arne, I think there are some merits in doing a 1:1 port in this case.  Odejava already provides an excellent O-O interface to ode, and since nobody here that I know of is a real Physics expert, keeping the java code as close to the C/C++ code as possible will help from a maintenance point of view.  The main differences would be removing pointers and replacing them with arrays or buffers.  It would also mean people could use the low-level pure-Java port with Russ's documentation.
Ok I get your point Smiley
Quote
A pure-java port of ODE would solve most of the problems that Odejava is suffering.  I think it is worth a crack.

Here's the big question.  Who here supporting this idea is actually prepared to walk the walk and code it.  I am, I have a vested interest in the future and stability of Odejava.  I would like to see at least 3 people on the team, that way if one person goes I won't be left carrying the whole thing by myself.  I would like to see people who are developing their own projects with Odejava and therefore also have a vested interest in the API.

Will.
definitely - I also would try to help, but don't count on me, because I don't know if I will manage it.

Arne

:: JOODE :: Xith3d :: OdeJava ::
Offline Amos Wenger

Senior Devvie




Everything's possible, but not everything's fun...


« Reply #28 - Posted 2005-09-26 07:36:19 »

If I engage and abandonate in 3 weeks, I will lose my credibility. Err.. what credibility ? I haven't any.. Okay, so I'm with you.
Will we implement what t_larkworthy talked about ? May he imply himself too ?
I have a pretty good knowledge of C++ and Java, but I prefer to leave physics subjects to peoples that know a lot more than me..

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline t_larkworthy

Senior Devvie


Medals: 1
Projects: 1


Google App Engine Rocks!


« Reply #29 - Posted 2005-09-26 11:39:20 »

Haha. I was trying to avoid any commitment. There are elements of the OBB thing that I really don't know how to do exactly. The transforming of an arbitary trimesh to an OBB. The researches used a tool that helped them but we would need to do it from scratch. The raw realtime collision system using the OBB trees is fine. its the bit beforehand. Count me out for now becuase I really cant commit just yet. Though I am on the border at the moment. Give me a week of monitoring the forums and I might go for it.

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (38 views)
2014-12-15 09:26:44

Mr.CodeIt (31 views)
2014-12-14 19:50:38

BurntPizza (62 views)
2014-12-09 22:41:13

BurntPizza (99 views)
2014-12-08 04:46:31

JscottyBieshaar (60 views)
2014-12-05 12:39:02

SHC (74 views)
2014-12-03 16:27:13

CopyableCougar4 (77 views)
2014-11-29 21:32:03

toopeicgaming1999 (138 views)
2014-11-26 15:22:04

toopeicgaming1999 (127 views)
2014-11-26 15:20:36

toopeicgaming1999 (38 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!