Live data from Hacker News

Show HN: A nom parser for the Starcraft 2 Protocol Replay format

github.com

31–40 of 58 posts

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#31

This is a super cool project! It would be especially interesting to use on pro-level games, maybe you could even sell services to pros who want to get better. Like being able to say "your baneling run-bys are most cost-effective with 7 banelings around the ten minute mark" etc. With a relatively larger dataset you could come up with some real interesting statistics on individual players performance, use of certain un…

I'm messing around with a project now to featurize game states at arbitrary points and predict the winner with the idea of creating some sort of "eval bar" like in chess. Supply is a pretty good indicator but it's not always helpful. Definitely not in broodwar.

If it's quite good it could be useful as a tool for people trying to get better (although various tooling and custom maps have been around for these types of purposes since the game came out and most people even pros seem to just grind ladder for practice).

I was also hoping it could be used to analyze a replay and indicate how "back and forth" the game was, or if it was more one-sided, etc. Or if the top 100 pros were part of the featurization, then you could potentially determine how the odds change given a certain game state depending on who the pro is.

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#32
This is very cool, I'd love to chat more about it.

For context, I have an open source video player designed for esports coaches. The main feature is that you can load in multiple video streams at once at synchronise them together. Mainly for FPS games like Valorant / Apex Legends (https://www.vodon.gg/ if you want to explore it).

I'm starting to get access to some streams of data from the games via coaches that use the tool. My very naïve approach was simply to load game events into the video timeline (so you could easily skip forwards to deaths, kills etc) but I hadn't thought about loading this into data analysis tools.

The game events themselves for Valorant seem like they'd be enough to almost construct an online replay from them as well, which could compliment the recorded gameplay (i.e. construct a dynamic map of where everybody is that could be brought up on screen).

It's a very cool space, if you'd like to chat more my email is in my profile.

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#33
post #17
post #10

Earlier quoted context omitted.

Most of game corruption wasn't the result of faulty replay save / generation. Most of game corruption was the result of replays only recording user actions, and when the game engine was patched and rules were changed, re-playing the same user action could go wrong: imagine the cost of Probe getting increased from 50 minerals to 60. You load a replay that contains a "Build Probe" command when the user had 50 minerals.…

This brings another question, if I watch an old replay, does it mean it has to have the versioned game engine stored in the computer? Does it mean with every update it gets increasingly bigger? Or is there a number of supported versions you could replay? I only started playing like 3 years ago...

[deleted]

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#34
post #17
post #10

Earlier quoted context omitted.

Most of game corruption wasn't the result of faulty replay save / generation. Most of game corruption was the result of replays only recording user actions, and when the game engine was patched and rules were changed, re-playing the same user action could go wrong: imagine the cost of Probe getting increased from 50 minerals to 60. You load a replay that contains a "Build Probe" command when the user had 50 minerals.…

This brings another question, if I watch an old replay, does it mean it has to have the versioned game engine stored in the computer? Does it mean with every update it gets increasingly bigger? Or is there a number of supported versions you could replay? I only started playing like 3 years ago...

SC2 patches to an older version if you load an old version. Then patches back to current version when you want to play again. It requires the game to restart -- and while SC2 has a feature where you can watch a live replay with your friends (by all joining the same game which is hosted as type "replay") -- that "watch replay with others" feature only works with replays which were created in the latest version because only the latest version of the client can connect to the multiplayer servers.

I'm not sure if the older patches are hot-downloaded on-demand when you load an old replay, I think they actually might be -- but I don't know.

You can also "resume" a replay from any point and you and a friend can take over the game from that point. I think Harstem (both a professional player and a big streamer/ YouTuber) has a few YouTube videos where he explores a famous game where one pro player "had clearly lost and had absolutely no chance to win" but the losing player stayed in the game for a really, really long time and people were talking about whether and to what degree that was "unsportsmanlike" (similar to not resigning in a clearly-lost chess game). Harstem would take the losing side at the point in time that was generally agreed to be "lost" and some of his viewers of various ability levels and IIRC he beat all of them.

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#35

I'm curious to see how well this works with Direct Strike (custom game mode for SC2)

I only had one replay with direct strike in it's name but I can't remember watching it, I thought it was just one more map... I know it was failing initially to decode but in the end I fixed a couple of bugs and then it was working with this file. Could you explain what is significant go direct strike? How is it different to a normal game?

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#36
post #2

I may be the only one not familiar, but nom refers to https://github.com/rust-bakery/nom which looks like a pretty handy way to parse binary data in Rust.

For a very rough comparison of parsers, see https://github.com/rosetta-rs/parse-rosetta-rs

(which both includes a full json parser for each parser)

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#37

This is a super cool project! It would be especially interesting to use on pro-level games, maybe you could even sell services to pros who want to get better. Like being able to say "your baneling run-bys are most cost-effective with 7 banelings around the ten minute mark" etc. With a relatively larger dataset you could come up with some real interesting statistics on individual players performance, use of certain un…

https://sc2replaystats.com is one service already doing that, at least to some degree. Some features are locked behind a subscription payment. There's definitely room for improvement -- but some of what you're looking for is "unsolved"...optimal strategies are unknown, and the best strategy for a professional player may not be the best strategy for you. You'd likely want to practice strategies which won't get you top-100 in the world, but will work better with lower APM and lower overall "game sense".

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#38
post #10

Earlier quoted context omitted.

Most of game corruption wasn't the result of faulty replay save / generation. Most of game corruption was the result of replays only recording user actions, and when the game engine was patched and rules were changed, re-playing the same user action could go wrong: imagine the cost of Probe getting increased from 50 minerals to 60. You load a replay that contains a "Build Probe" command when the user had 50 minerals.…

> imagine the cost of Probe getting increased from 50 minerals to 60 Yes, please. - T, Z

60 mins, 15 gas and a forge.

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#39
post #17

Earlier quoted context omitted.

This brings another question, if I watch an old replay, does it mean it has to have the versioned game engine stored in the computer? Does it mean with every update it gets increasingly bigger? Or is there a number of supported versions you could replay? I only started playing like 3 years ago...

SC2 patches to an older version if you load an old version. Then patches back to current version when you want to play again. It requires the game to restart -- and while SC2 has a feature where you can watch a live replay with your friends (by all joining the same game which is hosted as type "replay") -- that "watch replay with others" feature only works with replays which were created in the latest version because…

Wow that is interesting that it patches back and forth, super cool! How did you find out about this? I wonder now and then if one can "consume" the events on a live game somehow, like connect as a bot or sniff the events before they are encrypted through the network... Also curious about the drone kill counter mod/overlay that Harstem uses, do you know of the name of that? I can't figure it out but would love to enrich it with stats from the data analysis

Re: Show HN: A nom parser for the Starcraft 2 Protocol Replay format

#40
post #39

Earlier quoted context omitted.

SC2 patches to an older version if you load an old version. Then patches back to current version when you want to play again. It requires the game to restart -- and while SC2 has a feature where you can watch a live replay with your friends (by all joining the same game which is hosted as type "replay") -- that "watch replay with others" feature only works with replays which were created in the latest version because…

Wow that is interesting that it patches back and forth, super cool! How did you find out about this? I wonder now and then if one can "consume" the events on a live game somehow, like connect as a bot or sniff the events before they are encrypted through the network... Also curious about the drone kill counter mod/overlay that Harstem uses, do you know of the name of that? I can't figure it out but would love to enri…

> How did you find out about this?

I studied SC2 altogether far, far, too much from 2019-2022. Had a goal to get into masters, played tens of thousands of games, watched multiple YouTube videos every day, memorized and practiced dozens of build orders, but still got stuck at my peak in low diamond.

When you're playing that much and reviewing replays, you start wondering why you can't watch old replays with people coaching you and someone eventually ends up explaining the system to you.

Post reply on HN