[REL] PA Stats (Decommissioned)

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

  1. Quitch

    Quitch Post Master General

    Messages:
    5,850
    Likes Received:
    6,045
    Perhaps it'll turn one of the moons into a living graph. I wouldn't mind seeing mountain ranges charting my APM.
  2. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    hehe, yeah I know of that issue. It's just that the checkboxes are added to that UI element and it turns out that that UI element is not only used for the Start-Button. I guess I can make them invisible once the game starts.
  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
  5. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    A little side product of my ongoing work on capturing build orders:
    A list of all units + their internal unit type. Probably nobody care, but I think it is interesting to see:
    http://pastebin.com/t0J779n8
  6. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    So this starts to be the longest monologue I've ever had in a forums but here is my current status on capturing build orders, from the left: unit spec, x, y, z, planet, event, time:
    [​IMG]

    Suggestions how to display this kind of data the best way? I can think of a few javascript heavy things, but if somebody has a cool idea I would like to hear it.
  7. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Nice! I'm excited to see that data in use. Maybe a fun way would be an image timeline sort of thing where you have a scrollable horizontal timeline with a small image of each unit made. Any units of the same kind in built within, say, five minutes of each other could be grouped with a little counter thingy. You could even have a zoom slider to change the time used for grouping builds. This (without the zoom) should just need a scrollable div with a set size and then images positioned along it.
  8. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Yep that's what I had in mind too for the display of the build order. I could also add checkboxes like "only show buildings".

    Then there is the ability to show the army composition at any given time (derived from created and destroyed events),
    probably just as a a big box with little images in it and a slider for the time. Kinda like the selection you see when you select units ingame + a timeslider.

    Then there are those x/y/z and planet values. So far I have not really validated what they exactly mean, but I know that it's those values that are passed to a "move camera" call when you click the alert. So I would wager that if I draw a 3D Sphere and makes dots where I have events I would basically be able to i.e. display base layout or where heavy battles were (lots of destroyed events). With a timeslider I could display a replay of all buildings in the game. Unit movement ofc not, only where units are created and where they die.
    Kinda imagine the demo animation of this library: http://www.kevs3d.co.uk/dev/phoria/index.html
    But with a sphere in the middle, dots on it (or wait, actually lets make them strat icons) and the ability to scroll and maybe even zoom around. As well as some sort of drop down selection to view different planet. Or maybe just all planets at once.

    Does somebody own a time machine? Or a time factory? 24 hours a day is so damn short.
    Also if somebody wants to implement one of these ideas just ask. I can provide the data as json no problem and provide live updates via comet driven events. So you would not need to know any of the backend stuff from PA Stats. Just "here is an even with new data" every once in a while.

    EDIT:
    Another theoretic possibility:
    Ingame minimap that shows the location of events. Either in 3D or using some sort of projection.
    Last edited: December 19, 2013
  9. ORFJackal

    ORFJackal Active Member

    Messages:
    287
    Likes Received:
    248
    I'd like to know the number of each unit and structure type over history. I'm planning on creating a mod that would need that information from the current game in real time and of past games from other players.

    The idea is to create "PA Mentor" which shows how your eco, unit count and composition compares to more experienced players, so that new players would better grasp that how fast to expand and when to go T2/orbital/nuke etc. I would create my own server which collects and analyzes the statistics from PA Stats and the shows them inside the live game something like "your metal production is greater than 43% of the reference players - build more mex."
    cola_colin likes this.
  10. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Yeah and then give notifications.
    Hey most players already built a nuke around this time build one :)
    Could be cool.
  11. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Wow, that globe idea sounds AWESOME.
  12. ORFJackal

    ORFJackal Active Member

    Messages:
    287
    Likes Received:
    248
    A bit like when shopping on Amazon. "Players who built this factory also built these units." :)
  13. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    :D That goes in my PA forums hall of fame.
    stormingkiwi likes this.
  14. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Yeah, spend more money uhm metal.

    Would be cool, then again when the savegame is finished would uploading the replay not be a better alternative (if they aren't to big) then we can just watch the replay ?
  15. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    @ORFJackal : That sounds like a very cool idea. I can give you the raw-data you are seeing in the screenshot, sorted by games including their starttime (so you can calculate at which second of a game some event happend) in some json format as a webservice. The data from the current game is probably something you should collect yourself ingame. The code to capture all those events you are seeing up there is already on github.
    A drawback is that currently we only get "construction completed" events. So you would not be able to tell the player: "btw others usually start their t2 tech around now", but only: "btw others usually have t2 finished right about now".
    Still pretty cool I think though.

    @proeleert :
    Sure a replay is better, but also "heavier" to watch. PA Stats is just a webpage anyone can view from anywhere with a few clicks on any browser that can deal with a bit of html5 canvas things. I think it would be great to get a quick general overview without having to open PA.
    Also the globe thing is definitely the last thing I will try. I think the first will be the simple "view army composition with a timeslider" because it is the easiest to do and I am not that good with js.
    Last edited: December 19, 2013
  16. ORFJackal

    ORFJackal Active Member

    Messages:
    287
    Likes Received:
    248
    Thanks, a web service is just what I had in mind. I'll get back to you when I have the first version working - I can get started with the data from the web service that PA Stats uses for its current graphs.
  17. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Check out the slider at the bottom of games:
    http://www.nanodesu.info/pastats/chart?gameId=11642

    A few notes:
    In case of game crashes you can get unlucky and create a few false "unit destroyed" events, because unfinished buildings that die create such events. Usually they can be filtered out, but not when your game chrases.

    This PA Stats mod now changes the way alerts are handled internally to get the data. If you notice any changes in the behavior of alerts please tell me, as I tried to hide the changes from the user.

    EDIT:
    Also the time slider is a bit laggy for big games. This will be fixed in the next version.
    In fact on Firefox it can lock up the browser for a few seconds in big games. I guess my test cases were smaller and chrome is faster in handling javascript.

    Also it seems I broke something about the APM display.
    Last edited: December 21, 2013
  18. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Awesome. This will be so much fun to use!
  19. zaphodx

    zaphodx Post Master General

    Messages:
    2,350
    Likes Received:
    2,409
    APM counter broken? Done this quite a few times the last few days:
    [​IMG]
    mishtakashi and stormingkiwi like this.
  20. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Read the last sentence in my last post here :p
    There are still a few known issues, give me some time to improve this ^^

Share This Page