DEV Community

Katana Works
Katana Works

Posted on Originally published at learn.katanaworks.dev AI-assisted

How to Build a Pro Death Animation in GDevelop Using the Particle Emitter

A character that just vanishes when it hits a spike feels unfinished. A character that bursts into particles feels like a real game. The difference is about ten minutes of setup in GDevelop using the Particle Emitter.

This approach gives you a dynamic burst effect that varies slightly each time it triggers, so the player never sees the exact same death twice. No sprite sheets, no pre-rendered videos — just one emitter object and a few events.

Prerequisites

You need a working scene with:

A player with the Platformer Object behavior attached
Input handling events (movement, sprite flipping)
A hazard object (spikes, enemy, whatever kills the player)

If your player can move and your spike exists, you're ready.

Create the Particle Emitter Object
Add a new object to your scene → select Particles Emitter from the list. This is your death effect — the "soul" or debris burst that plays when the player dies.

The default settings are a mess for this use case. Here's what to change:

Delete when out of particles → ON. If you skip this, the emitter object persists invisibly after the animation finishes. That means wasted processing and potential visual glitches on respawn.

Number of particles in tank → 1. This is the one most people get wrong. The default is -1, which means infinite particles — great for fire or rain, terrible for a death burst. You want a single controlled pop, not a fountain. Set it to 1.

Gravity on Y-axis → ~800. This gives the particles weight so they arc up and fall back down instead of floating off screen.

Particle start/end size → 50%–100% of your character's size. Too small and the death feels insignificant. Too large and it looks disconnected from the player sprite.

Min/max variation values (e.g., -640 to 640): This randomizes the burst angle slightly each time, so every death looks a little different. That's where the "pro" feel comes from.

Event Sheet Logic

Three actions on one event. That's the whole system.

Condition: Player is in collision with Spike

Action 1: Create object → your Death Particle Emitter, positioned at:

X: Player.CenterX()
Y: Player.CenterY()

This spawns the burst at the center of the player, not at some arbitrary origin point. The effect looks like it's coming from the character.

Action 2: Rotate towards angle → apply to the Death Particle Emitter

Angle: -90 (straight up)
Angular speed: 0

This is what gives you the upward burst instead of particles spraying sideways or downward.

⚠️ Watch out here. GDevelop has several similar-looking rotation actions — "Rotate towards position," "Rotate towards object," etc. If the action asks you to select another object, you picked the wrong one. The correct action only asks for two numbers: angle and speed.

Action 3: Add the Trigger Once condition to this event.

Without Trigger Once, GDevelop creates a new emitter every frame the player overlaps the spike. That's dozens of particle bursts stacking on top of each other per second. Your game will lag, the effect will look horrible, and you'll spend an hour debugging something that's just a missing condition.

Details That Matter

Hide or delete the player sprite immediately. Once the death triggers, the player shouldn't be standing on the spike while particles burst out of them. Delete the player object or set it to invisible in the same event so the particle effect is the only thing on screen.

Match particle size to sprite size. If you rescale your character later, update the emitter settings too. Mismatched sizes break the illusion instantly.

Tweak gravity and velocity for different feels. High gravity + high velocity = heavy dramatic death. Low gravity + low velocity = floaty cartoony pop. Small changes to these two values completely shift the tone.

The Quick Reference
Particle tank: 1 (not -1)
Delete when out of particles: ON
Y gravity: ~800
Spawn position: Player.CenterX(), Player.CenterY()
Rotation angle: -90 degrees, speed 0
Always use Trigger Once on the collision event
Hide/delete the player sprite on death

One emitter, one event, and your deaths go from "programmer placeholder" to something that actually feels like a game. Experiment with the values from here — the particle emitter has a lot of range once the foundation is right.

Top comments (0)