Opened 7 years ago
Closed 7 years ago
#1011 closed enhancement (fixed)
BAR selected units visualizer
Reported by: | beherith | Owned by: | Bluestone |
---|---|---|---|
Priority: | major | Milestone: | BAR Beta release |
Component: | BAR | Version: | |
Keywords: | Cc: |
Description
I'm not really a fan of highlighting the selected units, as is currently in BAR, It would be nice to have decent looking selection circles or boxes, that are better than the default green squares, yet dont cost an arm and a leg like Floris's really great looking fancy selected units.
Bluestone, it was me who asked Floris to recommit the fancy widget, I wanted to have a look at it if it was usable as a starting point. It seems though that this is not the case.
Change History (6)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Also, for me units are not highlighted when selected (only the engines green selection rectangle shows).
edit: Found it, I think you must mean the highlight unit widget, but which units that affects is not related to which units are selected (and the x-ray shader is default off too).
comment:3 by , 7 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 7 years ago
n2s, idea:
The gadget backend includes the case removeSelectedUnit, to remove a unit from the current recorded selection without clearing all. This makes it hard for the widget part to use arraytables instead of hastable -> none did. It's used in 0.005% of cases, so can be removed, and then widget part can use array tables easily -> much faster iteration.
Would also be an idea to have selectedUnitsAdd send strings of unitIDs instead of one number per call; doing so would reduce its Script.LuaUI calls called by a factor of 10.
In widget part, probably should iterate over selected units and filter for visibility/icon (unfortunately, Spring.GetVisibleUnits doesn't readily return a hash table).
comment:5 by , 7 years ago
Doing the above provides a 30-50% perf improvement, but is unfortuantely not worth the extra complications required to book-keep.
comment:6 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
slowly rotating hexagon (todo: chilify options, hijack cmd colors, merge with highlight_units.lua)
There's no a priori reason for a selected units widget to need lengthy code or have more than a minor perf impact. I'll look into it but I'd like to finish the airbase gadget first.
Doing it with a shader (maybe even inside the custom unit shader) is another idea, ofc with fallback to engine default for people without shader support.