Zombie Car update

Here’s an update to the un-named zombie car game.


  • Shadows – a funky shader that give the shadows blurry edges
  • Zombies – They follow you
  • Trees – they fall over when you hit them
  • HUD – displaying fuel and health in a circle
  • Scripting – the level is generated using a script, separate to the game code

Features not yet implemented:

  • It’s not a game yet, there’s not much to do

I use a pretty standard shader for shadow mapping, with a 1024×1024 shadow map. I then (using a quick ‘random’ number generate) sample a nearby pixel on the depth map, which also affects the brightness. It gives a softer edge with 2 tones of ‘brightness’ with some pretty good looking noise. To keep a high resolution depth value in the depth map, i pack the depth value into 3 floats, red, green and blue.

Here’s a closeup of the shadow:

The depth texture isn’t very intuitive when packed into red, green and blue.

And here is just the blue channel, which has the most significant depth value

It’s not uploaded yet, so you can’t play it 😛