Next level FAF stats

Moderator: keyser

Next level FAF stats

Postby Softly » 20 Nov 2016, 04:15

So I was wondering what it would take to do some truly epic stats for FA games, e.g. analysis + comparison of builds for every spot on every map. Imagine breakdowns of your energy and mass over time, and heat maps of fights in air and land for all maps.

The kind of info that would be required is detailed eco information, mass and energy every 10 secs or so, as well as information on what units you made/killed etc.

I thought that it may be possible to record as a separate event in the FAF DB every single time someone builds or kills a unit in FA.

Some estimates of storage requirements:
100 bytes per line in the db, storing unit type, gameid, playerid, gametime, maybe some other things?.
1000 lines per player per game, say 500 units made and 500 destroyed on average.
~2800 people-games (games, but counted according to the number of players, so 4v4 => 8 people games), source: viewtopic.php?f=2&t=13449#p138924

=> ~280MB a day which is a feasible amount to store. (Takes more than 10 years to generate a Terabyte of data)

Also this is almost certainly an overestimate.

Coding effort:
1) Game code, to pull these stats out.
2) DB code + API code to store and retrieve stats
3) Stats effort/web code, to view the data usefully


I'd need someone else to do 1), I'd do some of 2), and I'd be happy to do lots of stuff on 3).

What I need from other people is expressions of interest, and/or offers to help.
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

Re: Next level FAF stats

Postby Aulex » 20 Nov 2016, 04:58

I don't know if this is feasible at all, but if you start something I may start working on the games api again.
"Let's start beating ass and die" - drunk TA4Life

"Just because you have a d*** doesn't mean you need to be one...pussy" -Blackdeath

SCOUTING SAVES LIVES
http://imgur.com/YGk0W0o

How to play Sup Com by Ubilaz
http://goo.gl/je83z
User avatar
Aulex
Contributor
 
Posts: 1050
Joined: 17 Nov 2012, 05:29
Has liked: 299 times
Been liked: 225 times
FAF User Name: VoR_Aulex

Re: Next level FAF stats

Postby Exotic_Retard » 20 Nov 2016, 13:25

i dont really know how faf stats works tbh, should look at achievement code as well since that records a bunch of stuff, theres already tons of 3) that you can do with what we have already. so dont let 1) and 2) put you off. start with making the current stats nicer maybe? xD like put in a zoom function and maybe somehow eliminate those absurd mass income spikes we get sometimes

since im a game coder the way i see it is you could just record position and instigator in OnKilled and save that somewhere in the global sync table selen-style then the game would fish it out at the end. so yeah sounds feasible to me game-side, not sure what the "correct" approach would be though.

i think waaaay more work will be required to make the stats viewer and make the server save the stats, or save them in the replay somehow? i dunno much about replays. also replayparser is a thing, that already has access to every command ever, and probably its position as well, so look at that and improve that too?
User avatar
Exotic_Retard
Contributor
 
Posts: 1470
Joined: 21 Mar 2013, 22:51
Has liked: 557 times
Been liked: 626 times
FAF User Name: Exotic_Retard

Re: Next level FAF stats

Postby Softly » 20 Nov 2016, 20:06

The volumes of data certainly seem feasible, so the main work is in the implementation as I see it.


Exotic_Retard wrote:i dont really know how faf stats works tbh, should look at achievement code as well since that records a bunch of stuff, theres already tons of 3) that you can do with what we have already. so dont let 1) and 2) put you off. start with making the current stats nicer maybe? xD like put in a zoom function and maybe somehow eliminate those absurd mass income spikes we get sometimes

since im a game coder the way i see it is you could just record position and instigator in OnKilled and save that somewhere in the global sync table selen-style then the game would fish it out at the end. so yeah sounds feasible to me game-side, not sure what the "correct" approach would be though.

i think waaaay more work will be required to make the stats viewer and make the server save the stats, or save them in the replay somehow? i dunno much about replays. also replayparser is a thing, that already has access to every command ever, and probably its position as well, so look at that and improve that too?


I'm sure there's plenty of graphs I could show using the existing achievements data too, I'm just not sure any of them would actually be interesting. The stuff being collected there is designed for showing cumulative achievement, not for analysing gameplay.

As for making something to see the stats with, I don't think it is particularly more complicated than the voting app I made. That took 1 day to prototype, and then another day to make it FAF server compatible (which wouldn't have to happen for this app).

Also this kind of information can't be recovered from replays without running the full simulation, so improving the replay parser won't help. (I don't have enough compute left in my PC to run every FAF game from the beginning of time).

OnBuilt and OnKilled (or whatever the names are) functions sound like exactly the ones to hook, if you know where those are I'd be happy to steal your code for it ^.
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

Re: Next level FAF stats

Postby TheKoopa » 20 Nov 2016, 20:09

Honestly I think that the aftergame graph should be fixed to display properly before we make any addons
Feather: I am usually pretty good in judging people's abilities, intelligence and motives

Evildrew: Just because I didnt choose you for my team last year doesnt give you the right to be all bitchy and negative about my proposal
User avatar
TheKoopa
Contributor
 
Posts: 1158
Joined: 04 Sep 2013, 18:04
Location: New York
Has liked: 172 times
Been liked: 225 times
FAF User Name: Gently-

Re: Next level FAF stats

Postby Viba » 20 Nov 2016, 20:22

Well the stats function Softly is planning to do would be more advanced and kinda separate from the graphs after the game. I don't see why he can't embark on this project, if he wants to do this I don't think people can tell him to go fix the current in-game stats before this project?

Besides, if and when these more advanced stats are in working order, maybe they could be integrated and replace the current stats?
Viba
Councillor - Moderation
 
Posts: 746
Joined: 22 Jan 2015, 21:42
Has liked: 144 times
Been liked: 224 times
FAF User Name: !smurfcheck Viba

Re: Next level FAF stats

Postby Cuddles » 20 Nov 2016, 21:04

your storage estimate will be way out of you don't included indexes...indexes often take up more storage than the data on tables with lots of rows.
Turinturambar defended very valiantly
User avatar
Cuddles
Contributor
 
Posts: 692
Joined: 29 Mar 2013, 14:19
Has liked: 132 times
Been liked: 118 times
FAF User Name: Scoot

Re: Next level FAF stats

Postby JoonasTo » 20 Nov 2016, 21:06

TheKoopa wrote:Honestly I think that the aftergame graph should be fixed to display properly before we make any addons

The current stats work perfectly. There are no bugs there as far as I can see.
If you're speaking of the NoData error, that's because there is no proper replay file from the game and possibly requires way different kind of fixing than stats.
User avatar
JoonasTo
Priest
 
Posts: 498
Joined: 08 Feb 2015, 01:11
Has liked: 18 times
Been liked: 81 times
FAF User Name: JoonasTo

Re: Next level FAF stats

Postby KeyBlue » 20 Nov 2016, 21:31

No data error also can be caused by leaving the game too fast.
There is apparantly a 3second delay for syncing the score at the end of the game.

Not sure if it is the only cause, but in my last couple of games, i only had no data whenever i went to the score screen immediatly.
(purely anecdotal evidence ofcourse)
User avatar
KeyBlue
Priest
 
Posts: 403
Joined: 28 Jan 2016, 01:06
Has liked: 140 times
Been liked: 93 times
FAF User Name: KeyBlue

Re: Next level FAF stats

Postby Downlord » 21 Nov 2016, 00:02

Let's do the calculation with a random sample.

I replayed a 18.5min Gap of Rohan. These were the resulting stats:
Spoiler: show
Code: Select all
{"stats":[{"blueprints":{"xaa0202":{"kills":3},"uaa0302":{"kills":1},"xsl0104":{"built":7},"uaa0203":{"kills":6},"xsb1106":{"built":30},"xsb0202":{"built":2},"xsb1103":{"lost":2,"built":13},"xsb0102":{"built":2},"uab1106":{"kills":4},"ual0106":{"kills":3},"xsb1201":{"lost":2,"built":2},"uaa0101":{"kills":1},"xsb0302":{"built":1},"xsl0208":{"built":3},"xsa0102":{"built":13},"ual0105":{"kills":1},"xsa0202":{"built":8},"xsb1101":{"built":22},"xsl0103":{"built":5},"xsb1102":{"built":1},"xsl0101":{"lost":3,"built":6},"xsb1202":{"built":11},"uab1202":{"kills":2},"xsb1105":{"built":2},"xsa0303":{"built":12},"xsl0001":{"built":1,"lowest_health":9634},"xsb3101":{"lost":1,"built":3},"xsl0105":{"lost":1,"built":67},"xsa0101":{"built":14},"xsb0101":{"built":2},"xsl0201":{"built":10},"uaa0102":{"kills":5},"xsb1104":{"built":2},"xsb4201":{"built":8}},"type":"Human","general":{"score":63641,"currentcap":{"count":1000},"lastReclaimedMass":5875.7436523438,"mass":58583.3984375,"built":{"mass":44387,"count":247,"energy":933445},"kills":{"mass":5282,"count":26,"energy":83450},"lost":{"mass":6874,"count":41,"energy":216320},"currentunits":{"count":177},"energy":1630364.125,"lastReclaimedEnergy":14275.014648438},"faction":4,"resources":{"massin":{"total":58583.3984375,"rate":12.349979400635},"energyout":{"total":1416014.125,"rate":475.81872558594},"energyin":{"total":1630364.125,"rate":480.2126159668},"energyover":106383.8671875,"massover":5.2987060546875,"massout":{"total":56482,"rate":11.563637733459}},"name":"ROBO-dani","units":{"air":{"lost":32,"kills":16,"built":52},"tech3":{"lost":3,"kills":1,"built":13},"cdr":{"lost":0,"kills":0,"built":1},"tech2":{"lost":7,"kills":11,"built":36},"tech1":{"lost":31,"kills":14,"built":197},"transportation":{"lost":0,"kills":0,"built":0},"land":{"lost":4,"kills":4,"built":101},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":5,"kills":6,"built":101},"engineer":{"lost":1,"kills":1,"built":71},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":0}}},{"blueprints":{"xaa0202":{"kills":4},"ueb1201":{"built":1},"ueb0101":{"built":1},"ueb3201":{"built":1},"uaa0203":{"kills":3},"uel0104":{"lost":6,"built":6},"xeb0104":{"built":6},"ual0201":{"kills":2},"uel0001":{"built":1,"lowest_health":8710},"uea0101":{"built":11},"urb1105":{"built":1},"ueb2104":{"built":4},"uel0106":{"lost":5,"built":5},"ueb1101":{"kills":1,"built":21},"urb1202":{"kills":1},"ueb1103":{"lost":1,"built":12},"ual0106":{"kills":1},"ueb1301":{"built":1},"uel0201":{"lost":3,"built":3},"uaa0101":{"kills":6},"ueb1102":{"built":1},"ueb1105":{"built":10},"ual0105":{"kills":1},"ueb0201":{"built":1},"ueb4201":{"built":3},"ueb3101":{"kills":1,"built":2},"ueb1202":{"built":11},"uab1202":{"kills":5},"uel0103":{"lost":5,"built":5},"uel0105":{"lost":1,"built":10},"xea3204":{"built":6},"ual0101":{"kills":1},"ueb1106":{"built":17},"ueb1302":{"built":1},"daa0206":{"kills":3},"uab1106":{"kills":2},"uaa0104":{"kills":1},"xeb2306":{"built":1},"uaa0102":{"kills":14},"ueb2108":{"built":1},"ueb4202":{"built":1},"url0107":{"kills":1},"uel0101":{"lost":1,"built":1},"ueb2301":{"built":3},"ueb0102":{"built":1},"uel0208":{"built":6}},"type":"Human","general":{"score":60258,"currentcap":{"count":1000},"lastReclaimedMass":2690.8203125,"mass":61553.96875,"built":{"mass":41372,"count":149,"energy":323883},"kills":{"mass":10124.599609375,"count":52,"energy":142260},"lost":{"mass":1393,"count":33,"energy":9368},"currentunits":{"count":105},"energy":1170221.5,"lastReclaimedEnergy":56.999988555908},"faction":1,"resources":{"massin":{"total":61553.96875,"rate":11.175000190735},"energyout":{"total":900922.375,"rate":131.9947052002},"energyin":{"total":1170221.5,"rate":556.58337402344},"energyover":83383.984375,"massover":5.19873046875,"massout":{"total":60095.1953125,"rate":11.174997329712}},"name":"Valak","units":{"air":{"lost":11,"kills":31,"built":12},"tech3":{"lost":0,"kills":0,"built":3},"cdr":{"lost":0,"kills":0,"built":1},"tech2":{"lost":0,"kills":17,"built":34},"tech1":{"lost":33,"kills":35,"built":111},"transportation":{"lost":0,"kills":1,"built":0},"land":{"lost":21,"kills":9,"built":39},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":1,"kills":12,"built":101},"engineer":{"lost":1,"kills":4,"built":17},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":0}}},{"blueprints":{"xaa0202":{"kills":3},"urb0101":{"built":1},"urb1101":{"built":22},"urb3101":{"lost":3,"built":3},"url0208":{"kills":6,"built":5},"ura0001":{"built":430},"url0107":{"kills":5},"url0205":{"kills":2},"ual0201":{"kills":14},"ura0102":{"built":90},"urb4201":{"kills":4,"built":2},"uab4202":{"kills":1},"urb1105":{"built":13},"url0303":{"kills":4},"urb5101":{"kills":2},"urb1202":{"kills":4,"built":11},"url0105":{"lost":20,"kills":13,"built":58},"urb2301":{"kills":1,"built":2},"uab1202":{"kills":4},"uaa0101":{"kills":1},"urb4202":{"built":1},"url0309":{"kills":3},"uaa0303":{"kills":1},"ual0105":{"kills":30},"xrb0204":{"built":3},"urb0102":{"built":2},"uab2104":{"kills":9},"ura0101":{"built":10},"url0001":{"kills":1,"built":1,"lowest_health":8569.5},"uab1101":{"kills":16},"urb1301":{"built":1},"xrb0304":{"built":3},"uab4201":{"kills":1},"urb1106":{"kills":17,"built":44},"ual0208":{"kills":8},"urb1302":{"kills":1,"built":3},"urb0301":{"kills":1},"uab1102":{"kills":1},"urb0202":{"built":1},"daa0206":{"kills":6},"urb2104":{"lost":3,"kills":3,"built":2},"zrb9501":{"kills":1},"urb1103":{"lost":6,"kills":1,"built":18},"uaa0102":{"kills":5},"urb1201":{"kills":3,"built":2},"uab2301":{"kills":2},"uaa0203":{"kills":13},"url0402":{"built":1},"ual0001":{"kills":1},"xrb0104":{"built":3},"urb1102":{"built":1}},"type":"Human","general":{"score":111658,"currentcap":{"count":1000},"lastReclaimedMass":6849.068359375,"mass":84031.515625,"built":{"mass":81434,"count":303,"energy":904695},"kills":{"mass":81990.71875,"count":195,"energy":10475546},"lost":{"mass":3642.1325683594,"count":70,"energy":78431.328125},"currentunits":{"count":193},"energy":1354543.5,"lastReclaimedEnergy":11148.298828125},"faction":3,"resources":{"massin":{"total":84031.515625,"rate":15.60000038147},"energyout":{"total":1183728.125,"rate":262.17611694336},"energyin":{"total":1354543.5,"rate":362},"energyover":46701.109375,"massover":5.19873046875,"massout":{"total":81926.296875,"rate":10.840619087219}},"name":"Silver_Eye","units":{"air":{"lost":37,"kills":29,"built":103},"tech3":{"lost":0,"kills":10,"built":4},"cdr":{"lost":0,"kills":2,"built":1},"tech2":{"lost":0,"kills":63,"built":33},"tech1":{"lost":69,"kills":120,"built":264},"transportation":{"lost":0,"kills":0,"built":0},"land":{"lost":20,"kills":92,"built":66},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":12,"kills":77,"built":138},"engineer":{"lost":21,"kills":63,"built":73},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":1}}},{"blueprints":{"xaa0202":{"kills":2},"ueb1201":{"built":4},"xrl0302":{"kills":4},"uab1201":{"kills":1},"dea0202":{"built":14},"ueb2204":{"built":4},"url0107":{"kills":1},"uel0208":{"lost":3,"built":5},"ual0201":{"kills":12},"uel0001":{"kills":1,"built":1,"lowest_health":8500},"uea0101":{"built":4},"urb1105":{"built":1},"ueb2104":{"built":2},"url0306":{"kills":1},"ueb1101":{"lost":7,"kills":3,"built":17},"ueb1103":{"built":11},"ual0106":{"kills":1},"uaa0101":{"kills":6},"ueb0202":{"built":1},"ueb1102":{"built":1},"uea0107":{"built":3},"ueb4201":{"built":3},"ueb3101":{"kills":1,"built":2},"ueb1202":{"built":11},"uel0106":{"lost":44,"built":44},"uel0105":{"kills":4,"built":46},"uaa0203":{"kills":3},"ual0101":{"kills":1},"ueb0101":{"built":3},"ueb1106":{"built":36},"daa0206":{"kills":3},"uea0103":{"built":7},"ual0105":{"kills":10},"uea0203":{"built":2},"uaa0102":{"kills":3},"ueb2108":{"built":6},"uab3101":{"kills":1},"uab1101":{"kills":4},"uel0101":{"lost":1,"built":1},"uea0102":{"lost":1,"built":7},"ueb0102":{"built":1},"uab2104":{"kills":1}},"type":"Human","general":{"score":51177,"currentcap":{"count":1000},"lastReclaimedMass":1061.6850585938,"mass":55371.41015625,"built":{"mass":45728,"count":237,"energy":453360},"kills":{"mass":25324.947265625,"count":66,"energy":5091905},"lost":{"mass":6592,"count":82,"energy":112820},"currentunits":{"count":134},"energy":1049866,"lastReclaimedEnergy":8.5499992370605},"faction":1,"resources":{"massin":{"total":55371.41015625,"rate":9.3999996185303},"energyout":{"total":752551.125,"rate":302.70816040039},"energyin":{"total":1049866,"rate":290.650390625},"energyover":41854.55078125,"massover":5.99853515625,"massout":{"total":54726.96875,"rate":9.3999967575073}},"name":"Saske_Kaske","units":{"air":{"lost":27,"kills":19,"built":39},"tech3":{"lost":0,"kills":0,"built":0},"cdr":{"lost":0,"kills":1,"built":1},"tech2":{"lost":9,"kills":16,"built":50},"tech1":{"lost":73,"kills":49,"built":186},"transportation":{"lost":3,"kills":0,"built":5},"land":{"lost":48,"kills":35,"built":100},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":7,"kills":12,"built":103},"engineer":{"lost":3,"kills":15,"built":52},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":0}}},{"blueprints":{"uaa0302":{"built":1},"uab1201":{"lost":1,"built":1},"dea0202":{"kills":2},"ual0208":{"lost":16,"built":10},"ual0001":{"lost":1,"built":1,"lowest_health":0},"uab0302":{"lost":1,"built":1},"xsa0101":{"kills":1},"ura0102":{"kills":3},"uab4202":{"lost":1,"built":1},"uab2101":{"lost":1,"built":1},"uab3101":{"lost":2,"built":2},"uab1106":{"lost":20,"built":20},"uab1103":{"built":11},"ual0106":{"lost":2,"built":2},"uab1202":{"lost":11,"built":11},"uaa0101":{"built":13},"uab5101":{"lost":8,"built":8},"uab4201":{"lost":5,"built":5},"uea0107":{"kills":3},"uab1105":{"lost":1,"built":1},"uab0202":{"built":1},"uab0201":{"lost":2,"built":2},"uea0101":{"kills":4},"uaa0303":{"built":1},"uab0101":{"built":2},"ual0101":{"lost":1,"built":1},"xsa0102":{"kills":4},"uab0102":{"built":1},"uab1101":{"lost":24,"built":24},"uea0102":{"kills":1},"ual0105":{"lost":83,"built":83},"ual0307":{"lost":5,"built":5},"uaa0102":{"built":32},"uel0106":{"kills":9},"uab2301":{"lost":3,"built":2},"ual0201":{"lost":4,"built":4},"uel0101":{"kills":1},"daa0206":{"lost":6,"built":15},"uab1102":{"lost":1,"built":1},"uab2104":{"lost":11,"built":10}},"type":"Human","general":{"score":53167,"currentcap":{"count":1000},"lastReclaimedMass":713.99139404297,"mass":60232.359375,"built":{"mass":44795,"count":273,"energy":565536},"kills":{"mass":2127,"count":28,"energy":52640},"lost":{"mass":60722.87890625,"count":267,"energy":5531033.5},"currentunits":{"count":0},"energy":1422138.75,"lastReclaimedEnergy":2918.4174804688},"faction":2,"resources":{"massin":{"total":60232.359375,"rate":0},"energyout":{"total":1028090.9375,"rate":0},"energyin":{"total":1422138.75,"rate":0},"energyover":328523.1875,"massover":2626.5268554688,"massout":{"total":54929.79296875,"rate":0}},"name":"Riddick_","units":{"air":{"lost":64,"kills":18,"built":65},"tech3":{"lost":3,"kills":0,"built":3},"cdr":{"lost":1,"kills":0,"built":1},"tech2":{"lost":60,"kills":2,"built":53},"tech1":{"lost":203,"kills":26,"built":216},"transportation":{"lost":0,"kills":3,"built":0},"land":{"lost":114,"kills":10,"built":110},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":92,"kills":0,"built":105},"engineer":{"lost":100,"kills":0,"built":94},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":0}}},{"blueprints":{"urb0101":{"lost":3,"built":3},"urb1101":{"lost":22,"built":22},"urb0301":{"lost":1,"built":1},"xrl0302":{"built":8},"dea0202":{"kills":1},"ura0001":{"built":550},"url0107":{"lost":21,"built":21},"uel0104":{"kills":4},"url0205":{"lost":8,"built":7},"xsa0101":{"kills":2},"ura0102":{"kills":3},"urb4201":{"lost":8,"built":7},"uea0101":{"kills":2},"urb1105":{"lost":6,"built":6},"uel0106":{"kills":15},"urb5101":{"lost":44,"built":44},"urb1202":{"lost":11,"built":16},"url0105":{"lost":19,"built":19},"urb2301":{"lost":1,"built":1},"zrb9501":{"lost":1,"built":1},"ura0101":{"kills":9},"urb1301":{"lost":1,"built":1},"urb1106":{"lost":40,"built":39},"urb2104":{"lost":3,"built":3},"url0303":{"lost":5,"built":4},"url0001":{"lost":1,"built":1,"lowest_health":0},"url0309":{"lost":5,"built":5},"uea0102":{"kills":2},"urb1302":{"lost":7,"built":5},"urb1103":{"lost":1,"kills":1,"built":16},"urb1102":{"lost":1,"built":1},"urb1201":{"lost":3,"built":3},"uea0103":{"kills":1},"url0208":{"lost":9,"built":9},"uel0101":{"kills":1},"urb0201":{"built":1},"uel0103":{"kills":2},"url0306":{"built":1}},"type":"Human","general":{"score":62162,"currentcap":{"count":1000},"lastReclaimedMass":7889.1025390625,"mass":91104.3125,"built":{"mass":76864,"count":245,"energy":590548},"kills":{"mass":2160,"count":43,"energy":31560},"lost":{"mass":88626.5078125,"count":233,"energy":5552114},"currentunits":{"count":0},"energy":1077442.75,"lastReclaimedEnergy":5348.41015625},"faction":3,"resources":{"massin":{"total":91104.3125,"rate":0},"energyout":{"total":851887.6875,"rate":0},"energyin":{"total":1077442.75,"rate":0},"energyover":123867,"massover":8853.7314453125,"massout":{"total":81731.3671875,"rate":0}},"name":"Rogue_Toaster","units":{"air":{"lost":0,"kills":20,"built":0},"tech3":{"lost":19,"kills":0,"built":16},"cdr":{"lost":1,"kills":0,"built":1},"tech2":{"lost":41,"kills":1,"built":54},"tech1":{"lost":160,"kills":42,"built":174},"transportation":{"lost":0,"kills":0,"built":0},"land":{"lost":73,"kills":22,"built":81},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":153,"kills":1,"built":170},"engineer":{"lost":46,"kills":0,"built":34},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":0}}},{"blueprints":{"ueb1102":{"lost":1,"built":1},"ueb1105":{"lost":1,"built":1},"xsa0102":{"kills":4},"ueb0101":{"lost":1,"built":1},"ueb3101":{"lost":2,"built":2},"ueb1202":{"lost":11,"built":9},"uel0001":{"lost":1,"built":1,"lowest_health":0},"uel0105":{"lost":14,"built":14},"uel0106":{"kills":8},"uea0103":{"kills":6},"ueb2101":{"lost":1,"built":1},"ueb1103":{"lost":2,"built":11},"ueb1106":{"lost":7,"built":6},"ueb1101":{"lost":14,"built":13},"uel0103":{"kills":3},"uea0102":{"kills":4}},"type":"Human","general":{"score":10472,"currentcap":{"count":1000},"lastReclaimedMass":1023.2777709961,"mass":16071.984375,"built":{"mass":12459,"count":60,"energy":82490},"kills":{"mass":1418,"count":25,"energy":34360},"lost":{"mass":31595.25,"count":55,"energy":5088204},"currentunits":{"count":0},"energy":134099.09375,"lastReclaimedEnergy":3331.681640625},"faction":1,"resources":{"massin":{"total":16071.984375,"rate":0},"energyout":{"total":127278.8984375,"rate":0},"energyin":{"total":134099.09375,"rate":0},"energyover":5470.337890625,"massover":5.19873046875,"massout":{"total":14581.694335938,"rate":0}},"name":"ufc_gladiator","units":{"air":{"lost":0,"kills":14,"built":0},"tech3":{"lost":0,"kills":0,"built":0},"cdr":{"lost":1,"kills":0,"built":1},"tech2":{"lost":11,"kills":0,"built":9},"tech1":{"lost":43,"kills":25,"built":50},"transportation":{"lost":0,"kills":0,"built":0},"land":{"lost":16,"kills":11,"built":16},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":40,"kills":0,"built":45},"engineer":{"lost":15,"kills":0,"built":15},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":0}}},{"blueprints":{"xaa0202":{"built":12},"urb3101":{"kills":3},"xrl0302":{"lost":7,"built":8},"uab1201":{"built":1},"dea0202":{"kills":3},"ual0208":{"built":2},"ual0001":{"built":1,"lowest_health":11000},"uel0104":{"kills":2},"uel0208":{"kills":3},"xsa0101":{"kills":11},"ura0102":{"kills":21},"uea0101":{"kills":9},"uab2101":{"built":2},"uab2104":{"built":5},"uab1106":{"lost":7,"built":8},"uab1103":{"built":24},"ual0106":{"lost":4,"built":5},"uab1202":{"lost":7,"built":20},"uaa0101":{"built":1},"xsa0202":{"kills":5},"uab5101":{"lost":13,"built":13},"uab4201":{"built":7},"ual0105":{"lost":2,"built":73},"uab1105":{"built":3},"uab0202":{"built":1},"url0105":{"kills":20},"ura0101":{"kills":1},"xsb1103":{"kills":2},"ueb1103":{"kills":1},"uab0101":{"built":2},"xsa0102":{"kills":2},"uab1101":{"built":14},"uaa0102":{"built":8},"uel0105":{"kills":1},"xsl0101":{"kills":3},"ual0101":{"lost":1,"built":1},"xsa0303":{"kills":3},"uab0102":{"built":1},"uab1102":{"built":2},"urb2104":{"kills":2},"uaa0104":{"built":1},"urb1103":{"kills":5},"xsb3101":{"kills":1},"xsl0105":{"kills":1},"uel0201":{"kills":3},"uaa0203":{"built":29},"ual0201":{"lost":28,"built":45},"uel0106":{"kills":5},"url0306":{"lost":1,"built":1},"uab3101":{"built":1}},"type":"Human","general":{"score":42529,"currentcap":{"count":1000},"lastReclaimedMass":7391.0375976563,"mass":58395.88671875,"built":{"mass":45309,"count":291,"energy":486430},"kills":{"mass":9451.1328125,"count":108,"energy":267449.3125},"lost":{"mass":20581.599609375,"count":117,"energy":291357},"currentunits":{"count":154},"energy":768737.4375,"lastReclaimedEnergy":13091.001953125},"faction":2,"resources":{"massin":{"total":58395.88671875,"rate":8.8500003814697},"energyout":{"total":693039.625,"rate":99.249290466309},"energyin":{"total":768737.4375,"rate":100},"energyover":37023.5546875,"massover":737.88269042969,"massout":{"total":50406.859375,"rate":4.425000667572}},"name":"SugarNoob","units":{"air":{"lost":47,"kills":55,"built":53},"tech3":{"lost":0,"kills":3,"built":0},"cdr":{"lost":0,"kills":0,"built":1},"tech2":{"lost":53,"kills":11,"built":82},"tech1":{"lost":64,"kills":94,"built":208},"transportation":{"lost":1,"kills":0,"built":1},"land":{"lost":43,"kills":38,"built":138},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":27,"kills":15,"built":104},"engineer":{"lost":2,"kills":25,"built":76},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":0}}},{"blueprints":{"ual0111":{"built":3},"uel0202":{"built":3},"uel0111":{"built":3},"ual0202":{"built":3},"ual0201":{"built":5},"uel0201":{"built":5},"uel0303":{"built":4},"ual0303":{"built":4}},"type":"AI","general":{"score":0,"currentcap":{"count":1000},"lastReclaimedMass":0,"mass":0,"built":{"mass":0,"count":30,"energy":0},"kills":{"mass":0,"count":0,"energy":0},"lost":{"mass":0,"count":0,"energy":0},"currentunits":{"count":0},"energy":0,"lastReclaimedEnergy":0},"faction":5,"resources":{"massin":{"total":0,"rate":0},"energyout":{"total":0,"rate":0},"energyin":{"total":0,"rate":0},"energyover":0,"massover":0,"massout":{"total":0,"rate":0}},"name":"civilian","units":{"air":{"lost":0,"kills":0,"built":0},"tech3":{"lost":0,"kills":0,"built":8},"cdr":{"lost":0,"kills":0,"built":0},"tech2":{"lost":0,"kills":0,"built":12},"tech1":{"lost":0,"kills":0,"built":10},"transportation":{"lost":0,"kills":0,"built":0},"land":{"lost":0,"kills":0,"built":30},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":0,"kills":0,"built":0},"engineer":{"lost":0,"kills":0,"built":0},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":0}}},{"blueprints":[],"type":"AI","general":{"score":0,"currentcap":{"count":1000},"lastReclaimedMass":0,"mass":0,"built":{"mass":0,"count":0,"energy":0},"kills":{"mass":0,"count":0,"energy":0},"lost":{"mass":0,"count":0,"energy":0},"currentunits":{"count":0},"energy":0,"lastReclaimedEnergy":0},"faction":5,"resources":{"massin":{"total":0,"rate":0},"energyout":{"total":0,"rate":0},"energyin":{"total":0,"rate":0},"energyover":0,"massover":0,"massout":{"total":0,"rate":0}},"name":"civilian","units":{"air":{"lost":0,"kills":0,"built":0},"tech3":{"lost":0,"kills":0,"built":0},"cdr":{"lost":0,"kills":0,"built":0},"tech2":{"lost":0,"kills":0,"built":0},"tech1":{"lost":0,"kills":0,"built":0},"transportation":{"lost":0,"kills":0,"built":0},"land":{"lost":0,"kills":0,"built":0},"sacu":{"lost":0,"kills":0,"built":0},"structures":{"lost":0,"kills":0,"built":0},"engineer":{"lost":0,"kills":0,"built":0},"naval":{"lost":0,"kills":0,"built":0},"experimental":{"lost":0,"kills":0,"built":0}}}]}

it contains how many of each unit were built, killed and lost, same for some unit categories, each per player, plus the total eco stats. It's ~20KiB or 2.5KiB per player.
Now there are of course different games with more/less player/time/units and the first 15min (until the game reaches T4) there would be fewer data than for 15min+ (where data stored per second stays +/- the same), but let's just assume this is the average.

If we wanted to store this data every 10s, we would produce a total of ~277.5KiB per game per player (ignoring the size of the replay). Multiplied by 2800 people-games results in ~758 MiB per day - producing 1TiB in about 3.5 years, ignoring all other data we produce. But then again, we can compress this metadata, maybe down to 1/4th of its original size which leaves us with 189MiB per day (additional replay data only) - so far within your estimation.

But let's calculate with more extreme values: A 60min 12 player games would produce a 12x60x6x2.5KiB = 10MiB replay file - with 2800people-games / 12player, this would be a total of 2.3GiB per day and, by the way, would cause all 12 players to upload 10MiB of data at the end of every game. For some, this can take quite a while.

To make a better estimation, we need to know what the average number of players and average game time is.
Working on FAF is my passion. Most of you know me for the feature-rich Downlord's FAF Client, but I also program and maintain the FAF server. Visit my Patreon page to get some insights on my work.
Downlord
Councillor - DevOps
 
Posts: 226
Joined: 14 Jul 2013, 14:55
Has liked: 161 times
Been liked: 213 times
FAF User Name: Downlord

Next

Return to FAF Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest