Box2D Java

Great job ewjordan and quixote-arg, all the demos work fine.

It's such a cool engine, the demos are good at showing it off. The dominos one is my favourite.

In terms of performance I only noticed a slowdown on the pyramid demo. No rush, but let us know when you've nailed down the method names etc.

Good work guys!

Keith 🤓
Here's another demo that I finally got around to putting together: http://www.ewjordan.com/jbox2d/washingmachine.html - it runs a little slow on my machine, but it's still fun to watch.

I think we pretty much settled all the naming issues now, so the engine is now quite usable if you grab the SVN version (I think there's a slight issue still with re-using ShapeDefs, but all the demos work).
Nice demo, it's a real credit to you and Quixote for porting it and to erin for making such a thing. How can all that physics work in such a neat way when the objects in the washing machine are so little & chaotic? impressive.

By the way, I hate to be so unco and pesky but could you post a build with that stable version? I don't know anything about SVN and it looks easier said than done to install.

Cheers guys,
Keith

EDIT: Actually, I just realised that you posted the source here: http://www.ewjordan.com/jbox2d/Pendulum_src.zip Thanks heaps!
Added the file release on sourceforge
CommanderKeith: yeah, Subversion can be a bit intimidating, but IMO, it's definitely worth getting used to, because it's extremely useful for any sort of collaboration (I even use it for projects that I'm working on myself just because it saves all the old versions). I personally only use it through the Eclipse plugin, Subclipse (http://subclipse.tigris.org/install.html has some pretty simple installation instructions that shouldn't involve any command line nonsense at all), and it integrates very well with Eclipse. To start working with an SVN project, you just go to File->Import->SVN and cut and paste the appropriate repository location, which is usually somewhere on the SourceForge page - ours is https://jbox2d.svn.sourceforge.net/svnroot/jbox2d. Everything else you need comes from right click->Team (update is the main one you need).

quixote_arg: Excellent, thanks for putting that release together, I had no idea whatsoever how to do it! Also, do you know if there's any way for me to get upload access to the project website? If not, it's cool, we should keep copies of the website files in SVN and you can upload them once in a while when you notice they have changed.
I just realized that in our port, we have a minor bug - we translated the union in b2ContactID to a class with both id and features members, but that's not exactly what should be going on. To correctly simulate a union in Java is a bit trickier.

Yet our simulations still seem to work. From what I can tell, the id field is never checked by the engine, so my question is, is it necessary at all? Or is this intended to be a user-facing feature that really can't be omitted?

If it is necessary, there are ways we can deal with it, but I just figured I would check first.
The engine looks at b2ContactID.key in b2PolyContact::Evaluate. It is necessary for warm starting to work.
Ah, thanks - you're right, I missed that. Fixed it up just by checking all the fields in features instead of the id.

Oddly enough, most of the demos look the same, so even though warmstarting wasn't working properly, something was happening... The only one that changed significantly is VerticalStack, which now doesn't wobble at all - awesome! Pyramid also seems a little bit more solid, I think.

Thanks!
Yes, those are the tests where warm-starting matters the most.

Physics engines can operate ok without warm-starting, but stability is diminished.
JBox2D is now updated to 1.4.3 in SVN: you can check it out with the command "svn co https://jbox2d.svn.sourceforge.net/svnroot/jbox2d jbox2d", though we have not done a 1.4.3 release yet, I'm still making sure that the bugs are worked out (and possibly going to do a little reorganizing of the packages before releasing).

The most recent demos are up at http://www.jbox2d.org

Original thread: https://box2d.org/forum/viewtopic.php?t=36