Loading...
  OR  Zero-K Name:    Password:   

.sdfz Game Replay File Format

7 posts, 1467 views
Post comment
Filter:    Player:  
sort
7 years ago
Does anyone have any documentation on the .sdfz game replay file format?

I'd like to figure out a way to parse it and compile some stats.
+0 / -0
7 years ago
https://github.com/dansan/spring-replay-site/issues/91

Found this, there might be a way to decompress it. Apparently zk compressed it somehow at one point when it was .sdf :P
+1 / -0

7 years ago
What kind of stats are you looking for? The replay file just contains unit orders and chat, to get actual gameplay values you'd need to run the simulation.
+0 / -0
quote:
https://github.com/dansan/spring-replay-site/issues/91

Found this, there might be a way to decompress it. Apparently zk compressed it somehow at one point when it was .sdf :P
You're right, it's compressed! No wonder it looked like gibberish. Decompressed with 7zip, can see some of what I'm looking for now. Thanks!

quote:
What kind of stats are you looking for? The replay file just contains unit orders and chat, to get actual gameplay values you'd need to run the simulation.
Was looking for stats like time to first nuke, or first bantha. Maybe some other stats.

I assume this file is just a series of time stamped commands. Like player 1 said this. Player 1 moved this unit from here to here. Correct?

Any idea what the line separator is?

+0 / -0
It's actually more of a recording of the net packets that were sent.

You can poke around the code in and around here. Especially DemoReader.cpp should give you an idea (it reads a netcode::RawPacket when requested, which is simply stored/zipped as the memory block that would be in the program). To read those packets, you need to know how the chunk headers look (because they tell you how much data to read).

Once you figured out how to read the data in meaningful chunks, you'll have to look into how a RawPacket is decoded/interpreted in the engine to make sense of that data.

TL;DR: There is no line separator. It's binary data.
+1 / -0


7 years ago
Some prior art:
https://github.com/dansan/spring-replay-site/blob/master/srs/demoparser.py
https://github.com/dansan/spring-replay-site/blob/master/srs/parse_demo_file.py
https://github.com/springfiles/SpringStatsViewer
+1 / -0
quote:
Was looking for stats like time to first nuke, or first bantha. Maybe some other stats.

Unfortunately this is impossible.
You could find an "I want to build a Bantha" or an "I want to fire a nuke" order, but you can't know when (and if) they were actually followed (btw, a game could assist here by sending these stats as lua messages).
+1 / -0