Thursday, July 19, 2007

[game] Ragdoll smasher

I just released my latest small game: Ragdoll Smasher. It is based on a very stupid idea: Throwing a character in the air to break stuff. I was playing with character animation and ragdolls and it seemed to be the obvious thing to do :-)

A level is complete once everything fell on the ground. The goal is to throw the smallest number of characters. New structures appear as you progress through the game.
You can download the game from here. There is nothing to install, just decompress and play. Please refer to the webpage for some more details.

From the technical point of view, Ragdoll Smasher is based on ODE and some custom character skinning code. Everything is DirectX 9.0. The skinning is performed in a vertex shader - This is convenient but unfortunately imposes some minimal requirements in terms of GPU. (I am planning software skinning for the future, but I have a limited time budget).

This is my first experience with ODE. I must say everything went smoothly. The only difficulty I had is with joint constraints for the shoulders: Here two rotation axes must be constrained and this proves difficult with a 'HINGE2' (any tips welcome!). I should probably be using motors, but I came up with something working reasonably well by connecting two hinges with a small body in between.

ODE runs in a separate thread. I enable vertical sync to give enough time to ODE to perform the simulation. I am also using variable step size - even though several webpages recommend not to, this works well in my case and it prevents the simulation to slow or accelerate with the CPU load.

Well, that's more or less all there is to say. Please post comments (good or bad) about the game - I hope you'll have fun with it!!

1 comment:

  1. Pointless destruction, now that's what I like :)

    Regarding your joint questions, You need some constraint that simulataneously limits the swing and the twist. Bullet has that, and I ended up switching to that in the end.

    Nice work...!