Unity Particle Systems!

Usage

In the context of game I created particle systems for various use cases. These include death effects, enemy and player attacks, and bringing the world space to life. For the game, I created all these effects. One of my favorite particle effects I made was a simple one where blood drops fall from various branches on a tree in our game and then splash when they reach a blood pool point on the environment art. This is a really interesting demonstration of particle system usage because it shows that they can be used for simulation of movement and animation simultaneously. Although this could be done with animation, it would require work from our sole artist, so this helps offload creative burden from them. Particle systems also handle gravity simulation much better than animation.

Another application of particle systems that proves more advantageous than using animation alone is the smoke effect I made to attach to the end of various attacks in the game. This particle system randomly selects frames from a sprite sheet, which creates a much more varied effect than looping the same animation every time it is used.

Implementation

Adding particle systems in Unity is actually quite straightforward. Unity has a built-in particle system class that can be added to empty game objects, and the rest of the work is tweaking the behavior in the editor to get the desired effect.

Key inspector properties:

  • Duration: The length of the particle system, which is distinct from the lifetime. This is important, especially if you want the particle system to loop. If the duration is longer than the lifetime, there will be a period where nothing happens before looping.
  • Lifetime: Also determines how long the particle system effect lasts, effectively dictating how long the particles will move.
  • Start Size: The size of each particle in the particle system.
  • Start Speed: how fast the particles move.

It's important to note that each of these and all other unmentioned inspector properties can be fully randomized, so you can have multiple particle systems of the same type with completely different values for each one.

Emission properties:

  • Rate over Time: How many particles will appear over a given time in seconds.
  • Rate over Distance: Determines how many particles will appear as the particle system moves in world space.
  • Bursts: Bursts are probability-based results that can randomly trigger a burst of particles throughout the effect's duration.
  • Shape: In this inspector tab, you can specify the shape from which particles will be emitted, as well as the emission angle.
  • Sub Emitters: Sub-emitters are used to specify particle systems that are activated via an activation event from the particle system itself. In the context of Conquering Ciros, I used a sub-emitter to play a blood splash animation when a blood drop fell. This allowed for maximum precision of the effect, as well as adjusting the drop's lifetime so it could fall different lengths before the animation played. 
  • Colliders: Particle systems in Unity support colliders, however in the version of Unity we use, they lack trigger functionality, which most projectiles in 2D games like ours are. To work around this, I had to create a layer mask that interacted only with the player layer for certain boss attacks in the game using particle systems.

Overview

When it comes to creative design for particle systems, the possibilities are endless. They are truly a technical artist's dream with such diverse functionality, and learning to use them is quite easy. I highly recommend trying to add one to your game projects, and it will surely bring your game to life!