04 / Impact
Impact particles
a burst that marks where it hit
A handful of sparks, chips or dust thrown out at the point of contact. They pin down exactly where a hit landed and which way it travelled, which matters most when the screen is busy. Keep them quick: a cone of particles that arcs under gravity and is gone in under half a second.
- Hits, bullets striking walls and heavy footsteps
- Breaking props
Prompts to paste
Add a hit burst: from a pooled emitter at the contact point, fire 10–20 particles in a cone around the hit direction with randomised speeds, under gravity and air drag; each lives 0.2–0.5 s, shrinking and fading as it dies.
Create a pooled particle emitter for impacts. When a hit lands, emit 16 particles at the contact point, spread across a 90° cone centred on the hit direction. Give each one a random speed of 100–260 px/s (2–5 m/s in 3D), gravity, some air drag and a random lifetime of 0.25–0.5 s, and scale and fade it down over its life. Pick the particle look from the surface that was struck, such as sparks on metal and dust on stone, and reuse pooled particles instead of allocating new ones.
Examples
Point the cone
Debris that flies along the hit direction shows where the blow came from. An even spray in all directions reads as an explosion instead.
Let the surface choose the look
Same timing, different particles: sparks for metal, splinters for wood, puffs for stone.
Frame the hit, don't hide it
About a third of a second is plenty. The burst should surround the target, not cover it.
Pitfalls
Allocating per particle
Creating and destroying an object for every spark causes garbage-collection stutters in long fights. Pool them.
Lingering debris
Particles that drift for a second or more clutter the screen and mask the next attack.
Bursts in the enemy's face
Big, bright bursts in front of an enemy hide the wind-up of its next move.
Starting values
| Setting | Value | Note |
|---|---|---|
| Count | 8–24 per hit | |
| Lifetime | 0.2–0.5 s | |
| Speed | 100–300 px/s, or 2–6 m/s | |
| Cone | 60–120° |