TeamCircles

TeamCircles

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Lelousius
Posts: 11
Joined: 22 Jul 2010, 19:37

TeamCircles

Post by Lelousius »

Hia Guys'n'Girls

I have been making a widget that draws circles around any unit you can see. Ok.. that idea isn't new.. 'Teamplatter' does the same job, but i didn't like that flashing all the time, so i made my own one

Have fun with it :)

Image
The one in the middle is selected,.. the others aren't

Here you can see the same with Teamplatter
( Well .. it's not only the circles i modified .. it's also the size-calculation :D )

Edit:
Note: There is a newer Version on the Bottom of this page :)
Attachments
unit_unit-circles.lua
The Lua-widget has to be places in Spring/LuaUI/Widgets/
(6.33 KiB) Downloaded 139 times
Last edited by Lelousius on 26 Jul 2010, 00:27, edited 1 time in total.
User avatar
Jazcash
Posts: 5306
Joined: 08 Dec 2007, 17:39

Re: TeamCircles

Post by Jazcash »

Would be awesome if you could make the circles join up like bubbles would.
Lelousius
Posts: 11
Joined: 22 Jul 2010, 19:37

Re: TeamCircles

Post by Lelousius »

i could give that a try .. but that will be far more complicated and will need lots of resource (atleast for moving units the circle/bubble will be recalculated each frame and not - as it is now - just a drawn displaylist)
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: TeamCircles

Post by luckywaldo7 »

I love this widget, so much prettier than old teamplatter.
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: TeamCircles

Post by manolo_ »

wasnt there a widget, that does this too? but will upload it, when im home
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: TeamCircles

Post by Licho »

Lelousius wrote:i could give that a try .. but that will be far more complicated and will need lots of resource (atleast for moving units the circle/bubble will be recalculated each frame and not - as it is now - just a drawn displaylist)
Check openGL blending tags, you can join it without any extra drawing/processing.

We had it in CA once.
Drone
Posts: 8
Joined: 22 Jul 2010, 16:07

Re: TeamCircles

Post by Drone »

I don't understand why people need team platters

Totally useless imo
User avatar
Jazcash
Posts: 5306
Joined: 08 Dec 2007, 17:39

Re: TeamCircles

Post by Jazcash »

Drone wrote:I don't understand why people need team platters

Totally useless imo
I couldn't play as good as I do without it :oops: It's makes spotting units easier on the eye.
User avatar
oksnoop2
Posts: 1207
Joined: 29 Aug 2009, 20:12

Re: TeamCircles

Post by oksnoop2 »

I have bad ATI drivers and use it to differentiate teams in all 3do based games.
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2699
Joined: 25 Aug 2004, 13:31

Re: TeamCircles

Post by bobthedinosaur »

Some games like S44, don't use a lot of team color on their models. It is not always the style of some games to have team color on their models, and this can help players who like to see the team color easily.
Lelousius
Posts: 11
Joined: 22 Jul 2010, 19:37

Re: TeamCircles

Post by Lelousius »

Licho wrote:Check openGL blending tags, you can join it without any extra drawing/processing.
That sounds very easy .. but what do you mean with "blending tags"? I have never heard that and not found it on the internet.
Just using some blendfunc or blendequalation would not work as the world and previously drawn circles are used as the destination&resource without making a difference
User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: TeamCircles

Post by Licho »

You can try playing with stuff like
gl.BlendEquation(0x8008)

But im not sure if you can get it working properly without screwing colors too much. You can probably try to use stencil too.
User avatar
Hobo Joe
Posts: 1001
Joined: 02 Jan 2008, 21:55

Re: TeamCircles

Post by Hobo Joe »

Drone wrote:I don't understand why people need team platters

Totally useless imo
I use it, makes it easier to recognize who's is what at a glance, especially with certain units with bad color.

Not to mention the boxes are ugly and annoying. Team platter is pretty and nice.
User avatar
AF
AI Developer
Posts: 20686
Joined: 14 Sep 2004, 11:32

Re: TeamCircles

Post by AF »

It also means its easier at a distance to see whose who without resorting to icons
Lelousius
Posts: 11
Joined: 22 Jul 2010, 19:37

Re: TeamCircles

Post by Lelousius »

Image

Like this?.. then .. i guess i have done it .. with loads of steps modifying the Alphachannel only :D
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: TeamCircles

Post by Niobium »

Lelousius wrote:Image

Like this?.. then .. i guess i have done it .. with loads of steps modifying the Alphachannel only :D
I'd like to see the code to do that, looks cool
User avatar
Hobo Joe
Posts: 1001
Joined: 02 Jan 2008, 21:55

Re: TeamCircles

Post by Hobo Joe »

Lelousius wrote:Image

Like this?.. then .. i guess i have done it .. with loads of steps modifying the Alphachannel only :D

Looks good, only problem is that the unselected units overlap the selected units, that should be reversed.
Lelousius
Posts: 11
Joined: 22 Jul 2010, 19:37

Re: TeamCircles

Post by Lelousius »

Oh .. here's the code

unit_unit_circle_2.lua : the one in that image
unit_unit_circle_2_fix.lua : most probably fixed one .. but didn't test


Edit:
A new image
Image
* Name-fix for unit_unit_circle_2_fix.lua

Edit2: Uploaded a slightly resource optimised Version
Attachments
unit_unit_circle_0.3.lua
(10.98 KiB) Downloaded 113 times
Lelousius
Posts: 11
Joined: 22 Jul 2010, 19:37

Re: TeamCircles

Post by Lelousius »

Changelog:
- Fixed no display at water
- Improved to use less resources
Attachments
unit_unit_circle_0.4.lua
(11.88 KiB) Downloaded 124 times
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: TeamCircles

Post by Pxtl »

Could this technique be used on larger scale to show radar and jammer rings? That would be cool. The way they seem to vanish on collision is very nice.
Post Reply

Return to “Lua Scripts”