Jump to content
Yirktos

Fighter-Style Health Bar Concept (Armor bar now!)

Recommended Posts

I thought it would be fun to make a health bar that behaves like the kinds you see in fighting games. Where changes in health over a short period of time essentially group together. I don't see this as being particularly useful, but it could be a fun feature for a spectator HUD to have.

 

If anyone has advice for coding this in a better way, I'd be happy to take it.

 

Video:

https://www.youtube.com/watch?v=JTMxKurCKvk

 

Health Bar

Armor Bar

Share this post


Link to post
Share on other sites

Reminds me of Mortal Kombat :D Great work and an awesome idea but other than looking good, I don't think it will be very practical.

Yeah, I'm aware it's not that useful. It's intended to be something you can use to make a spectator hud prettier.

 

 

I might actually find this usefull, is it easy to change the delay?

If you're talking about the delay for the buffered pickup/damage to start draining, then yeah. Just change the constant "healthAlarm" near the top of the code. It's measured in seconds. You can change the rate that the buffers drain at with the constant "drainRate", though that might take some fiddling with to get it to the speed you want.

 

 

I'm currently working on fixing a small bug where if you have a lot of positive health change stored, and then take a lot of damage, your health color will snap to a value as if you had taken that damage without getting the pickups (the color will represent you as having had a much larger amount of health before draining). Once I get that fixed I'll make an armor bar like this as well. I think I will make a truehealth/stack bar for arena modes too.

Share this post


Link to post
Share on other sites

Update: Fixed bug described here.

I'm currently working on fixing a small bug where if you have a lot of positive health change stored, and then take a lot of damage, your health color will snap to a value as if you had taken that damage without getting the pickups (the color will represent you as having had a much larger amount of health before draining). Once I get that fixed I'll make an armor bar like this as well. I think I will make a truehealth/stack bar for arena modes too.

Share this post


Link to post
Share on other sites
the bar looks really cool! good job!
 
i proposed this duel mode in irc once:
 
the match isn't limited by timelimit, but by a second fighting-style healthbar, like the one you made. both you and your enemy have.. let's say 3000 "main health", but you spawn with your usual 100/0 and play like you usually do, just that the goal is to get your enemy's main health to 0 to win a round. bo3 wins the map.
the two major differences would be: 
 
• DEALING DAMAGE HAS MORE WEIGHT ON MATCH RESULT
 
example: match starts. both players pick up ga and rl. you hit one direct rocket, he hits two direct rockets and kills you, then stacks up again in 3 seconds with bubbles and armors, you spawn at 100/0.
 
in classic duel: the rocket that you hit was almost "useless", because all it did was grant him the ability to deny you more items (armors and bubbles), the score is 1:0 against you now and your enemy probably has maplock
in fighting style duel: you end up the same way, spawning with 100/0. your main health is 2830 now, your enemy's is 2930 (example numbers, didn't do the protection math). the rocket you hit had a bigger impact on the outcome of the game and you came closer to your goal.
 
• NO MORE +BACK IN THE LAST 1-2 MINUTES BY THE "WINNING" GUY, WHILE OTHER GUY HAS MAPLOCK
 
i seriously hate to see this. you spec a tense match and the underdog is gaining the upper hand slowly, working on his comeback, getting close... only to chase a +backing enemy for 1 1/2 minutes and still lose. the fighting style duel mode would make this tactic obsolete obviously, as you'd have to chase down your enemy until the end (0 main health), no matter which position you are in

Share this post


Link to post
Share on other sites

now that i think about it, it would also lower the importance of inital spawn luck significantly. in this system you'd "initial spawn" 3-5 times (bo3), instead of just one time like in classic duel.. leveling the odds imbalance between both players for having a shitty spawn

Share this post


Link to post
Share on other sites

Nice job, I really like this.

Could you possibly tweak it or create another version to be similar to the default HUD? (in terms of number size, icons, and background) I tried to mess with it earlier to try to achieve this, but I'm just not well versed in the lua code and didn't have the time to figure it out. I was able to get the numbers larger, but couldn't get the health bar to decrease from left to right and couldn't get the background to stretch over the numbers and icons.

Share this post


Link to post
Share on other sites

I was making progress on an actual HUD with this but kind of stopped working on it when I heard that HUD's would be locked down during normal gameplay. This is what I had at around that time. This version sort of fades out instead of draining. I tweaked some numbers real quick to get it closer to the proportion of the default health/armor bars.

Health bar
Armor bar

Edited by Yirktos

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×