FARSEER Physics Engine

BlitzMax Forums/BlitzMax Programming/FARSEER Physics Engine

Armitage 1982(Posted 2008) [#1]
Today i found this interesting physics Engine :
http://www.codeplex.com/FarseerPhysics

Farseer does have such nice Features list !
I wonder if it's actually possible to wrap .Net Libs to Blitzmax.

Anyone knows ?

By the way, does anybody is working on a Box2D wrapper Module ?

Thanks


Brucey(Posted 2008) [#2]
..anybody is working on a Box2D wrapper Module ?


Maybe :-p


Vilu(Posted 2008) [#3]
Hmm, I like the concave collision shape support promised by Farseer.

Maybe :-p

Ooh... ;)

How does Box2d compare to Chipmunk? Isn't the latter based on the former?

I might finally bite the bullet and redo my beloved home-made physics engine of my project with a 3rd party engine just because of the collision shape pain.


Armitage 1982(Posted 2008) [#4]
@Brucey: Hoho ! Glad to ear that. From you it's a guarantee of quality ;)

@Vilu: indeed, concave collision shape ! It's probably the first time i could try a 2D engine with this feature. It would probably open a new world of possibilities :)
From what i can remember, Box2D inspire Chipmunk, is more complete, has less issues (like soft collision stack weird behaviour) and finally has a bigger community.

You should compare both by yourself but the Chipmunk wrapper Module release by Brucey work like a charm and is very capable :)


Armitage 1982(Posted 2008) [#5]
Just one word : WOW

http://www.phun.at/


tin(Posted 2008) [#6]
thats amazing.


plash(Posted 2008) [#7]
Phun would be fun in blitzmax :P


Armitage 1982(Posted 2008) [#8]
The Box2D v2.0 is definitely the physics engine i need for my project.
Because there is Continuous collision detection, callback collision and no problem with bouncy stacking objects (known problem of Chipmunk).

Brucey can i ask you if you're working on the Box2D 2.0 wrapper version ?
I have no idea how to make a wrapper for Blitzmax (maybe it's time to learn that point ^^) but i need to know if it's better to wait than playing try/catch for months on this ^^

Thank you :)


Brucey(Posted 2008) [#9]
Brucey can i ask you if you're working on the Box2D 2.0 wrapper version ?

Actually started it a while ago, but it wasn't high on the priorities... keep an eye out in the other forum for any news/progress.


Armitage 1982(Posted 2008) [#10]
Ok thank you Brucey !

I try to learn how to wrapp library myself by taking chipmunk source as example but writing the glue.cpp is quite too complicate for me at this time.

Also there is many class... I don't think it's the wrapper to start with for me :)

I will probably wait for this wrapper get on your roadmap then.

I would be pleased if you release worklog about it from time to time :)

I'm sure i'm not the only one interest by Box2D and Physics engine in general.

Thanks ;)


nino(Posted 2008) [#11]
I think I would miss the circle shape from chipmunk in Farseer. What I would REALLY love is to find an engine that supports concave circle or curve segments. In other words a half-pipe for all you skate/snow boarders ;)


Armitage 1982(Posted 2008) [#12]
What do you mean Nino ?
There is a circle shape with Farseer, even with Box2d. I mean it's a default shape from any noticeable physics engine. The simplest form you can perform and calculate.
Maybe you confused with the AABB region box that you can see with debug screenshot of Farseer ? Dunno.

By the way Farseer has much more shape than any others physics engine ported to Blitz (i think but i'm not sure of that) because you can produce convex AND CONCAVE polygonal shape !

Is there anybody who know if .net library can be ported to Blitzmax ?? I don't know much about this platform and don't have much time to learn more about it.
Maybe by wrapping a custom made DLL? Since it is C# and not C/C++.


popcade(Posted 2008) [#13]
>Is there anybody who know if .net library can be ported to Blitzmax ??

Well, it depends, for example I read a Verlet article and ported a bmax version verlet(someone did better and made the source available).

If there's the source(hmm, there is....) it's possible to translate one if you're good at math and C# and BMax.

Btw, I'm using chipmunk all the time now, translating code is far too complex work anyway.


Armitage 1982(Posted 2008) [#14]
Yeah i think you're right.

Translating code is too complicated and would result in bad performance which is not what we are searching for...

I'm about to leave the idea of porting Farseer to pay much more attention about Box2D.

Unfortunately i don't have the required level in C++ to "Glue" the source from box2d to Blitzmax (there is too much lack of informations about how to wrap correctly this kind of engine).
I can only do half of the road when i look around others wrap...

Maybe it's possible to use Box2D as a DLL with loadLibrary ?
I don't know ? Probably this will cause trouble with callback or incompatible type definition ?

Chipmunk was my first choice but unfortunately this engine has some tiny annoying bugs and has less features/performance than Box2d.

Probably i will use Box2D in a native way with Haaf's game engine until some wrappers appears (and i'm sure they will, just look around every new fun games are physics based). Or maybe it's time to learn a little bit C# but i do need a good 2D engine for that :) I don't like messing with very hard code ^^


nino(Posted 2008) [#15]
circle wasnt listed in the shapes so i assumed it wasnt a part of it..

I don't see the big deal about concave polys though as in chipmunk at least you can have multiple shapes on one rigid body. multiple line segments is pretty close to poly (concave or convex) at least for static shapes where the mass and inertia arent an issue.


Armitage 1982(Posted 2008) [#16]
@nino

I remember when i was playing with shapes with another physics engine having some difficulties with concave part of my level design. It's true you can realise some kind of auto-generated convex poly to fill a concave shape but sometimes it's just too complex of performance consuming.
Well, i would probably continue with chipmunk if only the restitution stacking bug was fix (has the author promise long time ago).
Also more joint types and swept volume collision as mention in the documentation would be a good point cause too much object passing trough walls even if i'm tweaking time step / iteration. I thing it's due to the tiny shapes know issue.
The community isn't very active too...