[REL] PA Stats (Decommissioned)

Discussion in 'Released Mods' started by cola_colin, August 15, 2013.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    PA Stats now fully works with 59549.
    I think.
    Also you need to update the alerts manager to make it fully work.
  2. Illmaren

    Illmaren Active Member

    Messages:
    174
    Likes Received:
    150
    PAStats Offline? i can´t reach the Server.
  3. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Same here. I'm getting a 502 error.
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    something drove it out of memory roughly 5 minutes after I went offline.
    The heap dump I just took is only 54mb in size though :S

    It's up again
  5. Clopse

    Clopse Post Master General

    Messages:
    2,535
    Likes Received:
    2,865
    Crikey, worst site manager ever :D
  6. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I think the 8 players with pa stats game is a possible cause. Opening a few tabs of that page at the same time puts a very heavy load on the server. Might be related to what happened. Seems it doesn't like that many players in one game. Soooo many events.
    I guess I really should start to optimize a bit more :S
  7. Illmaren

    Illmaren Active Member

    Messages:
    174
    Likes Received:
    150
    oh and for one moment i thought it could be me ;D
  8. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Did you do something around 00:40?
  9. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    Can PA Stats capture the location of a notification to measure when the first build events happen on a new planet? It could be really interesting to be able to see when games go interplanetary.
    totalannihilation likes this.
  10. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    It does already. I am just missing the time so far to use it. If you know javascript I can explain you the dataformat and you can write something.

    Though for "when are they interplanetary" you can just check the army composition for orbital stuff.
  11. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    I am a web developer and I have looked around in the client code a bit. I just haven't been able to justify putting time in this while I was on a contract. I am thinking about becoming active in modding now though.

    I know we can look at composition, but it may be interesting to have a chart showing planet ownership over time. We could track build/destroy alerts to see who owns which planets and which ones are unclaimed or contested.

    If this would be worth doing, there should probably be some discussion on how that should be represented on the web page.
    totalannihilation likes this.
  12. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    read this post from me for ideas I had: https://forums.uberent.com/threads/rel-pa-stats-59549.50690/page-9#post-841225
    The coolest thing might be a base layout with a time slider that shows planets as well.

    The page currently works like this:

    1. Maybe Init from a data-blob that looks like this: http://nanodesu.info/pastats/report/get/events?gameId=11675
    2. If the game is live have 2 listeners for new events like this:

    Code:
    $(document).on("new-players", function(event, data) {
          
    for (var i = 0; i < data.value.length; i++) {
    var p = data.value[i];
    armyModel.addPlayer(p.playerId, p.name, p.pColor, p.sColor);
    }
        });
    Code:
    $(document).on("new-army-events", function(event, data) {
            for (var i = 0; i < data.value.length; i++) {
                var evt = data.value[i];
                armyModel.addEvent(evt.playerId, evt.spec, evt.time, evt.watchType);
            }
    ...
    So if you could write something that uses this kind of interface I could add it to the page without much issues I think.
  13. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Released a new version that mostly fixes internal problems.
    If this works out okay I'll start working on matchmaking next.
    ... Finally
  14. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    SWEET!
  15. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    So known bugs for now:
    - If you watch a live game and let the page open for a few minutes after the game ended and press F5 there will be some errors in the list of players.
    - It does not respect the lock for live game data anymore.

    Both are rather easy to fix I think.
  16. carlorizzante

    carlorizzante Post Master General

    Messages:
    1,371
    Likes Received:
    995
    Just a thought. It would be useful to have someone explain a little how to read the data. Perhaps little things, that could help the player in understanding macro mistakes, and correct them.
    mishtakashi and LavaSnake like this.
  17. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Hmm, true.
    I think @brianpurkiss wanted to do a new video due to the matchmaking, maybe he could ...? :D
  18. carlorizzante

    carlorizzante Post Master General

    Messages:
    1,371
    Likes Received:
    995
    Other thing. You surely know better than me, but recently I had to put some info graphic on a site, and we investigated the options available. Damn you can do nice things using jQuery and other libraries.

    Specially crossing data enriches the charts and what you can get out of them. Like Google Analytics, as soon as you start crossing things, it's like a revelation.

    Anyway, Assuming that the data are published in real time (perhaps they are delayed?) I've also noticed that when a game is live, I could use PA Stats to look into my adversary status.
  19. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    More analysis would definitely be cool. Did I already mention my wish for 48h days?

    The delay is 5 to 10 seconds. If you don't want people to see your stats while you play you can disable the display of live stats in the settings or right above "START ANNIHILATION" :)
  20. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Yeah some really impressive demo's on the d3 library https://github.com/mbostock/d3/wiki/Gallery which is the basis for the rickshaw library Colin uses in pa-stats

    this would be hella cool :) http://mbostock.github.io/d3/talk/20111018/azimuthal.html
    Last edited: January 29, 2014

Share This Page