Server activation of client damage animation

Post Reply
repetitivestrain
New member
Posts: 8
Joined: Fri Aug 09, 2024 01:54

Server activation of client damage animation

by repetitivestrain » Post

We at Mineclonia are trying to augment the engine damage system with a floating point health gauge, which is already in quite decent shape, but with the caveat that damage that is not sufficient to modify the engine HP is registered without the corresponding scene tilt and tint animation on the client side. Is there a means of activating it that I might have overlooked, or are we really screwed till the engine developers introduce one?

User avatar
Mantar
Member
Posts: 620
Joined: Thu Oct 05, 2017 18:46
Contact:

Re: Server activation of client damage animation

by Mantar » Post

Can you not increase the max HP? Say you double it, the player has 40 HP internally, but you display it as 20 and double incoming damage. Now a hit that would do 1/2 a point damage before does a full point and should trip the damage effects. Scale up to whatever resolution works.
Bit of a pain to deal with altering player/mob/fall/node damage but that's what on_player_hpchange is for.
Lead dev of Exile, git repo: https://codeberg.org/Mantar/Exile

repetitivestrain
New member
Posts: 8
Joined: Fri Aug 09, 2024 01:54

Re: Server activation of client damage animation

by repetitivestrain » Post

That introduces numerous special cases, and engine HP is limited to 65535 anyway, giving us very little breathing room. Not to mention that it doesn't agree with Minecraft's HP.

Astrobe
Member
Posts: 612
Joined: Sun Apr 01, 2018 10:46

Re: Server activation of client damage animation

by Astrobe » Post

There's also a case for healing (e.g. green flash) and progressive damage color flash (.e.g. from yellow to red as the player's HP get dangerously low). The effect is hard coded, but as Mantar said, now with on_player_hpchange one can consider letting mods disable it and manage it themselves.

Another option is to supplement the default effect with something like what the "vignette" mods do (screen-wide texture that just darken the corners/borders of the screen), but last time I tried, it had an impact on FPS (not to mention that it is a heavy asset).
My game? It's Minefall.

repetitivestrain
New member
Posts: 8
Joined: Fri Aug 09, 2024 01:54

Re: Server activation of client damage animation

by repetitivestrain » Post

Unfortunately this is not an option for us, I think, as it would be still greater a departure from Minecraft.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests