Hi.
I would like to make C# port of Box2D. At this moment I'm not planning any changes in code, and my aim is - pure Box2D (C#) for XNA. I would like to know, is there a necessity in such project?
Thanks.
Personaly, I would love to see a non-xna port. But I'm guessing there's enouogh interest.
Edit: Btw, I do remember seeing a C# port using XNA, but I'm not sure.
Only Vector2(3,4), Matrix structures and maybe MathHelper members will be used form XNA, but other than that port will be XNA independed. However, it is not so hard to implement structures described above 🙂.
p.s. Sorry for my English, It's not my native language.
There is no port of Box2D to C# or XNA. We have C++, Java, and AS3 as the main ports.
I recommend starting from the SVN version, which will be out shortly as version 2.0.
I think an XNA port would be great since MS has opened up Xbox Live to all developers.
Let me know if you need any help with this. I'm a total C# noob - just started looking into it this week - but from what I know about C#, it seems that Java->C# would be incredibly easy to do, and I'm one of the maintainers of the Java Box2d port. Unfortunately we're not done with the 2.0 port yet, that will come a bit after the C++ one is released for real.
It looks like at one point Microsoft was even maintaining an automated tool to do just this (Java->C#), has anyone ever used it? I imagine anything like that is going to fail in some cases, but it might be useful for a first run. At the very least it would probably clean up any small syntax issues that you'd otherwise have to handle case by case.
I would personally suggest using the Vec2 and Mat22 classes that are internal to Box2d so that there are no XNA specific dependencies. Those classes are clean and simple to port, and they are used so much that if they relied on XNA, you'd essentially be shutting off use of the engine to anyone that wasn't using it.
If you do decide to take it on from scratch (C++ -> C#), skatehead (the AS3 maintainer) and I can help you out with any issues you run into - we hit a lot of the same bugs when doing our versions, so it's likely you'll hit some of them, too, though the existence of the struct in C# will help with some of that (and also likely lead to better performance than Java can get).
Ok, great. I'll keep an eye on it.