View topic - TeamCircles



All times are UTC + 1 hour


Post new topic Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: TeamCircles
PostPosted: 26 Jul 2010, 21:07 
Tournaments Moderator
User avatar

Joined: 08 Dec 2007, 17:39
Location: UK - England
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.


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 26 Jul 2010, 22:37 

Joined: 22 Jul 2010, 18:37
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


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 26 Jul 2010, 23:24 
Tournaments Moderator
User avatar

Joined: 08 Dec 2007, 17:39
Location: UK - England
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


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.


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 01:20 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
speed improvements


Attachments:
unit_circle_0.41.lua [12.08 KiB]
Downloaded 20 times
Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 04:39 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
fixed a bug where selection circles would halo around other nearby units
Attachment:
unit_circle_0.42.lua [12.08 KiB]
Downloaded 97 times

and optimized opengl slightly but didn't get the bubble behavior working completely yet, so selection circles overlap (inner circles still don't overlap)
Attachment:
unit_circle_0.43_overlap.lua [10.7 KiB]
Downloaded 104 times


0.42 is about 1.5x faster than 0.4, while 0.43 is about 3x faster (based on profiler data)


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 12:24 

Joined: 22 Jul 2010, 18:37
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 :)
Attachment:
unit_circle_0.4.4.lua [11.2 KiB]
Downloaded 102 times

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


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 14:03 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
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 ;)


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 17:01 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
a lot of work, but all versions are on SD ;)


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 17:34 

Joined: 22 Jul 2010, 18:37
Fixed overlapping & bubble-effect
even improved speed a little
Attachment:
unit_circle_0.5.0.lua [11.92 KiB]
Downloaded 100 times

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 :)
Image
http://www.bilderkiste.org/show/origina ... SPRING.png


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 18:28 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
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 ^^


Attachments:
unit_circle_0.5.1.lua [12.68 KiB]
Downloaded 98 times
Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 19:21 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
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 117 times
Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 19:59 

Joined: 22 Jul 2010, 18:37
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 ^^)


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 21:01 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
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.


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 21:42 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
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


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 22:12 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
couldn't the engine just have an onselected callin for allied teams?


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 27 Jul 2010, 22:25 
Cursed Zero-K Developer
User avatar

Joined: 07 Nov 2007, 21:48
Location: Horse
aegis wrote:
couldn't the engine just have an onselected callin for allied teams?

If you created such a patch and obsoleted my selectionsend widget, I'd be perfectly fine with it.


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 28 Jul 2010, 00:51 
Tournaments Moderator
User avatar

Joined: 08 Dec 2007, 17:39
Location: UK - England
I'm using this instead of teamplatters now. Much nicer. My only complaint is that hover brightness is too bright.


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 28 Jul 2010, 01:39 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
I made it brighter because I thought it was too dark -_-

how's hover brightness in the version before?


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 30 Jul 2010, 18:51 
Lua Coder

Joined: 08 Jul 2009, 14:05
aegis' version appears to have trouble handling certain maps:
Code:
[   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


changing line 210 from:

Code:
for udid=1, #UnitDs do


to:

Code:
 for udid,unitDef in pairs(UnitDs) do


fixes it.


Top
 Offline Profile  
 
 Post subject: Re: TeamCircles
PostPosted: 30 Jul 2010, 19:19 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
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:
  • 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)

working on something cool for it before I upload


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 71 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.