C# port of Box2D.

Discuss issues specific to the C#/XNA ports of Box2D
droobert
Posts: 6
Joined: Wed Sep 17, 2008 9:54 pm

Re: C# port of Box2D.

Postby droobert » Fri Oct 17, 2008 2:29 pm

Thanks to Ihar (and Erin of course) for these updates! My issues with PrismaticJoints in Box2dX are now solved.

JeffWeber
Posts: 40
Joined: Mon Sep 17, 2007 4:30 am
Location: appleton, wi
Contact:

Re: C# port of Box2D.

Postby JeffWeber » Tue Oct 21, 2008 10:42 am

Ihar, do you plan to port any of the user contributions into Box2DX?

One in particular is the Buoancy controller by BorisTheBrave. (viewtopic.php?f=3&t=1664)

I haven't had a chance to look at it myself, but I have a feeling it's something I'd really like to have available.


-Jeff

ihar3d
Posts: 24
Joined: Thu Feb 28, 2008 5:20 am

Re: C# port of Box2D.

Postby ihar3d » Wed Nov 05, 2008 3:22 am

It's really interesting. Thanks for the idea. I will try to make this late, unfortunately I have not time for Box2DX now.

ihar3d
Posts: 24
Joined: Thu Feb 28, 2008 5:20 am

Re: C# port of Box2D.

Postby ihar3d » Wed Nov 05, 2008 7:10 am

mmm, controller framework and buoyancy controller have been added to Box2DX :) Test it on Buoyancy test in TestBed.
Also updating to r178 is finished almost.

JeffWeber
Posts: 40
Joined: Mon Sep 17, 2007 4:30 am
Location: appleton, wi
Contact:

Re: C# port of Box2D.

Postby JeffWeber » Wed Nov 05, 2008 1:05 pm

I thought you said you didn't have time for box2dx. :D

Thanks for adding that. Can't wait till I get back to using Box2DX myself. Just need to finish current game then I'll be back to using/testing Box2DX.

-Jeff

JeffWeber
Posts: 40
Joined: Mon Sep 17, 2007 4:30 am
Location: appleton, wi
Contact:

Re: C# port of Box2D.

Postby JeffWeber » Thu Nov 06, 2008 11:40 am

Hi again Ihar.

I know you're busy on another project, but maybe next time you get back to Box2DX, you can see about implementing the thin line segment stuff mentioned here:

viewtopic.php?f=3&t=1577

Seems quite interesting and useful.

If I get back to Box2DX before you, maybe i'll see about adding it myself.

clayasaurus
Posts: 14
Joined: Wed Sep 12, 2007 2:23 pm

Re: C# port of Box2D.

Postby clayasaurus » Thu Nov 13, 2008 8:48 am

It may actually be easier to go from D --> C#, since D doesn't force OO syntax like Java does, and is probably closer syntactically to C#.

http://www.dsource.org/projects/blaze

byzantium
Posts: 1
Joined: Sat Jan 24, 2009 4:51 pm

Re: C# port of Box2D.

Postby byzantium » Sat Jan 24, 2009 5:14 pm

Thanks for all the work on this port, it's been really useful to me. Anyway, I thought I'd attempt to give something back by giving out my XNA DebugDraw class for anyone who's interested. All the drawing code is based on the OpenGL version in the 2DX testbed, the major difference being it doesn't draw directly when it gets callbacks but instead queues the draws up and waits til you explicitly tell it to draw. This lets you easily put World.Step() in your XNA Game.Update method then leave the rendering til Game.Draw.

It could definitely be much more efficient, but considering it's a debug class it does the job well enough for me right now. It supports all the basic Box2D shapes, although not the extended testbed ones (though they should be easy enough to add if necessary).

The code: http://junk.ionmine.com/cs/XnaDebugDraw.cs

Feel free to use it for any purpose whatsoever, there are some basic instructions in the comments at the top of the file.

Murudai
Posts: 5
Joined: Thu Feb 19, 2009 7:29 am

Re: C# port of Box2D.

Postby Murudai » Thu Feb 19, 2009 7:31 am

So, I'm wondering. I used this engine nicely for Windows version of XNA, but it wouldn't work for me on the Xbox 360.

Is there a way to make this work on the Xbox?

Vandash
Posts: 3
Joined: Mon Mar 16, 2009 12:20 pm

Re: C# port of Box2D.

Postby Vandash » Mon Mar 16, 2009 12:24 pm

I have the same issue, my project is working on Windows (just a static ground with a dynamic box), and when I try to run it on Xbox, it crashes with an Error 4.

Guys on the XNA forum said a few interesting things :

http://forums.xna.com/forums/p/25876/141383.aspx

I'm not really an expert when it comes to dll, but one question remains :

Can you release a dll that will work with the xbox, or it is hopeless ? Or did we do something wrong :) ?

Some more information on the crash :

An unhandled exception of type 'System.MissingMethodException' occurred in Box2DX.dll

Additional information: The version of the assembly System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089 cannot be loaded by this version of the Microsoft .NET Compact Framework.


Happens at this line :

Code: Select all

worldPhysic = new World(worldAABB, new Vec2(0.0f, 10.0f), false);


!


Return to “C Sharp”



Who is online

Users browsing this forum: No registered users and 1 guest