Near Death Experience Toggle

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

Near Death Experience Toggle

Post by MeteoricDragon »

I'm implementing a screen flash that occurs when the player drops below a certain amount of health. It works along with the red screen flash of classic Daggerfall. I'll make it toggle-able for purists that want closer to the original experience. The toggle will allow players to experience another quality of life enhancement that warns the player when their health is too low, like most modern health-based games.

I'm playing with settings to get the right feel. but it's showing promise so I thought I'd announce it!

User avatar
InconsolableCellist
Posts: 100
Joined: Mon Mar 23, 2015 6:00 am

Re: Near Death Experience Toggle

Post by InconsolableCellist »

It sounds useful! Is it going to be a pure color, or an overlay of blood, like many modern games? Is it using the mod framework?

User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

Re: Near Death Experience Toggle

Post by MeteoricDragon »

InconsolableCellist wrote: Sun Jun 03, 2018 8:53 pm It sounds useful! Is it going to be a pure color, or an overlay of blood, like many modern games? Is it using the mod framework?
Not using mod framework. not an overlay of blood. just uses screen background color change to produce flashing effect and pulsing effect.

It blends very well with the original game design, it would be as if the developers had a little extra time and implemented something that modern games use a lot, except with graphics from 1996.

User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

Re: Near Death Experience Toggle

Post by MeteoricDragon »

Right now it looks like there might be three stages:

Stage 1: player has > 40% health, player gets classic Daggerfall flashes when struck.
Stage 2: player has 20% < health < 40%, player gets flickers when struck.
Stage 3: player has < 20% Health, player gets flickers when struck and will pulsate slowly into and out of darkness.

I will most definitely implement options to toggle these on/off because this HUD behavior wasn't originally in classic DF. I know @interkarma likes to keep a pathway open for classic experience. If this turns out well enough, it will feel pretty classic!

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

Re: Near Death Experience Toggle

Post by Interkarma »

This sounds really promising!

I recently disabled my screen flash due to differences in support now UI is rendered to an offscreen render texture. There's a new fade component that will help restore this, but I hadn't gotten around to it yet. From the sounds of it I won't need to. :)

How are you handling the rendering side at the moment?

User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

Re: Near Death Experience Toggle

Post by MeteoricDragon »

Interkarma wrote: Mon Jun 04, 2018 8:46 pm This sounds really promising!

I recently disabled my screen flash due to differences in support now UI is rendered to an offscreen render texture. There's a new fade component that will help restore this, but I hadn't gotten around to it yet. From the sounds of it I won't need to. :)

How are you handling the rendering side at the moment?
I'm currently attaching a HUDFlickerMask : BaseScreenComponent to DaggerfallHUD : DaggerfallBaseWindow via this line in the constructor of DaggerfallHUD:

Code: Select all

ParentPanel.Components.Add(flicker);
And inside the Draw() method of the HUDFlickerMask : BaseScreenComponent class I'm setting the Parent.BackgroundColor to the values that the rest of the code calculates.

I didn't touch the ShowPlayerDamage Class. Right now the change is purely color without texture.

User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

Re: Near Death Experience Toggle

Post by MeteoricDragon »

@interkarma Actually, What do you think of flashing the part of the screen towards the source of damage? Anything in 90degree arc in front of player lights up a red glow on top of the screen, and 3 more arcs for each side of screen?

Would I need a png file or could unity do something like that? I was thinking the flash should be behind everything else if I tried it.

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

Re: Near Death Experience Toggle

Post by Interkarma »

I'm wondering - as there's a basic damage red flash already in the game (PlayerDamage component) and you're adding a lot more intelligence to this, do you think it would be better to build as a mod for the game rather than into core?

Then you won't be constrained by my preferences around core. You can go nuts and make the thing as feature-rich as you like. :)

User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

Re: Near Death Experience Toggle

Post by MeteoricDragon »

Ok, that makes sense.

I've got all three stages working now. It flashes blood red on normal attacks. On 40% to 20% it flickers blood red quickly. and 20% to 0% it pulsates slowly blood red. I need to make adjustments to get the right feel for all the effects.

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

Re: Near Death Experience Toggle

Post by Interkarma »

That sounds awesome. I think it's the right call to go the mod route in this case. Looking forward to see how it all looks once ready!

Post Reply