[0.14.4] Imp killed by fall damage [Resolved 0.14.5]

Locked
User avatar
pango
Posts: 3359
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

[0.14.4] Imp killed by fall damage [Resolved 0.14.5]

Post by pango »

As seem in a Grimith's stream:
https://www.twitch.tv/grimith/clip/OddV ... Do3oYVHmfX

The formula behind fall damage assumes damage is related to energy,
Potential gravitational energy Ep = mgh, so assuming initial velocity is negligible and the enemy has no flight control the final kinetic energy when hitting the floor is exactly the difference of potential energy since the enemy was standing on the ground; Nice simplification: E = -mg∆h, only the different in height needs to be recorded.
That doesn't work well for flying enemies, that rarely touch the floor and control their speed anyway. I don't know what height killed that imp, I assume its recorded initial height was its spawn height, in the room up the stairs?

I think fall damage could safely be disabled in this case for flying enemies, they never lose flight control for long enough because of recoil that fall damage should ever trigger. Could be different if they fell because of longer effects preventing flight control like paralysis. (Or maybe they naturally have feather fall ;) But personally I'd prefer they take fall damage when paralyzed, seems more interesting)

Otherwise we could base fall damage directly on kinetic energy, Ec = ½mv², but that's a larger change and assumes we track speed correctly and accurately (could require speed interpolation formula to recover some accuracy).
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: [0.14.4] Imp killed by fall damage

Post by Interkarma »

I have no problem with fall damage being removed for a flying enemy unless paralyzed.

Would you like to implement this one as you've been so involved with this system in the past?

I'll move to Issues for later, no matter who ends up picking it up.

User avatar
pango
Posts: 3359
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [0.14.4] Imp killed by fall damage

Post by pango »

I submitted a PR
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 3359
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: [0.14.4] Imp killed by fall damage

Post by pango »

Should be fixed by 0.14.5
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Locked