show health only when selected

show health only when selected

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Masse
Damned Developer
Posts: 979
Joined: 15 Sep 2004, 18:56

show health only when selected

Post by Masse »

ya ya you got the point... i do remember few rts:ses that did it this way
and the mm was it F9 should toggle between these 3 options

allways show
never show
and show when selected
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Probably the best way is just to remove this stuff from spring and implement it again in lua..
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

It could be done with the current LuaUI, but only for allied units
(I've got the code to support enemy unit queries written, but it
hasn't been committed yet).

It would be best to keep the basic F9 functionality in the main
Spring engine to minimize the overhead when dealing with large
numbers of units. For the case where only selected units get
health bars, LuaUI can do the rendering (it's already got the
GetSelectedUnits(), GetUnitHealth(), WorldToScreenCoords(),
and the necessary GL rendering calls). The stockpile build status
isn't available yet, nor are extra parameters like current shield
strength).
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

So I wrote the code to try using LuaUI to draw the unit bars,
and it seems to work fairly well (you can even setup your own
color gradient ;)) Then I got to thinking: what benefit is there
to only showing the health for selected units? The fact that you
can see the health for most enemy units in Spring makes it
kind of pointless.

One good thing that did come from this experiment is that I
noticed that the capture state can be displayed as a bar. Once
the enemy query code is in, you'll be able to draw the current
state of a capture.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

trepan wrote: One good thing that did come from this experiment is that I
noticed that the capture state can be displayed as a bar. Once
the enemy query code is in, you'll be able to draw the current
state of a capture.
That would be nice!
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Post by manored »

LordMatt wrote:
trepan wrote: One good thing that did come from this experiment is that I
noticed that the capture state can be displayed as a bar. Once
the enemy query code is in, you'll be able to draw the current
state of a capture.
That would be nice!
If possible, seeing the current status of a ressurrection would be nice too...
User avatar
Masse
Damned Developer
Posts: 979
Joined: 15 Sep 2004, 18:56

Post by Masse »

trepan wrote:Then I got to thinking: what benefit is there
to only showing the health for selected units?
preeetty thats the thing ;) :D:D i want to keep my spring clean and pretty no ugly green bars where i dont want em :) but nice to hear its do able with lua and man u can do allot of more stuff with lua i tought u been busy thanks :>
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

While you're at it, could you make it so the green selection square gradually turn to yellow and red when the unit health decrease?

From my own experience, billboarded health bar floating above unit really break the suspension of disbelief, while selection square under the unit don't.
User avatar
Masse
Damned Developer
Posts: 979
Joined: 15 Sep 2004, 18:56

Post by Masse »

zwzsg +1
RaiFox
Posts: 40
Joined: 06 Oct 2006, 16:12

Post by RaiFox »

Id also like the feature for health bars to be invisible when the unit is at full health.
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Post by 1v0ry_k1ng »

+1 again
Post Reply

Return to “Feature Requests”