Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Box2DX and SFML .Net  (Read 6768 times)

0 Members and 1 Guest are viewing this topic.

Mister

  • Newbie
  • *
  • Posts: 22
  • Zomg
    • View Profile
Box2DX and SFML .Net
« on: August 25, 2013, 11:21:02 pm »
I made a little blog post about using Box2D C# (Box2DX) with SFML .Net.

http://mistermage.wordpress.com/2013/08/25/snippet-box2d-with-sfml-net/

Let me know if it helped you out in anyway :)
Check out My Blog.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Box2DX and SFML .Net
« Reply #1 on: August 26, 2013, 12:54:26 am »
Well I was expecting to see some code examples and comments  :-\ Not just a link to another blog and a project download  :'(

Anyways you can apply most (if not all) Box2D examples to the .NET bindings of Box2D.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Mister

  • Newbie
  • *
  • Posts: 22
  • Zomg
    • View Profile
Re: Box2DX and SFML .Net
« Reply #2 on: August 26, 2013, 01:06:07 am »
The Box2D version that Box2DX is based on is from ~2009; so I am not sure how many of the modern examples would be applicable.

And there is a PasteBin link about halfway through my blog post that has all the code you want to see  ;)

It is only a little snippet after all; the code in the pastebin is commented. I get what you mean though, I could make another post to comment more in-depth if need be?
« Last Edit: August 26, 2013, 01:08:36 am by Mister »
Check out My Blog.

mkalex777

  • Full Member
  • ***
  • Posts: 206
    • View Profile
Re: Box2DX and SFML .Net
« Reply #3 on: December 07, 2015, 07:28:07 pm »
Any news?
I found that box2dx cannot handle properly colisions between circle and rectangle body shape. May be anyone know on how to fix it

Rob92

  • Newbie
  • *
  • Posts: 35
    • View Profile
    • Email
Re: Box2DX and SFML .Net
« Reply #4 on: March 24, 2016, 03:40:40 am »
I tried using Box2DX at first, I got strange assertion failures when creating polygon colliders.

I now use Farseer physics, which works like a charm!
It is based on box2d but has some additional features and is written in C#.
I just changed the source abit (replaced all namespace Microsoft.Xna.Framework with Farseer)
That way it has nothing to do with XNA anymore (not that it did, was just a namespace).

https://farseerphysics.codeplex.com/

p.s. if anyone is interested, I wrote a SFML version of the debug view thing.

http://pastebin.com/L8jsKq9n

Just use your render window instead of m_game.m_Window
« Last Edit: March 24, 2016, 03:45:20 am by Rob92 »

 

anything