01-31-2012, 05:56 PM
(This post was last modified: 01-31-2012, 06:02 PM by Silverthorn.)
Health-bars are optimized for 500hp. That's hardcoded. It guarantees a flawless working under normal circumstances. In fact, you can increase the normal red to ~510 or so 
I haven't checked out the logic behind the bar-drawing, but I assume it's just some random division-stuff (seeing that around 5hp or something like that map onto 1px) together with modulo-madness.
Generally, you can get as many hp as possible (or as many as the variable-type supports (guess something like 2^32)), it's just that the hp-bar doesn't work then. This is the reason why it's good style to spawn a milk bottle after healing to revert the hp to 500 in case it was over (refer to >this<).
@v: harr harr, I'm a ninja

I haven't checked out the logic behind the bar-drawing, but I assume it's just some random division-stuff (seeing that around 5hp or something like that map onto 1px) together with modulo-madness.
Generally, you can get as many hp as possible (or as many as the variable-type supports (guess something like 2^32)), it's just that the hp-bar doesn't work then. This is the reason why it's good style to spawn a milk bottle after healing to revert the hp to 500 in case it was over (refer to >this<).
@v: harr harr, I'm a ninja

Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~
"Freeze, you're under vrest!" - Mark, probably.
» Gallery | » Sprites | » DeviantArt
~ Breaking LFE since 2008 ~
"Freeze, you're under vrest!" - Mark, probably.
» Gallery | » Sprites | » DeviantArt