Slow Rush Studios logo,
    depicting an apprehensive-looking snail rushing forward

Slow Rush Studios

◂  Status Update
News index
Fiddling with Fire  ▸



Killed enemies now turn into physically-simulated corpses!

Finally a use for all that work to marry two physics engines together - phew.

The Anti-Fun Hitlist

Killing baddies is supposed to be fun, but right now it's not that fun yet.

I made a list of all the reasons why:

You get the idea - it was a long list.

Ragdoll Corpses

One item on the Anti-Fun Hitlist was that dead enemies just disappear - no corpses, no death animation, not even any particle effects.

So, corpses: should dead enemies just flip on their side and that becomes their corpse (like Broforce does)?

Nah, it seems cooler to have dead enemies physically slump down if they get killed (like in Noita):

Killing a hound now causes it to slump as a 'ragdoll', instead of just disappear!

Implementing Ragdolls

As always, I copied Noita's approach: first, take your regular enemy sprite:

The hound sprite from in-game.
Our starting point: our enemy's sprite image.

Step 2: manually split it into different pieces, one for each "ragdoll bone" (like a limb):

The hound sprite split up into separate bones, one per limb or other moving piece.
The same image, split up into 'bones'.

Step 3: automatically figure out where bones are meant to connect to each other, based on overlapping pixels between bones:

The hound sprite annotated with where joints between bones are.
Here I've manually marked in yellow the joints between bones, but normally this is calculated by the game.

Step 4: when the enemy dies, create those bones as moving bodies, set the colors of each atom to match that of the pixel and connect them up per the joints!

I also made a small refinement to allow some bones to be totally detached, so that the bow and quiver of a goblin archer could fall to the ground separately.

Here the goblin's bow-bone falls to the floor, even though it overlaps with the rest of the bones.

(Sometimes) On Fire

Since I've been using fire to kill the enemies, you may have wondered - shouldn't the enemies' corpses be burning?

The answer is Yes. (That's very astute of you to ask that question.)

But unfortunately, fire doesn't reliably burn moving bodies right now,1 so even though each moving body is made of burnable wood,2 your fireball spell will only actually set the corpse alight maybe 20% of the time.

So, fixing fire is a new entry on the Anti-Fun Hitlist!

Playable web build‎

Chuck some ragdolls around here (press G to use the grabbing tool on dead enemies, and - reminder - Tab, Tab to cast a little fireball spell):

Click to focus, then play with keyboard and mouse. No mobile support! Give feedback.


Because fire is implemented as atoms which feed on nearby atoms, and so if a moving body moves slightly then it may no longer be next to the fire that's burning it. The fix will probably be to make "is on fire" inherently part of an atom's state.


Yes, I know. Most hounds and goblins we know are made of flesh, not wood. But you can't really tell the difference because there aren't any sound effects based on atom material right now anyway.

◂  Status Update
News index
Fiddling with Fire  ▸