View topic - Widget to display team eco



All times are UTC + 1 hour


Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 12 Jul 2011, 00:12 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
I'm looking for a way to make a widget for spectators to easily follow which team is leading in terms of eco, metal, energy, maybe kills too.

I'm looking into advice about how to format the interface, maybe a bar graph of eco ratios, where leading team is 100% would be nice. But there are probably better ideas too. If you've played civilization, you know that it has a good graph over civilization influence, maybe something like that.

Also I'm not really certain of how to draw that graph in the spring UI in the game.

Update:
Newest version = 1.3


Attachments:
File comment: Version 1.3
ecostats_1.3.zip [186.7 KiB]
Downloaded 34 times


Last edited by Jools on 07 Sep 2011, 02:30, edited 8 times in total.
Top
 Offline Profile  
 
PostPosted: 12 Jul 2011, 02:12 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
Was about to say how it must a gadget since widget can't gather intel on enemy, but then you said spectators, so it should be okay.

To draw graph in Spring UI:
- Use the call-in DrawScreen or DrawScreenEffect
- Use Spring's Lua OpenGL


For some exemple, look into the DrawScreen functions of Kernel Panic, look into LuaRules/Gadgets/ sos.lua or shoot_n_run.lua

Or actually the DrawScreen function of any other gadget or widget that has a DrawScreen or DrawScreenEffect.


Top
 Offline Profile  
 
PostPosted: 12 Jul 2011, 09:38 
User avatar

Joined: 04 Jan 2011, 20:00
Very good idea, and i've got some exta inut for you:

It would be nice if you dont fill the bar up to 100% but instead add a prospected eco amount that fills up the remaining percentage to 100% The prostpected amount is just an addup of all unfinished eco buildings.

And... maybe also count the total firepower of the units availible for each team.
Then you truly get to know if a bigger eco probably means victory or fail.


Top
 Offline Profile  
 
PostPosted: 12 Jul 2011, 10:48 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
iceui already have something like this


Top
 Offline Profile  
 
PostPosted: 12 Jul 2011, 11:02 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Floris wrote:
Very good idea, and i've got some exta inut for you:

It would be nice if you dont fill the bar up to 100% but instead add a prospected eco amount that fills up the remaining percentage to 100% The prostpected amount is just an addup of all unfinished eco buildings.

And... maybe also count the total firepower of the units availible for each team.
Then you truly get to know if a bigger eco probably means victory or fail.


That's a very good idea. With total firepower, you mean sum of all hitpoints of war units?

I though of something like this:

Image

Alternative 1 would have a history of eco ratios; alternative 2 would just show current ratios but be easier to make, and to also show more information.


Top
 Offline Profile  
 
PostPosted: 12 Jul 2011, 14:50 
User avatar

Joined: 04 Jan 2011, 20:00
Quote:
That's a very good idea. With total firepower, you mean sum of all hitpoints of war units?


Well I don't know, that's why I said 'firepower' so someone with proper engine knowledge would know what unit properties to use.



both Alternatives look awsome to me, just make the metal bars more greyish


Top
 Offline Profile  
 
PostPosted: 12 Jul 2011, 15:22 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Ok, not sure I know how to do this, but I'll give it a try.


Top
 Offline Profile  
 
PostPosted: 13 Jul 2011, 06:41 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
and then the widegt should export a short txt file, so you could import into excel n stuff :D


Top
 Offline Profile  
 
PostPosted: 17 Jul 2011, 02:00 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Here's a first playable version of the widget.

Below is a screenshot with explanations to how it works. I don't like mouseover tooltips, so he who wants to know the functionality should read this message (or ask someone else).

Image

Image

Legend:

1. Buildpower bar. Leading team's is 100%, rest of teams show ratio to leader. This has two parts: the green shows buildpower other than air, and the yellow shows air buildpower (in this game no-one has air bp). Buildpower means sum of all team units of the ".buildSpeed" value in unitDefs.

2. Springkills. How many kills the team has according to spring engine.

3. Firepower bar. Works as the buildpower bar, except the blue is mobile firepower and the black is stationary. Firepower means sum of HP of all units that have weapons.

4. Team Kills, calculated as kills when one finished unit is destroyed by an enemy.

5. Team losses. Works the same way.

6. Team energy income per second ratio. The leading team bar is shown as 100%, and other team bars are shown as ratios of leader.

7. Springlosses. How many units the team has lost according to the spring engine.

8. Team energy income per second..

9. Team metal income per second ratio. Works similar to the energy bar (yum)

10. Player side, colour and whether he has commander alive (if commander is dead the emblem is shown as a miniature format, kinda like in super mario bro's 2 in Nintendo; if player is dead then nothing is shown).

11.Team metal income per second.

12 (missing, to the left of 10) The start position of the team, if present. (Average of individual players' start positions).

Btw, team means team as in normal language, Juventus is a football team and it consists of a number of players.


Attachments:
File comment: Version 0.82
gui_ecostats_0.82.zip [135.76 KiB]
Downloaded 47 times


Last edited by Jools on 17 Jul 2011, 15:22, edited 3 times in total.
Top
 Offline Profile  
 
PostPosted: 17 Jul 2011, 10:33 

Joined: 29 May 2010, 22:40
Works for me!

Where does the ding.ogg go (and what is it for)?

My wish: make the widget movable by mouse-grab or Ctrl+F11.

Thank you :)


Top
 Offline Profile  
 
PostPosted: 17 Jul 2011, 15:04 
User avatar

Joined: 04 Jan 2011, 20:00
whats the diffrence between 'spring kills' and 'team kills'? does spring kills also counts friendly fire as kills? It just confuses and doesnt give much more valuable info. Just count total lost units in one number.

For the rest, totally awesome! You made it very very complete!

You could scale down the teamcolor squares to half it's size, this way you can fit 10 players in 2 rows just fine.

And yes being able to drag the widget position would be welcome.

Maybe 'rename' "Kill & Losses" to "Kills & Deaths" or "Wins & Losses". Just to be consist.


Top
 Offline Profile  
 
PostPosted: 17 Jul 2011, 15:10 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Yes, my wish is also to be able to move it, I'm working on it and trying to figure out how to do it. I know that fore some people it might appear in the middle of the screen.

Although not documented, I think spring counts a loss or death (OTA uses kills and losses) as whenever a unit that has an id ceases to exist. I think this could mean when you cancel a build queue, when you morph a commander, when you self-d a unit, when a bomber bombs your factory and kills 10 units in the queue etc. Not sure how kills are calculated.

Eventually I'd like to use just one number, but I put both there to have a means to compare with the end-game statistics. Also, if you reload the widget the counters get reset, but not the spring ones.


Last edited by Jools on 17 Jul 2011, 15:15, edited 1 time in total.

Top
 Offline Profile  
 
PostPosted: 17 Jul 2011, 15:14 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
The ding.ogg is a sound file and it goes into spring/LuaUI/Sounds. Ogg is just like .mp3 except not under copyright.

It plays a "DING" sound when someone takes the lead. If you dont want it you can disable it by setting the "SoundOn" setting to false in the widget (line 46), or just ignore it (I updated the widget to check for the presence of the file).


Top
 Offline Profile  
 
PostPosted: 17 Jul 2011, 15:26 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Interesting fact: when you build a dragon's teeth, spring reports this as a unit loss. Are they alive dragons that die when you place them? :)


Top
 Offline Profile  
 
PostPosted: 17 Jul 2011, 15:56 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
They are alive units when you build them, that instadie into their wreckage when finished.


Top
 Offline Profile  
 
PostPosted: 17 Jul 2011, 17:00 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
this is a cool idea + improvement on existing team stats. I think it looks a bit big+randomly textual, might be hard to read if you have many teams

any thoughts on designs for shorter display that still adequately shows the same information?


Top
 Offline Profile  
 
PostPosted: 17 Jul 2011, 19:22 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
Maybe a way to minimise it and only show kills? You are free to suggest things...

Yes it doesn't work very well for over 5 - 8 teams, but how often do you have FFA:s with that many players? Okay maybe in BA you do...


Top
 Offline Profile  
 
PostPosted: 18 Jul 2011, 19:39 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
please post a fix-list so i could note these for the wDB


Top
 Offline Profile  
 
PostPosted: 18 Jul 2011, 23:22 
User avatar

Joined: 23 Feb 2009, 16:29
Location: Finland
You mean fixlists between version or what remains to be done?

There have been tons of small fixes and bugfixes, such as:
-- killcondition for a team was no e production, now checks No of units
-- Removed springskills and now labels for kills and losses, you know what they are anyway.
-- Added a kill and lossesbar to the bottom. Each kill = 1 pixel until someone exceeds widget width.
-- Added a check for when a team has placed their start marks and how many people have connected.
-- Added: when a player has units but has adandoned them, the side icon will show as dimmed.
-- When teams have died it removes the eco counters and shows kills and losses summary.


Last edited by Jools on 04 Apr 2012, 21:49, edited 1 time in total.

Top
 Offline Profile  
 
PostPosted: 19 Jul 2011, 18:11 
User avatar

Joined: 30 Jun 2008, 23:08
Location: Germany
or you ask vbs for an account for the wdb and u could update it yourslf ;)


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2  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.