archived / shipped / access: artifacts

SC2 Enemy Info

A small SC2 companion that recognized my current opponent and surfaced past matches, stats, and the personal notes I wished the game itself had.

span
2017-2019
role
solo developer · competitive player
audience

Context

When I played StarCraft II competitively, I frequently encountered a need to keep notes on players that I played against often: a short memo about their favorite playstyle, weird openings they liked to play, or just general trivia we talked about. The game client unfortunately did not offer anything like this, so I decided to craft myself a small tool for this use case.

What I Built

I've built a desktop Java Swing application that monitors the local SC2 client API. The game provides real-time information about the match in progress and the names of the players in the game. Using this, I can look up info about a player from my database, including recent matches, current ladder stats, and past notes. If needed, I can quickly add another note about the player.

This requires the name+race combination to be unique. If there are multiple possible accounts with such an in-game name, only the number of candidates is returned, and neither exact notes nor match history is displayed.

The application queries a remote SPARQL endpoint containing the data, and it is expected that multiple players (teammates from Passion Mercs, for example) might use it and help each other by putting useful notes and observations in there.

Interesting Problems

Barcode players ruin the fun

To properly explain the concept, some players wish to stay anonymous on the ladder. To achieve that, a community meta emerged: people started using strings of uppercase I and lowercase l letters as their names. Since the game rendered the letters the same, it was impossible to read the exact combination, and the name looked like a barcode (hence the term). Many people adopted that to the point that up to ~20% of accounts in the top two leagues were barcodes (refer to the current situation, for example).

During the match, the only available information is the player name (either visually via the in-game UI or programmatically via the game API). The exact account is only retrievable from a replay file, which is only available after the game finishes. For this use case, I needed to recall the memo and stats at the start of the match and had to work with what I was given.

I noticed that while some barcode patterns are popular, several players want to differentiate themselves and use unique or rarely used patterns. To be able to mentally differentiate them, I made a small SHA-256 mapping function that encoded the pattern into two common words from a provided word list and displayed the result as an alias in the GUI. That made the pattern memorable and gave me something to work with, but it did not resolve the candidate accounts. I knew CombatRich (IIIIIIIIIIII) was one of the most common barcode forms, but when I saw MusicVast (IlIlIlIlIlIl), I knew it was very likely a 5.5K MMR cannon-rusher.

I was also able to gain an advantage since I could easily discern between different barcode players (if they used different patterns) in consecutive matches, which is something a player without such a tool wouldn't be able to do just from the game UI (because the letters look the same and are not easily memorable).

Related Projects

SC2 Data Manager provides data for the SPARQL endpoint for stats/name lookup.