In the spirit of making death more fun, enemies & players now get crushed by moving bodies, and bleed when they get hit!
For now it's mostly you doing the bleeding, since you don't have a spell that does physical damage to enemies yet. But that'll come!
Blood Stains
Making a character (enemy or player) emit blood is just a question of adding a new red liquid & creating those atoms at the right time.
But I wanted the blood to have some impact on the environment:
Under the hood, staining is very simple: blood atoms look along their projected velocity and change the color of atoms they're about to hit; when they run out of "staining power" then they disappear.
Blood atoms soak into the terrain almost instantly, but I'd love to change that & add some neat mechanic that uses nearby blood atoms somehow - ideas are welcome!
Gibbing
Enemies falling off a ledge used to just.. disappear.
But not anymore! I combined ragdolls with blood to add "gibbing":
Gibbing just creates the ragdoll parts without connecting up the joints between them - then stains 'em red.
Enemies who die by taking a lot of damage all at once should also gib, but I haven't gotten around to adding that yet.
Crushing Questions
When a character gets hit by a falling piece of wood, should it kill them or just hurt them?
You could say it depends on how much force the wood applies: more force -> more damage.
But if a large piece of wood falls onto you very gently, do you take a bit of damage each second until you slowly die? What if it's heavy enough that you can't move it - do you just end up stuck?
That didn't seem fun, so now enemies & players hit by fast-moving moving bodies die instantly:
No doubt the exact threshold of what constitutes "fast-moving" will need some tweaking, but it'll do for now.
Playable web build
Alright, go paint the walls red with your own blood here:
- If you want to crush enemies, press B and use the mouse to draw a moving body.