Bullet on XNA

KleMiX
Posts: 19
Joined: Tue Sep 19, 2006 6:38 pm

Bullet on XNA

Post by KleMiX » Tue Sep 19, 2006 6:44 pm

Last edited by KleMiX on Wed Jun 06, 2007 6:19 pm, edited 2 times in total.

User avatar
Erwin Coumans
Site Admin
Posts: 4140
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post by Erwin Coumans » Tue Sep 19, 2006 7:19 pm

I have read the TODO list and found that you are currently working on: Add alternative collision detection to GJK (comparison/robustness tests, portability to GPU/ XNA C# etc)
Does this means that you are porting Bullet to C#?
I'm just asking because we started XNA Physics API project and we were planning to port Bullet to C# to enable XBox360 support... So can we wait until you will port it or your todo means something else?
It would be great if you can help porting Bullet to C#/XNA. I won't have much time do work on this, but I have a contact who wants to work in this area too.
Porting Bullet to C# would be great, and I was hoping to create a 'Bullet light' sample, as a starting point. For a proof of concept, not all features need to be ported, hence the Sphere-Sphere collision algorithm.

I just checked in a XNA testbed I received. Your help would be welcome!
Download Bullet-2.0c.zip and see in Extras/XNAPhysics a solution file. It is just an empty testbed with 2 cubes, you can control with a/c keys. No Bullet yet :-)

Bullet currently uses some STL, for vector containers, also it has its own math classes. Do you already have experience with XNA / C# math classes? Is there a replacement for container classes? I have no experience whatsoever with C#, but I can help pointing to most important Bullet parts to start with...
At initial stage it will support ODE (Open Dynamics Engine)
It would be great if we can have Bullet first. I can make sure that the work is less then porting ODE :-)

Thanks,
Erwin

remcohuijser
Posts: 1
Joined: Wed Sep 20, 2006 7:37 am
Contact:

Post by remcohuijser » Wed Sep 20, 2006 7:48 am

Hi there, let me shortly introduce myself.
My name is Remco Huijser and I am the lead engine programmer of the Cannibal Engine by Illusoft. I was asked by Erwin to help him with his Bullet to XNA project, so I created a light weight testbed (check download above).
Because I have a lot of experience with DirectX, C# etc we might work together on this, please let me know how you think about this.

Furthermore XNA contains all the vector, quaternion and matrix operations so I think we can do without STL :D

KleMiX
Posts: 19
Joined: Tue Sep 19, 2006 6:38 pm

Post by KleMiX » Wed Sep 20, 2006 3:09 pm

Erwin Coumans wrote: I just checked in a XNA testbed I received. Your help would be welcome!
Download Bullet-2.0c.zip and see in Extras/XNAPhysics a solution file. It is just an empty testbed with 2 cubes, you can control with a/c keys. No Bullet yet :-)
It's great :D
Erwin Coumans wrote:Bullet currently uses some STL, for vector containers, also it has its own math classes. Do you already have experience with XNA / C# math classes? Is there a replacement for container classes?
Math classes aren't a problem, and there are replacement for container classes.
Erwin Coumans wrote:I have no experience whatsoever with C#, but I can help pointing to most important Bullet parts to start with...
That would be great, because I have no expierence with Bullet myself.
Erwin Coumans wrote:
At initial stage it will support ODE (Open Dynamics Engine)
It would be great if we can have Bullet first. I can make sure that the work is less then porting ODE :-)
We are already supporting ODE, but we didn't port it so it can work only on PC. It's the main reason why we would like to port Bullet :)

KleMiX
Posts: 19
Joined: Tue Sep 19, 2006 6:38 pm

Post by KleMiX » Wed Sep 20, 2006 3:13 pm

remcohuijser wrote:Hi there, let me shortly introduce myself.
My name is Remco Huijser and I am the lead engine programmer of the Cannibal Engine by Illusoft.
Hi! I'm Vsevolod Klementjev, russian programmer-hobbyist :)
remcohuijser wrote:Because I have a lot of experience with DirectX, C# etc we might work together on this, please let me know how you think about this.
That would be great! You can join to the project (link in first post) then you will need to register at codeplex an give me your username. Or we can launch a new project somewhere.

User avatar
Erwin Coumans
Site Admin
Posts: 4140
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post by Erwin Coumans » Wed Sep 20, 2006 3:45 pm

I prefer to keep all versions and platforms of Bullet in the same repository at sourceforge. Perhaps you can develop the way you prefer, and make constributions? If your contribution is under the Zlib license, it will be compatible with the rest of Bullet.

We are also currently looking into a Bullet GPU version, which is in the same repository, under the Zlib.

Would that be fine?
Thanks,
Erwin

KleMiX
Posts: 19
Joined: Tue Sep 19, 2006 6:38 pm

Post by KleMiX » Thu Sep 21, 2006 2:09 pm

So we can use Bullet's SVN repository for it's port? :roll:

User avatar
Erwin Coumans
Site Admin
Posts: 4140
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post by Erwin Coumans » Thu Sep 21, 2006 3:04 pm

So we can use Bullet's SVN repository for it's port?
Definately.
I can make a branch for you, at the sourceforge SVN repo, specially for the XNA C# port. That way we can work together. Alternatively, there is also the google code repository that we can use for the XNA C# version.

Or do you prefer using your own repository? I think using Bullet's SVN repository gives both projects more visibility.

I will still create an account on your website, out of interest.
Thanks,
Erwin

KleMiX
Posts: 19
Joined: Tue Sep 19, 2006 6:38 pm

Post by KleMiX » Fri Sep 22, 2006 10:34 am

OK, so we will use your repo, than point out for us some starting point in the Bullet's classes and we will start.

User avatar
Erwin Coumans
Site Admin
Posts: 4140
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post by Erwin Coumans » Mon Sep 25, 2006 11:33 pm

We are currently cleaning up the source tree. You can see a preview for the changes here: http://www.continuousphysics.com/ftp/pu ... eview2.zip
Basically, the sources move into the 'src' folder, and get the prefix 'bt'.

The following classes are most interesting as a starting point. We can make a proof of concept that justs uses spheres. Once that works, we can add GJK (complex collision detection).

BulletCollision\CollisionDispatch\btSphereSphereCollisionAlgorithm.cpp
BulletCollision\BroadphaseCollision\btSimpleBroadphase.cpp
BulletCollision\BroadphaseCollision\btOverlappingPairCache.cpp
BulletCollision\CollisionDispatch\btCollisionObject.cpp
BulletCollision\CollisionShapes\btSphereShape.cpp
BulletCollision\NarrowPhaseCollision\btPersistentManifold.cpp

Dynamics:

BulletDynamics\ConstraintSolver\btSequentialImpulseConstraintSolver.cpp
BulletDynamics\ConstraintSolver\btContactConstraint.cpp

I will make a basic example, that uses above classes (and a few more). I will let you know once that is done.

Is that ok?
Thanks,
Erwin

KleMiX
Posts: 19
Joined: Tue Sep 19, 2006 6:38 pm

Post by KleMiX » Tue Sep 26, 2006 11:36 am

Yes, that's ok...
I'll start porting that classes...

User avatar
SteveBaker
Posts: 127
Joined: Sun Aug 13, 2006 4:41 pm
Location: Cedar Hill, Texas
Contact:

Post by SteveBaker » Tue Sep 26, 2006 1:28 pm

KleMiX wrote:Yes, that's ok...
I'll start porting that classes...
You might want to hold off for a few more days - we're in the process of a drastic cleanup of the API which will change the names of all of the classes and most of the member functions.

This is a one-time thing - but you shouldn't start your port until we're done.

KleMiX
Posts: 19
Joined: Tue Sep 19, 2006 6:38 pm

Post by KleMiX » Tue Sep 26, 2006 2:30 pm

SteveBaker wrote:This is a one-time thing - but you shouldn't start your port until we're done.
OK

crashlander
Posts: 41
Joined: Sat Apr 08, 2006 11:20 am

Post by crashlander » Tue Sep 26, 2006 11:15 pm

A fully managed C#/XNA version of Bullet would be great!

User avatar
Erwin Coumans
Site Admin
Posts: 4140
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Post by Erwin Coumans » Sun Oct 08, 2006 8:13 pm

Most of the refactoring is done now in Bullet 2.13.

Files have moved to src/LinearMath, src/BulletCollision and src/BulletDynamics, all start with bt prefix etc.

I haven't made a minimalistic sample yet, that can be used for proof of concept (only using sphere and box etc). Do you want such sample?

Thanks,
Erwin

Post Reply