Tyrbo Make your game

Free particle effects, and how to keep them fast on a phone

Particles are the cheapest way to make a game feel alive: sparks on a hit, dust where a foot lands, embers drifting off a torch. They're also the easiest way to wreck a phone's frame rate, because their cost hides where a profiler doesn't look first.

This shelf is Tyrbo's own work, made for three.js and released under CC0: flames, smoke, blasts, hit sparks, magic, a portal, weather, weapon trails and water, plus full-screen looks (pixelate, CRT, a toon outline).

What a particle effect is made of

Strip any effect down and you find the same parts:

  • An emitter: where particles start, and whether they come in a burst (a hit) or a steady flow (a torch).
  • A particle's life: how long it lasts, and how its speed, size, color and opacity change from birth to death.
  • Forces: gravity, drag, wind, a pull toward a point.
  • A look: a soft dot, a streak or a flipbook frame, and how it blends with what's behind it.

Change the life curves and the same emitter turns from a spark into a puff of smoke. That's why effects are best tuned as data, not rewritten as code.

Pool them, never create them

A particle created when it's born and thrown away when it dies looks harmless. Do it a few hundred times a second, and the garbage collector pauses the game to clean up: a stutter on every hit. The fix is a pool. Make room for the most particles you'll ever need, once, at load, and let a dying particle free its slot for the next one. Draw the whole pool as one instanced mesh or one buffer of points, so a thousand sparks cost a single draw call.

The same goes for whole effects. Keep a few explosions ready and reuse them, rather than building a new one every time something blows up.

Additive blending, and when to avoid it

  • Additive adds a particle's color to what's behind it, so overlaps get brighter. It's right for anything that gives off light: fire, sparks, magic, muzzle flashes. It needs no sorting, since adding in any order gives the same sum.
  • Normal alpha blending covers what's behind. It's right for smoke, dust and debris, which block light, and it needs sorting back to front, or overlapping puffs flicker.

Turn off depth writing for both kinds, or particles cut square holes in each other. And keep additive effects off white backgrounds: added to white, they vanish.

The phone's real limit is overdraw

On a phone, an effect costs roughly what its pixels cost. Every transparent layer is drawn again over the last, so a few big smoke puffs covering the view can cost more than a swarm of tiny sparks. To keep effects cheap:

  • Shrink particles and brighten them, rather than stacking large soft ones.
  • Cap how many can be alive, and retire the oldest first when the cap is reached.
  • Run full-screen looks such as pixelate or CRT at a reduced resolution, which suits pixelate anyway.
  • Offer a lower effects setting, and test it on the oldest phone you support.

Questions people ask

Do these particle effects work in Unity or Godot?

Not as they are, since they're written for three.js. The recipes carry over, though. Godot's GPUParticles3D and Unity's Particle System both use emitters, life curves and blend modes, so you can read a module's settings and rebuild the effect there.

How many particles can a phone handle?

It depends far more on how much of the screen they cover than on how many there are. Thousands of small sparks drawn in one call are usually fine; a dozen screen-sized smoke sprites stacked on each other may not be. Measure on your slowest target phone.

Are the effects free to use in a commercial game?

Yes. Tyrbo released them under CC0, so you can ship them in a paid game, edit the code and the shaders, and leave out any credit.

What is the difference between particles and a shader effect?

Particles are many small sprites, each born, moved and faded. A shader effect draws a whole surface or the whole screen with code on the GPU, like water, a portal's swirl or a CRT look. Many effects use both: a portal's shader surface with sparks drifting off it.

Make a game with them

Make your game

Sign in to get the plan and its concept art. Both are free.