TeamCircles
Moderator: Moderators
Re: TeamCircles
Very nice indeed. For an improvement, you could add user-friendly customisation controls. Maybe just some simple things like two sliders for adjusting radius or glow thickness of the circles.
My main query though before I start using this is, is it more or less CPU intensive than Team Platters? Because I know for a fact that turning Team Platters on drastically reduces my FPS.
My main query though before I start using this is, is it more or less CPU intensive than Team Platters? Because I know for a fact that turning Team Platters on drastically reduces my FPS.
Re: TeamCircles
Atfirst it used about twice as much as teamplatter.. but with the latest fix Team Circles use a little less than teamplatter
But note: as more units as more resources/cpu-time needed
Ok .. if you think the first version is visually fine .. i could apply that speed patch for you and send it to you
To Radar / Jammer :
Radar cannot look through hills, but those circles would pretend to do
For Jammers it might be fine .. but idk, as i do not use them often
But note: as more units as more resources/cpu-time needed
Ok .. if you think the first version is visually fine .. i could apply that speed patch for you and send it to you
To Radar / Jammer :
Radar cannot look through hills, but those circles would pretend to do
For Jammers it might be fine .. but idk, as i do not use them often
Re: TeamCircles
Don't send anything personally, I'm sure there would be more people like me wanting a nice widget that allows easy eye verification of units whilst not damaging FPS too much. Public is profitable, privacy is pitiful.Lelousius wrote:Atfirst it used about twice as much as teamplatter.. but with the latest fix Team Circles use a little less than teamplatter
But note: as more units as more resources/cpu-time needed
Ok .. if you think the first version is visually fine .. i could apply that speed patch for you and send it to you
Re: TeamCircles
fixed a bug where selection circles would halo around other nearby units
and optimized opengl slightly but didn't get the bubble behavior working completely yet, so selection circles overlap (inner circles still don't overlap)
0.42 is about 1.5x faster than 0.4, while 0.43 is about 3x faster (based on profiler data)Re: TeamCircles
Hey you are cool :)
And you removed heading and degrot hmm .. ok .. it is not really needed, but it is nice for planes
Hmm .. could this be optimised too?
udid = spGetUnitDefID(unitID)
=>
udids[unitID] = spGetUnitDefID(unitID)
and use "udids[unitID]" everywhere udid is used?
Ps: It took a while for me to understand your optimised code :) Changes
- Protected selected untis form having an selection circle in them
But not protected circles form being drawn twice (Alpha needs to be set 1 or 0 depending on what you draw (circles or "selected"-circle) but that needs some extra seps in opengl slowing the widget down
Stepcounts
0.4.....10
0.4.3...6
0.4.4...7
And you removed heading and degrot hmm .. ok .. it is not really needed, but it is nice for planes
Hmm .. could this be optimised too?
udid = spGetUnitDefID(unitID)
=>
udids[unitID] = spGetUnitDefID(unitID)
and use "udids[unitID]" everywhere udid is used?
Ps: It took a while for me to understand your optimised code :) Changes
- Protected selected untis form having an selection circle in them
But not protected circles form being drawn twice (Alpha needs to be set 1 or 0 depending on what you draw (circles or "selected"-circle) but that needs some extra seps in opengl slowing the widget down
Stepcounts
0.4.....10
0.4.3...6
0.4.4...7
Re: TeamCircles
oh cool you added comments this time - took me like 45 minutes to figure out what each step of your rendering did the first time I looked 

Re: TeamCircles
a lot of work, but all versions are on SD 

Re: TeamCircles
Fixed overlapping & bubble-effect
even improved speed a little Details:
- kicked out 2 per-unit-loops (Clear-loop / Draw-selected Loop)
- replaced the Cycles per team by only one (wich draws the Alpha)
-> The color is now drawn by a large cycle without a hole in the middle
Hmm .. if you don't mind.. could you replave the screenshot by this one? it is more representative :)

http://www.bilderkiste.org/show/origina ... SPRING.png
even improved speed a little Details:
- kicked out 2 per-unit-loops (Clear-loop / Draw-selected Loop)
- replaced the Cycles per team by only one (wich draws the Alpha)
-> The color is now drawn by a large cycle without a hole in the middle
Hmm .. if you don't mind.. could you replave the screenshot by this one? it is more representative :)

http://www.bilderkiste.org/show/origina ... SPRING.png
Re: TeamCircles
added a platter highlight for unit under mouse cursor
have you tried this widget on a snow map like xenolithic or nuclear winter? we need to fix that ^^
have you tried this widget on a snow map like xenolithic or nuclear winter? we need to fix that ^^
- Attachments
-
- unit_circle_0.5.1.lua
- (12.68 KiB) Downloaded 112 times
Re: TeamCircles
reduced load on update() when no units are selected, made selected units have a white platter, changed hover highlight to white
- Attachments
-
- unit_circle_0.5.2.lua
- (13.48 KiB) Downloaded 132 times
Re: TeamCircles
Now we have a spotlight for units ^^
hmm .. idk what to do about bright / snow maps
.. we might use black instead of white
but that would not fit all the other maps, and would not fit the dark spots on Blindside and nuclear_winter
Any color would lead to be misinterpreted
Actually I am very happy of what we managed to code :)
(We should get some cool screenshots presenting this, so everyone gets addicted to it ^^)
hmm .. idk what to do about bright / snow maps
.. we might use black instead of white
but that would not fit all the other maps, and would not fit the dark spots on Blindside and nuclear_winter
Any color would lead to be misinterpreted
Actually I am very happy of what we managed to code :)
(We should get some cool screenshots presenting this, so everyone gets addicted to it ^^)
Re: TeamCircles
one of my test versions used a larger circle of the samecolor and it was easy to spot. I dunno if pure black would be too dark on anything but speedball water and asteroid maps
oh and while the circles look great on units, I think it's weird on some buildings... like I built an aircraft plant and it felt a little awkward having a huge blue circle around it.
oh and while the circles look great on units, I think it's weird on some buildings... like I built an aircraft plant and it felt a little awkward having a huge blue circle around it.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: TeamCircles
If you care to show ally selected units as well with an alternate highlight graphic, see lines 258-290 in here:
http://trac.caspring.org/browser/trunk/ ... ircle2.lua
It will show you the selected units of allies who have this widget:
http://trac.caspring.org/browser/trunk/ ... onsend.lua
http://trac.caspring.org/browser/trunk/ ... ircle2.lua
It will show you the selected units of allies who have this widget:
http://trac.caspring.org/browser/trunk/ ... onsend.lua
Re: TeamCircles
couldn't the engine just have an onselected callin for allied teams?
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: TeamCircles
If you created such a patch and obsoleted my selectionsend widget, I'd be perfectly fine with it.aegis wrote:couldn't the engine just have an onselected callin for allied teams?
Re: TeamCircles
I'm using this instead of teamplatters now. Much nicer. My only complaint is that hover brightness is too bright.
Re: TeamCircles
I made it brighter because I thought it was too dark -_-
how's hover brightness in the version before?
how's hover brightness in the version before?
Re: TeamCircles
aegis' version appears to have trouble handling certain maps:
changing line 210 from:
to:
fixes it.
Code: Select all
[ 6440] Error in Initialize(): [string "LuaUI\Widgets\unit_circle_0.5.2.lua"]:211: attempt to index field '?' (a nil value)
[ 6440] Removed widget: Unit-Circles 0.5.1
Code: Select all
for udid=1, #UnitDs do
Code: Select all
for udid,unitDef in pairs(UnitDs) do
Re: TeamCircles
oh fun, you can skip unit ids. that loop only runs once so I guess it doesn't need the performance improvement :)
I'll upload my latest version with your change in a bit (thanks)
partial changelog:
I'll upload my latest version with your change in a bit (thanks)
partial changelog:
- applied the above fix
- reduced highlight brightness by half
- plays better with other opengl code by using push/popattrib
- uses GetVisibleUnits instead of GetAllUnits (though there's not much of a speed difference)