Particles and Grenades

July 20, 2020

Particles and Grenades

While playing around with how grenades will work in Dead Spread, I got distracted by particles. Now all effects have been recreated using a nice simple and consistent particle system.

For a while now, we have wanted to add in some new weapons that will add a different style of combat. Explosives offer an interesting new challenge in later levels and a fun new addition to the player’s arsenal. The first explosive we have added is the grenade and we are also looking into adding a rocket launcher as well as proximity mine in the near future.

Early on while building the grenade’s exploding mechanics, I had been playing around with two ways of visualising the explosion: hand-drawn sprites, or programmatic particles. The sprites method would involve an animated image showing an explosion using a number of still frames. When the grenade explodes, I would play this animated image where the explosion happened. Particles, on the other hand, involve using a simple base image and then setting a size, colour, movement, life-span, etc. Each one is considered a single particle. You then can set how many particles to generate when and where you want them.

Two things pushed me towards using particles for explosions. First, I am not great at drawing sprites and my attempts at making an explosion that fit in with the games aesthetic were not great. And second was finding a tool which allowed me to easily visualise the particles I create while building them. The tool was Geon FX and it made working with particles far easier. Instead of doing it in code and having to compile the game to see if the changes looked right (as I had done with the flamethrower), I could now play around with settings and see how it looked in real time! This led to the nice looking explosion shown in the screenshot above.

Now equipped with the ease of creating cool new effects, I started looking at the existing, hand drawn sprites we used throughout Dead Spread. There had been a few of these that I had never been happy with but left as they were doing the trick. It was not actually on the short-term roadmap to fix up these animations, but while I was here, I decided to fix up these small annoyances. The end result is that actions and effects in Dead Spread now have a nice and consistent feel.

So with that we have released version 0.9.3 to the Google Play Store. There are now very few things left that we want to fit in before we are happy to say that version 1.0 is complete… the light is at the end of the tunnel!

On the left: bullets smashing through glass. To the right: a zombie is destroyed right in front of the player.