Page 1 of 5

Bullet on XNA

Posted: Tue Sep 19, 2006 6:44 pm
by KleMiX

Posted: Tue Sep 19, 2006 7:19 pm
by Erwin Coumans
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

Posted: Wed Sep 20, 2006 7:48 am
by remcohuijser
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

Posted: Wed Sep 20, 2006 3:09 pm
by KleMiX
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 :)

Posted: Wed Sep 20, 2006 3:13 pm
by KleMiX
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.

Posted: Wed Sep 20, 2006 3:45 pm
by Erwin Coumans
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

Posted: Thu Sep 21, 2006 2:09 pm
by KleMiX
So we can use Bullet's SVN repository for it's port? :roll:

Posted: Thu Sep 21, 2006 3:04 pm
by Erwin Coumans
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

Posted: Fri Sep 22, 2006 10:34 am
by KleMiX
OK, so we will use your repo, than point out for us some starting point in the Bullet's classes and we will start.

Posted: Mon Sep 25, 2006 11:33 pm
by Erwin Coumans
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

Posted: Tue Sep 26, 2006 11:36 am
by KleMiX
Yes, that's ok...
I'll start porting that classes...

Posted: Tue Sep 26, 2006 1:28 pm
by SteveBaker
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.

Posted: Tue Sep 26, 2006 2:30 pm
by KleMiX
SteveBaker wrote:This is a one-time thing - but you shouldn't start your port until we're done.
OK

Posted: Tue Sep 26, 2006 11:15 pm
by crashlander
A fully managed C#/XNA version of Bullet would be great!

Posted: Sun Oct 08, 2006 8:13 pm
by Erwin Coumans
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