Farseer - Monkey

Monkey Targets Forums/XNA/Farseer - Monkey

Armitage1982(Posted 2012) [#1]
I have a few questions here if you don't mind,

1) How would you proceed to use the Farseer Library in Monkey ?

2) Is there any advantage for using Monkey and Farseer this way rather than using XNA in C#?

3) I remember someone porting Farseer to BlitzMax by completely rewriting it in BlitzMax language. It was too slow unfortunately. Does anyone know if similar slow down is possible with Monkey? (Probably the same idea behind the Box2D Module)

4) Also, does anyone already try to use Mono for Mac OS X / Linux port ??


Tibit(Posted 2012) [#2]
1. That lib is nice. I used that in XNA a few years back, but it is quite big. Not a trivial thing to wrap. You can use Box2D, they are pretty similar in features, what are you missing?

2. Much simpler to use Farseer directly in XNA. In Monkey you get more platforms, maybe a neater language syntax too, however C# and Visual Studio is pretty easy to get going with.

3. The language is not to slow, the port might be. The question is what the physics-library does that requires to much CPU. Usually the limit is in how many objects you can have on screen, and even that can often be optimized.

4. XNA & .Net can be ported to Mac & Linux using monoXna. If you develop in Monkey, you can use the Blitzmax target to get Mac & linux going quickly, or the glfw target.

Armitage1982(Posted 2012) [#3]
1. There are numerous of nice additions in Farseer making it very interesting ( http://farseerphysics.codeplex.com/documentation ).
Yeah, I could use the Box2d module from muddy_shoes but it's based from Box2DFlash 2.1a and miss many important features like double sided edges, smooth chainShape, rope joint, many speed improvements and a legion of bug fixes.

2. I'll find out if MonoGame and Visual Studio C# is better for the main 3 platforms, but I'm still wondering how you can use Farseer directly from Monkey.

3. I don't known what's causing the slow down on that specific BlitzMax port of Farseer. A physics engine mainly slow down at contact solving. You can generally simulate a very huge amount of objects in one world, each collider have many optimizations to handle this.

4. Mono, MonoGame, MonoXNA... already a few solutions out there :)
I would rather prefer using GLFW, but something I don't understand is if Monkey gonna translate external libraries (think Farseer) into target code, a bit like Unity is doing for C# / Javascript.

If one day monkey is capable to use and translate libraries from one language to another then it's a flawless victory. If not, then it's useless and rather directly using C#/Java or whatever the language to support multiple platforms AND tons of libraries.

This functionality was left undocumented or unclear in Blitz3D/BlitzMax and today you have a lots of outdated modules. It's a repeating mistakes and I can't get any support on this.

Armitage1982(Posted 2012) [#4]
Also, Farseer is faster and more optimized than Box2d:

Based on the 3.2 version (now 3.3.1)

jBox2D rev 261 11/12 ms
Box2D 2.1.2 10 ms
Box2D 2.2.0 8 ms
Box2C# rev 20 13 ms
Farseer 3.2 6 ms

Farseer Physics Engine 3.2 is by far the fastest of the engines, which might seem a little odd considering it is a direct port of Box2D 2.2.0 and written in C#. However, due to the heavy manual optimizations done to the collision system, it manages to be even more efficient than the original Box2D library.


If you try the testbed example of Farseer, at the end you will spot incredible examples like Destructible Dynamic Terrain or Boolean construction.