Health: could it be "tracked" by decimals?

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Health: could it be "tracked" by decimals?

Re: Health: could it be "tracked" by decimals?

by NeuralStunner » Wed Dec 23, 2015 3:00 pm

I would argue that there's a good reason it's a #define in the source. We've had [wiki]DamageThing[/wiki] and [wiki]Thing_Damage[/wiki] since Hexen support, so it's simple enough to instantly kill actors without using magic numbers worth of damage. Besides, any random mod using 1mil damage to kill would probably still work, unless the mod is using ungodly amounts of HP for things. (In which case it's already got problems. :P )

One good argument for increasing it as high as possible would be what I mentioned earlier: Achieving "fractional" health by scaling everything up by a thousand. A little over two billion as the "sure kill" threshold still leaves you two million "fixed point" HP. The current value acts mainly as a deterrent from using insane HP values, and uh... Well, I might have just argued myself out of this idea. :P

Re: Health: could it be "tracked" by decimals?

by edward850 » Wed Dec 23, 2015 2:30 pm

It probably could be increased, but as 1mil has already been the invulnerability foiler for some time (telefrag damage doesn't need to be achieved through telefragging explicitly to work), you could break some mods. It'd be a hard time finding which, though.

Re: Health: could it be "tracked" by decimals?

by NeuralStunner » Wed Dec 23, 2015 2:08 pm

Wow, TELEFRAG_DAMAGE is still only a million? I could've sworn it was increased after certain mods had bosses with a couple million HP...
edward850 wrote:(Well, 19bits, but you need room for overflows and the signed bit.)
Does this mean it couldn't be changed to ~2 billion and work properly? But I would think overflow cases would only be places where it shouldn't be undergoing modification anyway. (For example, a really old bug where it was affected by armor.)

Re: Health: could it be "tracked" by decimals?

by edward850 » Wed Dec 23, 2015 3:13 am

Most assuredly never. That would require code branching absolutely everything relating to health. It would also break telefrag damage and anything related, as that needs all 32bits. (Well, 19bits, but you need room for overflows and the signed bit.)

Re: Health: could it be "tracked" by decimals?

by StrikerMan780 » Tue Dec 22, 2015 10:00 pm

Graf Zahl wrote:It's not that simple. While making 'health' a fixed point property is not an issue - it will most definitely alter the effect of damage to a degree that is noticable by players, and that's never a good idea.
How viable would it be to make it a GAMEINFO thing? (Being able to specify integer or fixed-point health/damage)

Re: Health: could it be "tracked" by decimals?

by Graf Zahl » Sun Dec 20, 2015 2:29 am

It's not that simple. While making 'health' a fixed point property is not an issue - it will most definitely alter the effect of damage to a degree that is noticable by players, and that's never a good idea.

Re: Health: could it be "tracked" by decimals?

by NeuralStunner » Sat Dec 19, 2015 5:58 pm

D2JK wrote:But would it be a major undertaking to track the fractions of health as well, invisibly, behind the scenes?
In short: Yes.

If you want finer detail, scale HP and damage values up by a thousand or so. This isn't something that can change in the engine by this point.

Health: could it be "tracked" by decimals?

by D2JK » Sat Dec 19, 2015 5:48 pm

Currently, it seems health can only increase/decrease by an integer value, and decimals are either floored or rounded. But would it be a major undertaking to track the fractions of health as well, invisibly, behind the scenes?

For example, 10 hits of .1 damage would eventually cost that single health point (such hits are completely harmless as of now).

Other examples:

- Radius damage from weak explosions could now deal fractional damage
- Continuous ray attacks could deal fractional damage (but do so rapidly)
- Weak life drain attacks (A_CustomPunch) would become much easier to balance (currently, slightly too low a lifedrain factor will completely nullify the drain effect)

Top