Author Topic: Health bar shifting left/right rapidly (as hit points change)  (Read 1216 times)

Offline Fleet

  • Hero Member
  • *****
  • Posts: 633
If I put an engineer on a transport thats being built, the health bar shifts left and right quickly due to the hit points changing. It can be hard to read, and probably causes eye strain over time. I'm sure it happens with other ships...perhaps this can be smoothed out?

rubikscube

  • Guest
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #1 on: June 20, 2010, 07:28:44 pm »
Confirming this, and just realized that i never realized that before, took me a while to get which health bar you were talking about though ;)

the health bar , or stats when your cursor hover over it constantly moves as the width of all numbers keep changing, best way to smooth it out is to put the max health and percentage in a defined space.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #2 on: June 20, 2010, 07:30:04 pm »
That's due to the icon grouping; it renders the bar of the lowest-health ship in the aggregate.  Normally this isn't a big deal, but when you're building lots of things at once that jumps around a lot.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

rubikscube

  • Guest
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #3 on: June 20, 2010, 07:32:19 pm »
I don't get what that means, we were talking about health bars


best solution is to make "current health" maximum health and health perentage in it's own space instead of together. even though we can see "current health" well, we need to know the percentage, but not good when it's jumping around

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #4 on: June 20, 2010, 08:05:52 pm »
I don't get what that means, we were talking about health bars

Quote from: keith.lamothe
That's due to the icon grouping; it renders the bar of the lowest-health ship in the aggregate.

As in, it renders the health bar (including the position of said bar) of the lowest-health ship in the group.

As for changing it to show some kind of average, that's been asked for before but then it's really unclear what should happen when a ship is removed from the aggregate by either destruction or getting too far away.  If it decreases the denominator (which would be the natural behavior) then the bar would decrease very slightly if only one ship in the group was getting damaged, and then jump to full when the ship is destroyed, then decrease a little less gradually as the next ship is damaged, then jump to full when it blows up, etc.  So it would be a trade from relatively consistent behavior under-fire and somewhat odd behavior when building a lot of the same unit at once in a small space, to the other way around, and the under-fire case is much more common.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

rubikscube

  • Guest
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #5 on: June 20, 2010, 09:48:25 pm »
Oh now i understand,

You're talking about when your fleet is taking lots of casualties,You find that by hovering the number of your ships bottom middle

no,no,  no  we're (at least what i think) talking about building or repairing a ship, and because the health bar numerator constant changes (building, repairing) and due to the width of each number is different, causes the numerator, demoninator and health percentage to constant jump around. You find that by hovering an individual ship at the bottom left, with the other stats such as attack and all

way to fix it is make them all individual spots that won't get affected by the other's number

though your idea of changing that is also cool too, but not critical at all, infact doesn't need changing.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #6 on: June 20, 2010, 10:49:12 pm »
Oh now i understand,

You're talking about when your fleet is taking lots of casualties,You find that by hovering the number of your ships bottom middle

no,no,  no  we're (at least what i think) talking about building or repairing a ship
Well, actually I was talking about both cases, as both cases involve health changes, but the latter is more likely to involve rapid changes in "which ship in the group has the lowest % health", and thus manifests the jitter.

Quote
way to fix it is make them all individual spots that won't get affected by the other's number
Well, yes, that would fix the original problem (though it would look weird because you'd have multiple health bars for each icon on the screen), but it would remove a goodly chunk of the actual performance gain in using icon grouping.  If you really want individual health bars for these things then it's best to just disable icon grouping (by setting icon grouping distance to zero).
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Fleet

  • Hero Member
  • *****
  • Posts: 633
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #7 on: June 21, 2010, 08:52:35 am »
Sorry for the confusion. Single ship. Pic attached. That line quickly gets a little smaller and bigger as the number change, very rapidly.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #8 on: June 21, 2010, 08:54:20 am »
Ohhhhhh, haha, yea, I totally had no idea that's what you meant :)  Yea, I figure that could be smoothed out, thanks.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

rubikscube

  • Guest
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #9 on: June 21, 2010, 04:20:11 pm »
that hurts me, really bad

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #10 on: June 21, 2010, 04:25:12 pm »
Yea, I realize now that you were talking about that ;)  My only excuse is that I was tired ;)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #11 on: August 09, 2010, 10:27:17 pm »
Worked on this for a bit, but it's a very tough problem since it's not a fixed-width font.  I can't just pad it with space characters since the real digits will keep oscillating between "8" and "1" just as fast and the total length will change.

About the only way to really fix it (other than switching to a fixed-width font) would be to split that line into two separate renders and apply a calculated x-offset (in pixels) to the second render.  But that would likely involve a significant re-engineering of the whole TextLine system, which is a bit more than I'm wanting to mess around with for this.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Fleet

  • Hero Member
  • *****
  • Posts: 633
Re: Health bar shifting left/right rapidly (as hit points change)
« Reply #12 on: August 10, 2010, 01:09:37 am »
I very much appreciate the followup. Thank you for looking into this, given the possible fixes I think its OK the way it is.