Friday, April 22, 2011

Jitter physics

I thought it finally is time to implement some physics into my game engine.

Physics usually require a tedious amount of work and you probably need a degree in computer science and math to implement them nice and smoothly. Because i have neither, i was looking for the alternatives.
There are a handful of libraries available for C# which seem to work quite well.
JigLibX and BulletX are both implemented for Microsoft XNA, so it would require some rewriting, which wouldn't be so bad since they are both opensource.
There is however Jitter Physics which works tremendously well for me. Implementing it and getting it to work was an hours effort. It comes with samples for XNA, XBox360 and Windows Phone. The XNA sample is just that though. Jitter Physics is in no way tied to XNA like the other libraries mentioned. So it could be seamlessly implemented in my engine. It comes with the zlib license which means you can do virtually anything with it. But you should be nice and mention that you're using it. That's the least you could do!

One thing i will have to adjust would be changing the vector and matrix classes to use my own, because they currently need conversion every time. I'm curious how much of a performance gain that will bring.


Hell, thats an ugly box!
Oh yeah, since i haven't mentioned anything about the engine yet; it is in development for around 9 month in my spare time. It is realized in C# using OpenGL rendering through OpenTK.
Currently i am still working on a lot of base features rather than gameplay, even though i have some prototypes i will show off some other time.

No comments:

Post a Comment