icza / scelight

The source code of the Scelight project with all its modules.
https://sites.google.com/site/scelight/
Apache License 2.0
124 stars 19 forks source link

Live View of History of current opponent #19

Open Arkinator opened 5 years ago

Arkinator commented 5 years ago

I got this idea after reading https://www.reddit.com/r/starcraft/comments/alg9ne/blizzard_could_we_please_have_the_ability_to_tag/

We could add the ability to see the individual match-history vs the current opponent. This would make it easier to spot rematches, to see the tendencies of the player or maybe just in general remember who they were. This would solve or at least alleviate the pain induced by barcodes, but also be useful to the broader audience as it allows me to see if and when I played vs my current opponent before.

There is an API of starcraft to see the current match and the current opponent (https://us.battle.net/forums/en/sc2/topic/20748195420), I don't know if scelight uses this already. One solution would be to simply poll this endpoint, say every second, and if a change into a new match is detected a new multi-replay analyze could be triggered with the opponent id as a filter added in.

icza commented 5 years ago

Good idea, but there is one problem with it: the API does not reveal the toon (ID) of the player, just his/her name. Since the name is not unique, Scelight couldn't filter for the exact opponent you're playing against.

Arkinator commented 5 years ago

damn, you are right, i didn't notice. I feel this could still be a very useful and fun feature.

Arkinator commented 5 years ago

I wanted to contribute to this project anyways and this feels like a good chance. I think I can get around to this sometime in february. Unless you want to go ahead... 😃

icza commented 5 years ago

I think the toon is purposely not exposed, so you can't get information about the opponent during the match that could give you an unfair advantage (e.g. typical build orders).

Arkinator commented 5 years ago

yes. the sc2-api very much feels restricted, which is very understandable. is the playername from this api a different one then the one available in the replay? if not simply comparing the playernames feels like a "99% solution", so good enough.

icza commented 5 years ago

Yes, this name is the same what you see in Scelight, but I don't think it alone is good enough because:

So basically you'd see replays from other players too, and the ones you see would not be a complete list.