Monday, November 12, 2007

[game] Flatout 2

These days I have been playing Flatout 2. Quite nice! I especially enjoy the multiplayer Derby mode. A lot of fun - especially if you were fan of Destruction Derby or Viper Racing. I am impressed by how well the network engine copes with all the simultaneous collisions. I guess there is a lot that is asynchronous (barrels, and flying car pieces are probably not in sync) but the car-against-car collisions are nicely consistent.

I always wanted to make a fighting car game. There has been some in the past (the famous Interstate, and more recently Auto Assault - there is a list of those games on Wikipedia :-) ) but I would like to do something much more action oriented. A derby between cars with machine guns on turrets, missiles, flame thrower, chainsaw on the side, and other cool nasty weapons. Ah well, maybe one day ;-)

Friday, July 20, 2007

[game] Top 100 independent games

There is a very nice list of independent games on game tunnel:

So far I tried:

  • Mexican motor mafia This mission-based combat car game is great. I was a big fan of the CarWars board game and here I feel like I am playing it again :-) I've awlays wanted to create a game like this one... I also really like the controls. It reminds be a bit of Freelancer because you control your vehicule with arrows, aim with the mouse and the guns simply follow the move (when in range). I've always found this was a very good way to implement fights in a vehicule game.
  • Master of defense A very nice tower defense game.

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!!

Sunday, June 24, 2007

[GPU] Ocean simulation

I have been working on my ocean simulation again - It's been a lot of fun to 'resurect' this code.

The two main improvements are the addition of foam, and the 'sparkles' in areas reflecting the sun. I also added a very bad looking boat (ok, this will require more work ;-)

I was afraid adding foam would be difficult, but actually the simplest approach turned out quite well. The foam is a (toroidal) texture mapped onto the sea.

The texture I use is shown here - notice it is very dark - That's because I simply add its color to the sea color.

The foam layer is multiplied by a spatially varying control value. When the control value is 0 the foam is invisible, when 1 it is fully visible. The idea is to have foam appear where the sea surface becomes rough. To do this, I am simply using (1-sea_nrm.z) as the control value. It does work reasonably well. One improvement could be to 'blur' this control value a little bit, but the current approach seems sufficient.

Last trick: To avoid obvious repetitions, I in fact add two versions of the foam texture with different scaling values. (eg. One is repeating every 2.7 units, the other every 3.14 units).

The second improvement is the addition of 'sparkles' of light. If you've been lucky enough to witness great sunset on the sea, you may have noticed all these small 'random' light sparkles in the distance. These are due to small waves reflecting the sun light directly into your eyes. I was hoping that adding sparkles would give a better impression of detail in the distance. (Especially because we do lose detail in the distance due to filtering of higher-frequency waves).

The sparkles are generated in a post-processing step. First, I render the scene in a render target. I use this texture to compute a 'probability' for sparkle appearance. Basically, sparkles are likely to appear in areas reflecting the sun light.

Second, I render the sparkles in another render target. I use a random number generator and compare its output to the probability of appearance. If the random number is large enough a white pixel is output. Otherwise a black pixel is written. Of course the generated random numbers vary with time.

This image shows the 'sparkle' layer which is directly added to the final result. I was quite happy with the result - even though it is perfectible. I think it is quite successful in increasing the impression of detail on the ocean surface.

To conclude, here is the final result. Hopefully you can see the sparkles even at this resolution.

Next I am planning to add the reflection of the boat in the sea and implement some more credible boat dynamics (not sure about this one - will depend on the gameplay).

Of course I'd like to improve the boat model / rendering. My plan (in a world with no time constraints) would be to create a boat race - or a 'boat-war' game. So if you are a modeler please send me your best creations ;-)

Saturday, June 23, 2007

[system] Transfering my blog

I am transfering my blog to blogspot ...
This is a first post to try it out.

Cheers -