Sign in to follow this  
rsery

Can I use BEPUphysics without having user install XNA?

Recommended Posts

Hi,
I'm making a game using SlimDX and I want to use bepuphysics which depends on XNA. What I'm wondering is, can I just include the XNA framework dll's with my game and have it work even if the user doesn't have XNA installed on their pc? I'm only developing for PC. Thanks for any insight into this.

Share this post


Link to post
Share on other sites
[quote name='rsery' timestamp='1312854701' post='4846479']
Hi,
I'm making a game using SlimDX and I want to use bepuphysics which depends on XNA. What I'm wondering is, can I just include the XNA framework dll's with my game and have it work even if the user doesn't have XNA installed on their pc? I'm only developing for PC. Thanks for any insight into this.
[/quote]

Not that I know of. BEPU is an awesome API but it makes me sad that it is so heavily dependent on the XNA api. However, i have heard mentions of projects to eliminate this.

Go to the BEPU physics forums and search there, and if you cant find anything, make a similar post there.

Share this post


Link to post
Share on other sites
[quote name='speciesUnknown' timestamp='1312855228' post='4846483']
[quote name='rsery' timestamp='1312854701' post='4846479']
Hi,
I'm making a game using SlimDX and I want to use bepuphysics which depends on XNA. What I'm wondering is, can I just include the XNA framework dll's with my game and have it work even if the user doesn't have XNA installed on their pc? I'm only developing for PC. Thanks for any insight into this.
[/quote]

Not that I know of. BEPU is an awesome API but it makes me sad that it is so heavily dependent on the XNA api. However, i have heard mentions of projects to eliminate this.

Go to the BEPU physics forums and search there, and if you cant find anything, make a similar post there.
[/quote]
A relevant thread would be: [url="http://www.bepu-games.com/forums/viewtopic.php?f=9&t=1186"]http://www.bepu-game....php?f=9&t=1186[/url]. Someone did make at least one Mono version, but it doesn't appear to be public.

I would love to see other platforms supported. The actual work involved wouldn't be too significant, since the only important dependencies are on a couple of XNA math types which can be (relatively) easily switched for an alternative library. There's a couple of mesh vertex/index extraction convenience functions that rely on the Model class, but they aren't really all that important, and could be replaced without an issue.

I would do it myself, but it's more efficient if I focus on working on the internals/hard stuff that most developers don't want to get familiar with. If the community can handle the maintenance of alternate platforms, perhaps in a Codeplex fork, I can use the saved time to improve core features :)

Share this post


Link to post
Share on other sites
[quote name='Norbo' timestamp='1312856482' post='4846494']
I would do it myself, but it's more efficient if I focus on working on the internals/hard stuff that most developers don't want to get familiar with. If the community can handle the maintenance of alternate platforms, perhaps in a Codeplex fork, I can use the saved time to improve core features :)
[/quote]
Well, I went ahead and created a fork that removed all XNA dependencies from the core library. The prototype uses SlimDX plus some extension classes to fill in the gaps and make some things a little more XNA-ish.

It hasn't been tested at all, but if you'd like to take a look or use it as a starting point, here it is: [url="http://bepuphysics.codeplex.com/SourceControl/network/Forks/RossNordby/SlimDX"]http://bepuphysics.c...ssNordby/SlimDX[/url]

I might set up an extremely basic demo for testing it soon.

Of course, my request for help with maintaining it still stands. If anyone wants to help test, fix, and maintain it so that it keeps parity with the main XNA version, I'd appreciate it!

Share this post


Link to post
Share on other sites
[quote name='Norbo' timestamp='1312871323' post='4846560']
[quote name='Norbo' timestamp='1312856482' post='4846494']
I would do it myself, but it's more efficient if I focus on working on the internals/hard stuff that most developers don't want to get familiar with. If the community can handle the maintenance of alternate platforms, perhaps in a Codeplex fork, I can use the saved time to improve core features :)
[/quote]
Well, I went ahead and created a fork that removed all XNA dependencies from the core library. The prototype uses SlimDX plus some extension classes to fill in the gaps and make some things a little more XNA-ish.

It hasn't been tested at all, but if you'd like to take a look or use it as a starting point, here it is: [url="http://bepuphysics.codeplex.com/SourceControl/network/Forks/RossNordby/SlimDX"]http://bepuphysics.c...ssNordby/SlimDX[/url]

I might set up an extremely basic demo for testing it soon.

Of course, my request for help with maintaining it still stands. If anyone wants to help test, fix, and maintain it so that it keeps parity with the main XNA version, I'd appreciate it!
[/quote]

I'm confused as to what forum we are now discussing this in... it appeared here... then I suggested to go to BEPU forums... then OP posted in XNA forums where I suggested it again... who is talking to who in what thread under what handle? :confused:

Anyway, how come BEPU has so many dependencies on XNA? Wouldn't it be better for all concerned if it was non-XNA dependent?

Share this post


Link to post
Share on other sites
[quote name='speciesUnknown' timestamp='1312943244' post='4846998']
Anyway, how come BEPU has so many dependencies on XNA? Wouldn't it be better for all concerned if it was non-XNA dependent?
[/quote]
The main library is XNA focused for two reasons:
1) There is a bit of value in not having to go through a translation layer.
2) WP7's Mango update uses SIMD acceleration for XNA math types, but that acceleration is inaccessible to user types ([url="http://blogs.msdn.com/b/abhinaba/archive/2011/04/10/simd-support-in-netcf.aspx"]http://blogs.msdn.co...t-in-netcf.aspx[/url]). While BEPUphysics does a lot of custom math and inlining due to being created prior to this announcement, there should still be enough areas where the XNA math is used that it should get a noticeable boost from SIMD. I hope to see similar extensions become user-accessible in the future, especially on other platforms. If Microsoft chooses to make the extensions more widely accessible, then I would be more inclined to do primary development on a completely dependency-free version.

Additionally, as shown by my porting the entire library to the SlimDX math library in under two hours, the dependencies are not all that significant. :)

Adding the necessary classes to the math library to make the engine completely dependency-free would probably take a single day. A lot of the math is already handled by dependency-free math extensions; note the Matrix3X3, Matrix2X3, and so on. I may take the plunge and release such a version at some point since I already have a custom Quaternion/Matrix(4X4) math library coded up from a previous project. The remaining pieces are a few simple BoundingBox/BoundingSphere/BoundingFrustum/Ray tests.

Edit: I would still really like the community to help out with the alternate versions' maintenance even if I create the first port, though :) Going through the repeated test-package-release-documentation process is tedious enough as it is without having to personally merge a bunch of changes into another version every time.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this