Mono anyone?

Discuss topics related to BEPUphysics or physics engine development.
Post Reply
jsprute
Posts: 3
Joined: Thu May 12, 2011 2:08 pm

Mono anyone?

Post by jsprute »

I was curious if anyone has tried getting this engine to work with MonoGame, MonoTouch, or MonoWhatever-they-want-to-call-it. I'm currently working on a game that uses BEPU and would love to use Mono to port the game to the Iphone and eventually Android.

The source is available, if no one has done it... maybe i'll go where no one dares?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Mono anyone?

Post by Norbo »

If you decide to do it, I'll appreciate it :) I've wanted to do it for a while, but haven't had the time.

It shouldn't be too horrible- the main dependency is just on some simple XNA math types, like bounding shapes and Vector3/Matrix/Quaternion. Switching out the reference for an equivalent library should do the trick with a few using statement modifications. The TriangleMesh.GetVerticesAndIndicesFromModel convenience method has some additional dependencies, but it's not too hard to work around/replace.
jsprute
Posts: 3
Joined: Thu May 12, 2011 2:08 pm

Re: Mono anyone?

Post by jsprute »

Yeah, sure, at some point. Whenever I can afford a mac... and the EDI. :D I hope to start on it towards the end of the year, if no one beats me to it.
tksuoran
Posts: 3
Joined: Tue Jul 05, 2011 1:46 pm

Re: Mono anyone?

Post by tksuoran »

Norbo wrote:If you decide to do it, I'll appreciate it :) I've wanted to do it for a while, but haven't had the time.

It shouldn't be too horrible- the main dependency is just on some simple XNA math types, like bounding shapes and Vector3/Matrix/Quaternion. Switching out the reference for an equivalent library should do the trick with a few using statement modifications. The TriangleMesh.GetVerticesAndIndicesFromModel convenience method has some additional dependencies, but it's not too hard to work around/replace.
I managed to build BEPUphysics without XNA by making a "MiniXNA" assembly with classes from MonoXNA: http://code.google.com/p/monoxna/source ... .Framework

There was only one function that was not implemented, Vector3.Transform() with Quaternion. Implementation for this can be found from OpenTK. Then, a couple of methods from BEPUphysics need to be disabled as XNA model classes are missing. This does not remove any important functionality when not using XNA in the first place. With these mods I was able to run my OpenTK physics application with BEPU.

The results however were not quite as good as I had hoped, as there is room for improvement with collisions. I am not sure if using MonoXNA math classes could be causing some of the issues. I guess that is quite possible.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Mono anyone?

Post by Norbo »

Thanks for trying it out! Hopefully those issues are just caused by something simple in the supporting libraries.
Alic
Posts: 39
Joined: Fri Jul 29, 2011 2:25 pm

Re: Mono anyone?

Post by Alic »

Not sure how relevant this is, since I've never tried porting an XNA game myself, but have you guys seen this?

http://andrewrussell.net/exen/

Basically, it's a developer tool meant to make ports from XNA to iPhone/Silverlight/ and eventually Android as painless as possible. Apparently the iPhone and Silverlight port tools are working great right now -- people are already finishing ports.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Mono anyone?

Post by Norbo »

I did see that back when he was doing the first round of crowd funding, though it's good to see it's made progress. If someone wanted to play around with it, maybe... try to make a fork (http://bepuphysics.codeplex.com/SourceControl/network) for another platform, I'd appreciate it :)

I assume there would be some complications in the BEPUphysicsDemos/Drawer project, but the core library itself should be portable without too much of a problem.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Mono anyone?

Post by Norbo »

Well, I went ahead and created a version of the library which does not rely on XNA or SlimDX. It is still pretty raw, but it runs. Over the next few days I'll be fixing a few more bugs and filling out the xml documentation. The fork can be found here: http://bepuphysics.codeplex.com/SourceC ... ndencyFree
Deimos
Posts: 6
Joined: Sun Oct 10, 2010 2:23 pm

Re: Mono anyone?

Post by Deimos »

Well, I went ahead and created a version of the library which does not rely on XNA or SlimDX.
Will the SlimDX fork still be maintained regularly and receive fixes from the main dev fork or is it advisable to switch over to the DependencyFree fork now? I'm curious because the SlimDX fork is the only one which has not received any updates in 3 weeks while the others have.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Mono anyone?

Post by Norbo »

I don't plan to regularly update any secondary fork for in-development changes. The regular schedule will be to keep all secondary forks at the same level as the primary stable release. The development fork will be the only one moving forward between stable versions. Additionally, the updates to the secondary forks may take a day or two after the primary project is updated.

The dependency free version has been getting more updates because some things needed to be fixed and it was convenient to pull in a couple of changes from the development fork.
Deimos
Posts: 6
Joined: Sun Oct 10, 2010 2:23 pm

Re: Mono anyone?

Post by Deimos »

Thanks for the Info :) Btw the BEPUphysicsDemos project of the SlimDX fork has stil XNA references and cant be opened without an XNA SDK installation.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Mono anyone?

Post by Norbo »

Btw the BEPUphysicsDemos project of the SlimDX fork has stil XNA references and cant be opened without an XNA SDK installation.
Yup; I don't intend to create non-XNA versions of the demos project. The actual simulation setup code doesn't require any dependencies, but the renderer does. The demos project is just to verify that the forked engine is running properly.

Though if someone else wants to set up a non-XNA debug renderer and demos, I'd appreciate it :)
Post Reply