GithubHelp home page GithubHelp logo

ggtrackerstack's Introduction

ggtrackerstack

Project to run the whole ggtracker stack in vagrant

Running

  • Make sure you have vagrant+virtualbox installed on your computer
  • Run git submodule update --init --remote --recursive to pull the latest version of each submodule
  • Run vagrant up to create the virtual box. This will download all required packages and go through the installation process for ggtracker and ESDB (~15 minutes; go make yourself a sandwich)
  • Run vagrant ssh to ssh into the vagrant box
  • Make a note of your vagrant IP: In the text it prints out upon login it says IP address for eth1: 172.28.128.3 (potentially some other ip)
  • Find code in /vagrant cd /vagrant
  • Start the application (requires 2 ssh sessions, or run them as background jobs)
    • ESDB: (cd esdb && foreman start)
    • ggtracker: (cd ggtracker && ESDB_HOST=172.28.128.3:9292 foreman start) (change IP accordingly)
  • Set up Amazon AWS S3 buckets for development as described in esdb/config/s3.yml.example (only dev and test are needed) and set up buckets and credentials accordingly in esdb/config/s3.yml and ggtracker/config/s3.yml. All buckets need to be publicly readable and the replay bucket needs to have CORS enabled for GET, PUT and POST.
  • Open your browser to 172.28.128.3:3000 (or whatever your vagrant IP is from the previous step)
  • The app will be on the ip of the vagrant box and uploading a replay should work - otherwise please raise an issue here, so it can be fixed.

Making changes to components

The components needed to run ggtracker.com are included in this project as submodules. We generally track the master branch of the official repos, except for sc2reader, which tracks the upstream branch.

Making changes to ggtracker, esdb and ggpyjobs

To make a change to ggtracker, esdb or ggpyjobs and testing that they work in your local setup, we recommended that you fork the component to your own github account and add the fork to your working copy of ggtrackerstack like this (using esdb forked to nickelsen as example):

  • Fork the component on github (e.g. nickelsen/esdb).
  • Go to the ggtrackerstack directory of the component (e.g. ggtracker, esdb or esdb/vendor/ggpyjobs).
  • Set your fork ssh url as the origin remote: git remote set-url origin [email protected]:nickelsen/esdb.git.
  • Add the official repo ssh url as the upstream remote: git remote add upstream [email protected]:dsjoerg/esdb.git.
  • Check your setup with git remote -v - should look like this (with your account instead of nickelsen).
origin  [email protected]:nickelsen/esdb.git (fetch)
origin  [email protected]:nickelsen/esdb.git (push)
upstream    [email protected]:dsjoerg/esdb.git (fetch)
upstream    [email protected]:dsjoerg/esdb.git (push)
  • Once your remotes are set up, you can branch off master of your fork (git checkout -b <branch-with-fix>), make your application changes, commit and push to your remote and create a pull-request against the official repo.
  • Note: If you work on ggpyjobs, you need to also make a pull-request to esdb to make esdb actually use your new and improved version of ggpyjobs (we'll hopefully automate this remote tracking at some point).
  • When the official repo changes (e.g. your pull-request is merged), you can update your working copy like this:
    • git fetch upstream
    • git merge upstream/master
  • You can sync your master branch to the master branch of the upstream like this:
    • git checkout master
    • git fetch upstream
    • git merge upstream/master
    • git push origin master
Making changes to sc2reader

Per default, sc2reader is managed by requirements.txt in ggpyjobs. To work on sc2reader it is recommended to use the cloned submodule at the root of ggtrackerstack and install that in development mode on the vagrant box by issuing python setup.py develop in /vagrant/sc2reader after ssh'ing into the vagrant box. Forks and branches are managed as described above.

ggtrackerstack's People

Contributors

dsjoerg avatar gravelweb avatar nickelsen avatar zellux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ggtrackerstack's Issues

retrieving current_solo_league broken perhaps, at least spec is broken

From @dsjoerg on August 17, 2014 19:44

This spec breaks: https://github.com/dsjoerg/esdb/blob/master/spec/sc2_identity_spec.rb#L185

When I investigated, it seemed that there might be an actual bug in bnet_scraper (or at least our fork of it, gem 'bnet_scraper', :git => '[email protected]:ggtracker/bnet_scraper.git', :ref => 'battlenetify'
).

bnet_scraper.scrape is called in esdb/games/sc2/identity.rb line 525, and the result comes back with no value for current_solo_league.

Copied from original issue: dsjoerg/esdb#1

Time calculations incorrect

From @kpaleniu on January 1, 2016 17:8

The way time is calculated from LotV replays seems to be incorrect. See the following replay. The replay is actually 14:47 long. The graph on the main page says the match lasted 20:43. Is this a known issue?

Copied from original issue: dsjoerg/ggtracker#16

Mass delete

From @dsjoerg on August 17, 2014 20:44

A commonly requested feature.

Note that, currently, deleting replays is restricted to GGTracker Pro subscribers (the idea being that if you care enough about GGTracker to want to delete a replay, you probably care about it enough that you should be contributing to keeping the server running). So by the same logic, mass delete should be a GGTracker Pro feature.

Copied from original issue: dsjoerg/ggtracker#2

Support HotS/WoL properly

Fabian writes "... but for a few weeks in all games that I upload the particular time I reach 1 Base Mineral Income is calculated wrong (so I get the bronze badge all the time). At the twitter accunt you told at April 8th that economic benchmarks should be OK again, but not for me. I tried to delete all games I uploaded so far and uploaded a few new ones, but this didn't change the behavior.

I play HotS, maybe it is calculated wrong because of the increased worker number you start with in LotV?

My account: http://ggtracker.com/players/1678992/farbeyon
Example replay from 2 days ago: http://ggtracker.com/matches/6622147

I would be very glad if you could look into this, so that one can rely on the calculations of GGTRACKER again. Thank you very much!"

Show upgrades / buildings / workers

From @dsjoerg on August 17, 2014 20:51

In the same place where we currently show army composition, we could also show upgrades, and perhaps also buildings and the # of currently alive workers.

Copied from original issue: dsjoerg/ggtracker#5

Show supply cap times

From @toff63 on August 19, 2014 19:33

Nicely show the periods when the play was supply cap and the total time during the game he was supply cap. This is a basic mistake for beginner. Fixing this issue will help player to improve

Copied from original issue: dsjoerg/ggtracker#9

Show SQ graph when Staircase view enabled

From @agwblack on April 8, 2016 14:5

I think a nice feature would be to have a graph that shows Spending Quotient against match number, when Staircase View is enabled. This would let users easily see their progress over time (at the moment you have to mouse over the Spending Skill medal).

Copied from original issue: dsjoerg/ggtracker#18

Show supply cap times

From @toff63 on August 19, 2014 19:33

Nicely show the periods when the play was supply cap and the total time during the game he was supply cap. This is a basic mistake for beginner. Fixing this issue will help player to improve

Copied from original issue: dsjoerg/ggtracker#9

Update auth instructions to work around problem with new portraits

If we do #30 this is no longer necessary or relevant.

Every time Blizzard adds new portraits, we get complaints from users who can't authenticate. That's because when Blizzard adds new portraits we have to make code and asset changes to take them in.

So as a quick & easy fix we could change the instructions to tell the person to first change their portrait to one of the standard ones like Kachinsky, and then wait and continue with the standard process. Or we could simply tell them to change their portrait TO Kachinsky unless it's already Kachinsky, in which case we tell them to change it to another one of the standard ones.

AI difficulty shows up as Elite when not elite

From @eric-hu on August 13, 2015 21:19

I thought I noticed this last month, was just chatting with a friend and he ran into this issue too. Will post a link once I hear back from him.

Copied from original issue: dsjoerg/esdb#3

Make skillcraft Action Latency calculation more accurate

From @dsjoerg on August 20, 2014 18:51

In skillcraft.py we are counting as "Actions" some things that should not be counted as actions.

https://github.com/dsjoerg/ggpyjobs/blob/master/sc2parse/skillcraft.py#L175

The algorithm should ignore the following actions:

               Seld
               Leaving the game
    'Use ability   5f01'
    'Use ability   6e00'
    'Use ability   7b42'
    'Use ability  12940'
    'Use ability  14442'
    'Use ability  15d09'
    'Use ability  17200'
    'Use ability  17801'
    'Use ability  17901'
    'Use ability  1fa0e'

These are the action descriptions used by SC2Gears. So the question is, what are these actions exactly? Next step is to fire up SC2Gears, look for these events in some replays, and figure out what they are.

Copied from original issue: dsjoerg/ggpyjobs#4

LOTV: Chronoboost graph no longer providing helpful information

From @gravelweb on April 13, 2016 2:34

Since chronoboost is now permanently cast on buildings, the stat shown (nexus energy maxed) is not helpful. I propose that instead of tracking nexus energy, it would be more useful to track whether the building that is chronoboosted is idle or not.

e.g.1. chrono boosting a robo that doesn't produce any units would show 0%.
e.g.2. chrono boosting warpgates would track the percentage of time where the building isn't on cooldown.

Would that change fit in ggtracker?

Copied from original issue: dsjoerg/ggtracker#21

LOTV update: chrono

From @j4p3 on January 10, 2016 17:47

P macro mechanic should be updated to reflect new usage. [feature]

Efficiency: the % of chronoboosted time that buildings are being utilized, e.g. for research, production, or warpgate cooldown.

Copied from original issue: ggtracker/sc2reader#8

Time calculations incorrect

From @kpaleniu on January 1, 2016 17:8

The way time is calculated from LotV replays seems to be incorrect. See the following replay. The replay is actually 14:47 long. The graph on the main page says the match lasted 20:43. Is this a known issue?

Copied from original issue: dsjoerg/ggtracker#16

LOTV update: timescale

From @j4p3 on January 10, 2016 17:41

Replays should be analyzed with the new LOTV real time, instead of Blizz time. [bug]

To reproduce:

  1. Run any replay

Expected:

  • Replay length corresponds to number of elapsed minutes/seconds (or hours if you're playing mech)

Actual:

  • Replay length off by 40% due to normal/faster game speed correction

Copied from original issue: ggtracker/sc2reader#6

Integrate DorkShrine into GGTracker

From @dsjoerg on September 12, 2014 15:38

I've been using github.com/dsjoerg/DorkShrine for ~6 weeks now to practice my builds and it's been quite helpful.

Copied from original issue: dsjoerg/ggtracker#12

Terran macro messed up by LotV?

Hi, I am using ggtracker to hopefully improve my starcraft play. Firstly, I would like to inquire about the coloured rectangles in the race macro graph. As far as I understand, these rectangles show you when your orbital command energy is at 200/200. But when I looked at the replay, I could not find any instances where I was at 200 macro energy. Also, I noted I had 5 orbital commands in the game but the analysis only showed me 4.

http://ggtracker.com/matches/6660913

View counter for player and match pages

From @dsjoerg on August 17, 2014 20:45

Could be fun to have a counter somewhere on match and player pages saying that this page has been viewed X times.

Copied from original issue: dsjoerg/ggtracker#3

LOTV: Zerg macro doesn't work when queuing injects

Looks like queueing injects causes the previous inject to be unregistered.

sc2parse/plugins.py:1153 (ZergMacroTracker)

        if target_hatch_id not in owner.hatches:
            target_hatch.injects = [event.frame]
            owner.hatches[target_hatch_id] = target_hatch
        else:
            # If not enough time has passed, the last one didn't happen
            if event.frame - target_hatch.injects[-1] < INJECT_TIME:
                print "Previous inject on {0} at {1} failed".format(target_hatch, target_hatch.injects[-1])
                target_hatch.injects[-1] = event.frame
            else:
                target_hatch.injects.append(event.frame)

ScannerSweep events with no location, how can this be

How can this event have no location?!
event 09.30 asphyxa         Ability (10C0) - ScannerSweep
Cant figure out which Base this Chronoboost/Scan/etc was for. Ignoring it :(
How can this event have no location?!
event 10.32 asphyxa         Ability (10C0) - ScannerSweep
Cant figure out which Base this Chronoboost/Scan/etc was for. Ignoring it :(
How can this event have no location?!
event 12.44 asphyxa         Ability (10C0) - ScannerSweep
Cant figure out which Base this Chronoboost/Scan/etc was for. Ignoring it :(
How can this event have no location?!
event 14.37 asphyxa         Ability (10C0) - ScannerSweep
Cant figure out which Base this Chronoboost/Scan/etc was for. Ignoring it :(

for this replay: http://drop.sc/replay/3841038

Mothership Absent from Units

From @dwinchell on February 14, 2016 19:14

This seems low priority given the frequency of motherships in current play, but just FYI in the list of units below the main graph on the match detail page, there is no icon for a mothership when a player builds it.

Copied from original issue: dsjoerg/ggtracker#17

Zerg macro doesn't work with Queen command group target change

Using this game as an example, I've been trying to figure out why only one hatchery is being tracked. I've narrowed it down the cause to the inject method used by the Zerg player:

  1. Select queen control group, shift+inject_hot_key
  2. Camera hotkey to first base
  3. Left click on the hatchery
  4. Camera hotkey to second base
  5. Left click on the hatchery

I've dumped the corresponding events w/ data from the replay below. It appears the problem is related to the command_update_target_unit_event not being handled.

03.20: 139730577463632: [class 'sc2reader.events.game.GetFromHotkeyEvent']: {'is_local': True, 'mask_type': u'None', 'frame': 4495, 'pid': 1, 'mask_data': None, 'player': None, 'second': 280, 'update_type': 2, 'control_group': 8, 'hotkey': 8, 'bank': 8}
03.20: 139730577463440: [class 'sc2reader.events.game.CameraEvent']: {'is_local': True, 'distance': None, 'frame': 4501, 'pid': 1, 'player': None, 'second': 281, 'location': (64.5, 158.76171875), 'pitch': None, 'y': 158.76171875, 'x': 64.5, 'yaw': None}
03.21: 139730577463824: [class 'sc2reader.events.game.TargetAbilityEvent']: {'upkeep_player_id': 2, 'target_unit': None, 'frame': 4508, 'pid': 1, 'other_unit': None, 'player': None, 'second': 281, 'target_flags': 111, 'ability_type_data': {'upkeep_player_id': 2, 'unit_tag': 74711041, 'unit_link': 108, 'control_player_id': 2, 'point': {'y': 657408, 'x': 264192, 'z': 40896}, 'flags': 111, 'timer': 0}, 'command_index': 0, 'control_player_id': 2, 'target_timer': 0, 'location': (64.5, 160.5, 40896), 'has_ability': True, 'target_unit_type': 108, 'ability': None, 'ability_id': 3296, 'ability_link': 103, 'other_unit_id': None, 'flag': {'alternate': False, 'target_self': False, 'dispatch_to_other_unit': False, 'data_a': False, 'preempt': False, 'repeat': False, 'user': True, 'subgroup': False, 'data_abil_queue_order_id': False, 'homogenous_interruption': False, 'data_b': False, 'minimap': False, 'is_order': False, 'script': False, 'smart_rally': False, 'ai_ignore_on_finish': False, 'set_autocast': False, 'set_autocast_on': False, 'ai': False, 'data_passenger': False, 'queued': True, 'smart_click': False}, 'ability_type': u'TargetUnit', 'is_local': True, 'target_unit_id': 74711041, 'flags': 258, 'y': 160.5, 'x': 64.5, 'z': 40896, 'ability_name': u'', 'ability_data': None}
03.21: 139730577464208: [class 'sc2reader.events.game.CameraEvent']: {'is_local': True, 'distance': None, 'frame': 4512, 'pid': 1, 'player': None, 'second': 282, 'location': (36.5, 151.7578125), 'pitch': None, 'y': 151.7578125, 'x': 36.5, 'yaw': None}
03.21:     skipped: [bound method GameEventsReader_38996.command_update_target_unit_event of [sc2reader.readers.GameEventsReader_38996 object at 0x7f158f849a10]]: {'target': {'snapshot_control_player_id': 2, 'snapshot_point': {'y': 628736, 'x': 149504, 'z': 32768}, 'tag': 80740354, 'snapshot_upkeep_player_id': 2, 'snapshot_unit_link': 108, 'target_unit_flags': 111, 'timer': 0}}
03.21:     skipped: [bound method GameEventsReader_38996.command_manager_state_event of [sc2reader.readers.GameEventsReader_38996 object at 0x7f158f849a10]]: {'state': 1, 'sequence': None}

Add rate limiting for esdb API

using rack-attack we could protect the ESDB API in the same way that we already protect the ggtracker webapp.

We ask people to not hit the API more than once per second, but some people probably are and it probably reduces quality of service for all the innocent users out there.

Show Action Latency

From @dsjoerg on August 20, 2014 19:0

Now that Action Latency is being computed for every player in every replay: https://github.com/dsjoerg/ggpyjobs/blob/master/sc2parse/skillcraft.py

What remains is to show it in the appropriate place(s) in the front end.

Action Latency is the average time from when a player looks in a new place to when they take their first action.

http://www.teamliquid.net/forum/starcraft-2/401425-starcraft-2-science-skillcraft-results#5

Of all the variables studied by the Skillcraft.ca study, it is the single most predictive variable of what league you're in: http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0075129#s5

Probably should add it to the main player profile page, but then the profile would have 4 charts and would need a redesign.

Copied from original issue: dsjoerg/ggtracker#10

Show build orders

From @dsjoerg on August 17, 2014 21:0

This is a very commonly requested feature.

The first and hardest question is how to visually design it in a "GGTracker" way, keeping it clean, light and not overwhelming to the first-time user.

To get some ideas, have a look at how spawningtool, sc2replaystats and sc2gears/scelight do it and see what you do or don't like.

Copied from original issue: dsjoerg/ggtracker#7

LOTV update: inject stats

From @j4p3 on January 10, 2016 17:44

Z macro mechanics should be broken into 2 stats, 'consistency' and 'efficiency'. [feature]

Consistency: % of game time hatches spend injected.
Efficiency: % of total injected time hatches have injects queued.

Copied from original issue: ggtracker/sc2reader#7

All activity is displayed in top right for 1v1

From @gravelweb on April 10, 2016 22:36

The mini-map feature is not working properly for 1v1. All activity seems to be happening at the top right, outside the boundaries of the map. This doesn't seem to be an issue in 2v2.

Copied from original issue: dsjoerg/ggtracker#19

APM on summary page is different from Blizzard APM

Hey I really appreciate ggtracker but one thing that I wish I could fix is the APM on the summary of your matches screen. It is very different from the APM shown on the in-game screen after a match is finished, but not by the factor of 1.4 that I've seen referenced in other places where there are 3.0/LOTV bugs mentioned.

Is there any way we can get the APM to be the same as what Blizzard shows us?

BTW I'm willing to help out. Setting up ggtrackerstack now. Are there sample replays that are used for reference/unit testing?

Income shown on Match page is 1.4x lower than the income shown in game client

For example in this match: http://ggtracker.com/matches/6617852
income at 3:35 is 1147 for Terran, 1091 for Protoss in the in-game income tab.
However on the GGTracker match page it shows as 823 for both of them.

The reason for this is that internally we store the income as 823 (which is the HotS-style income) but when showing things to users of course we should show them as LotV-style.

Or of course we could actually change our internal data representation to be LotV-style, but that would involve making additional changes throughout the codebase.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.