To create the particle effects I need, I will be using Unity’s particle effect system with my own materials.
To create the fire effect, the first thing I did was to find some suitable material to work with. I found a red and orange patterned cardboard which I grabbed from the Southampton Scrapstore ages ago. I then drew flame shapes and cut them out:
I used the match for reference so that I got the size and shape that I wanted, I then photographed the cutouts:
And finally, I created an asset from this photograph:
With the asset created, I then made a particle system which used these sprites:
The particle system picks from one of these sprites at random to create a fire like effect. I played around with the various attributes of the particle system until I was happy with the result and I think it’s quite a decent approximation of fire.
Unlike my fire effect, I can’t really use found objects to create the rain effect. The problem is with transparency, the rain needs to feel like it’s moving fast and so it needs to have a transparent trail. Making this from a photograph wouldn’t really work. So instead I created a raindrop sprite digitally:
With the asset created, it was just a case of making the particle systems. I needed to make one for lighter rain and another for heavier rain:
Creating the rain effects themselves was relatively easy, the only problem I encountered was with performance. Originally, I placed the particle system above the entire level, this meant it needed to spawn around 15000 rain particles in order to cover the entire length of the level. I also added collision to the particles so that the rain doesn’t enter into buildings. As you might have guessed, 15000 rain particles with colliders attached has a tendency to slow down the game. I didn’t actually notice any performance hit on my desktop, because it’s quite a powerful machine. However, I made sure to check on my laptop because I had a suspicion that things might be different. It’s a good job I did check because the entire game ran at below 20 FPS on my laptop. To fix this problem, I just created a smaller particle effect which follows the camera. As the camera moves through the level, the rain is only visible within the bounds of the camera itself. This should have been the obvious way to implement this from the beginning, as only 1000 particles need to be spawned instead of 15000. However, once I discovered the performance hit, it didn’t take me long to realise my mistake.
Here is a video of the particle systems working along with the music and sound effects:
As you can see, when the player moves inside, the rain sound effect decreases in volume and as the player moves towards the matches, the fire crackle can be heard more. The combination of the particle systems, music and sound effects really make the game feel more atmospheric.