Hello there!
I was messing about with Box2D a bit, and I noticed something that disturbed me slightly: the C# version wasn't up to date.
I took it upon myself to perform some porting duties to get 2.1.2 working under .NET (non-XNA or anything), but firstly, I had to find a medium for porting it.
Rather than choosing the general direction of porting the code itself, I made a front-end for Box2D in pure C, named Box2C. This frontend allows languages that support invoking C DLLs to use Box2D. The following are required for a port to work properly:
- Structure support
- Pointers, or "out" variables
- Callbacks from native C (although you can possibly find a workaround using a message pump, but I haven't implemented this for various reasons)
Then, from there I wrote a frontend in C# for Box2C, named Box2CS.
The reason for this slightly complicated web of frontends is for one main reason: maintainability. If, for example, a small patch is released that modifies some of the code somewhere, rather than trying to port the fixes over to a different codebase and merge stuff, you just drop in the new .lib file and recompile. That's it.
Secondly, there is a slight performance boost due to the native code running the actual simulation, although that was more of a minor thing.
Anyway, you can check out the project here:
http://code.google.com/p/box2cCurrently, Box2C and Box2CS are near-fully functional as you can see in the test apps there, with only a few minor functions missing (shape::TestOverlap, etc).
Please note that Box2DX and Box2CS are NOT compatible on a 1:1 ratio, because Box2CS uses 2.1.2 and Box2DX is an older version that did not have fixtures.
-P