C# port of Box2D.

You probably don't have opengl. I just grabed the latest code, removed the opengl test harness and compiled and ran the HelloWorld test with no problems.

-Jeff
Linked!
Erin Catto wrote:
Linked!

I'm glad to see this 🙂

SaphuA wrote:
Going to try it out for sure!
Edit: Auch, quite some exceptions there, I'll check it out a bit more later.

For using TestBed you need Tao.FreeGlut, Tao.OpenGl and Tao.Platform.Windows (please see TestBed project's references), you can download these libraries from http://www.taoframework.com/downloads or grab from recently added Box2DX 2.0.0a Demo Suite - http://code.google.com/p/box2dx/downloads/list

Thanks.
First, thanks again for this port. It is/was very needed and it's very appreciated.

I just tried the new test suite. I noticed the pyramid and the verticle stacks are not stable... they collapse pretty much instantly.

Is this a known issue?

-Jeff
I knew that ihar3d, they were already referenced. I was getting exceptions with the Pyramid and Broadphase tests. And just like JeffWeber said, most tests are very unstable. Any specific work you need help with?

Edit: Just tried revision 27 and the Pyramid test doesn't throw an exception anymore.
One other thing I forgot to mention. I compiled the Box2DX source code against the Silverlight framework to see if it would work.

It did, but required one small change to the code. "ICloneable" is used in Box2DX in one location and Silverlight apparently does not have this interface. As far as I can tell, Box2DX does not rely on the interface and I was able to remove the reference to it and compile fine.

Another option would be to create your own IColoneable interface and use that instead of the .Net framework version.

Would you be willing to either get rid of it or create your own version so Box2DX will compile without change against Silverlight?

Here is where it is used:

Code:
public class Bound : ICloneable
   {
      public bool IsLower { get { return (Value & (ushort)1) == (ushort)0; } }
      public bool IsUpper { get { return (Value & (ushort)1) == (ushort)1; } }

      public ushort Value;
      public ushort ProxyId;
      public ushort StabbingCount;

      public object Clone()
      {
         Bound newBound = new Bound();
         newBound.Value = this.Value;
         newBound.ProxyId = this.ProxyId;
         newBound.StabbingCount = this.StabbingCount;
         return newBound;
      }
   }


Thanks,

-Jeff
JeffWeber wrote:
I just tried the new test suite. I noticed the pyramid and the verticle stacks are not stable... they collapse pretty much instantly.
Is this a known issue?

Of course, here can be a lot of problems as yet. I'm working on this.
JeffWeber wrote:
Another option would be to create your own IColoneable interface and use that instead of the .Net framework version.

No problem, I will replace IClonable.Clone by own function, this function is used only in this place.
SaphuA wrote:
Any specific work you need help with?

Thank you for suggestion. In case of need I will keep in mind this 🙂 Thanks again!
There were some bug fixes in 2.0.1 related to contact listeners and warm-starting. You have to install a contact listener for warm-starting to work. Warm-starting improves stability.
Thanks, Ihar.

By the way, I posted about Box2DX on my blog. If interested you can see it here:

http://www.farseergames.com/blog/post/A ... erges.aspx

-Jeff
Hi!

I updated Box2DX to Box2D 2.0.1 (r149) and Box2DX obtained BETA status. Bug in contact solver, which caused destruction of pyramid as example, was fixed. More tests were added into TestBed, soon will be more. I uploaded Box2DX-2.0.1b-DemoSuite.zip, please see http://code.google.com/p/box2dx/downloads/list. Still there is a problem in broadphase and I'm trying to solve it. Also reference to IClonable was deleted.

Thanks!

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