Monday, February 22, 2010

Collision detection and physics in XNA

It’s like a Lego owner admitting that they prefer Duplo, but I’m fond of C# and XNA for game making. If you don’t need every ounce of performance, then C# can greatly cut down your coding time.

One of the things which is lacking from XNA is a collision/physics system. There are some ‘wrapped’ unmanaged libraries, but if you want to leave the door open to running your game on 360 then you need a 100% unmanaged solution.

I just came across JibLibX (via here), which is a native port of JibLib (i.e. someone took the C++ code and rewrote it in C#). I’ve only run the sample so far, but it looks good.

Here’s a video of someone having fun with JibLibX.

1 comment:

PhoenixOnFire said...

You might also want to have a look at farseerphysics (