Box2d porting

I know the older Box2d code saw several ports, so I figure the newer one will, as well - I've already seen one mention on this forum.

A few things:

First, it would be great if anyone working on a port could post a message here so that duplication of effort could be avoided and we could pool resources.

Second, a couple questions for Erin:

Do you have any preference as to where derivative projects should be located? I know Erwin prefers to keep Bullet versions all together on his site if possible rather than having them scattered across the web, but there may be reasons you'd prefer not to follow the same route (if you don't want to be seen as an uber-maintainer, for instance).

Also, I know this codebase is pretty young. How fast and how violently do you think it is going to be evolving over the next few weeks/months? If you expect major structural reworkings very soon, would it be better to hold off on porting until those are completed, or are things likely to be more incremental?

Lastly, just to register my interest/intentions: I'd like to put together a version of Box2d optimized as much as possible for Java. I'm ultimately planning to attempt a port of Bullet to Java, but looking through the source for that it seems like a pretty major undertaking, so for now I figure I'll try my luck on Box2d first. Has anyone already started doing this? If so, would you like help with the project, and if not, would anyone care to help out? I'd also love to hear any advice on the C++ -> Java translation, I know some people did this successfully for the old Box2d.

Another one that would probably be very widely used would be an Actionscript 3.0 version. I can't take this one on myself because I've never done AS3 (soon...), but I'm curious if anyone else is planning this or has already started. Might be a good idea to get started while the engine is still simple, is what I was thinking...
Here's what I'll do:

- I'll make a Box2D Ports/Spinoffs forum.
- If authors of ports/spinoffs send me a link, I'll put them on the links page: http://box2d.org/links.html

I don't think I'll include ports in the Box2D distribution because there may be many ports (as there were for Box2D Lite). I don't want to include some ports while not including others (i.e. play favorites). Also, I don't want to try to restrict people to pure ports. Spinoffs are okay too.

I really appreciated all the ports/spinoffs of Box2D Lite and I'm glad people enjoyed working with the code. I wrote the code to be educational and hopefully there are a few more successful physics programmers because of it.

The current Box2D is considerably bigger and more complex, so I expect ports will be a bigger commitment. Also, I'm writing Box2D to be high performance and robust, so it won't be as easy to understand.

I realize that people are itching to do some ports so I have been trying to bake Box2D into maturity quickly. However, if you see the TODO.txt file, you'll see that there are some big hurdles ahead. I'm guessing the most disruptive feature will be CCD.

I am also quickly trying to incorporate feedback about the API and code layout, so at least that will stabilize. So feedback is very valuable now.

What I would suggest to people interested in doing a port is to look at the TODO list and figure out what the cutoff point for the port will be. My current estimate is that each second digit version will take about 2 weeks. Then moving from a second digit to a bump in the leading digit will take a month.

I expect to get version 1.2.0 out soon. So you can gauge things from that.
Hi there!

I've started a port of Box2D. Kev Glass did the port of the old Box2D (http://www.cokeandcode.com/phys2d/), and now I'm starting from scratch with the new port. Initially I'm just doing copy & paste and making it compile, when it works, I'll start to make it more Java-friendly and optimize it where I can

Erin: it would be great if you (or anyone) could make some unit tests of the classes, because when I'm done with the porting and I try the tests, if it doesn't work, most likely I would be clueless where to start looking for mistakes, maybe I missed a - sign in a variable and it changes everything. With these simple unit tests, porting would be much easier.

I've setup an assembla SVN, will upload everything once the code compiles... if anyone wants to join, let me know

cheers
Any unit tests should be a part of the test-bed.

Many classes cannot be unit tested by themselves. The world-body-joint-contact classes form a graph together. Many of the test-bed tests cover this aspect well. Every time I add a new feature, I make sure it is incorporated into a test-bed test. Some of these tests should be more rigorous.

Some classes still need some unit testing. The memory allocators in particular need more precise testing.

There should also be some more rigorous tests of the collision code.

My hope is that people will write test-bed tests that I can incorporate into the distribution.

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