Remix.run Logo
greazy 2 days ago

Interesting you mention StarCraft. The replay feature could diverge off due to the non deterministic nature of the game.

https://news.ycombinator.com/item?id=21920508

raincole 2 days ago | parent | next [-]

The comment you linked to doesn't know what they are talking. (Edit: given the context, they know what they're talking about, but you don't)

A game having random mechanisms has absolutely nothing to do with whether it's deterministic.

Slay the spire is 100% deterministic, gameplay-wise. All the online poker games too.

greazy a day ago | parent [-]

Good call, thnaks for the correction. But there definitely was a sync bug.

Here's an old forum post discussing it

https://tl.net/forum/brood-war/352588-my-replays-are-broken

Here's a hacky patch that also documents some of the possible issues

https://liquipedia.net/starcraft/Replay_Fix_for_1.16.1

It seems like the bug is related to pausing the game.

setr a day ago | parent [-]

more specifically, the bug is due to a buffer overflow during paused chat, and presumably deviant undefined behavior between the original execution and the replayed execution.

and most importantly, it has nothing to do with the non-deterministic nature of the game -- non-determinism is trivial to account for, because PCRNGs are not actually non-deterministic; they're (pseudo)random, and deterministically so. They're just random enough to be equivalent to non-deterministic to the user.

As long as seeds are synced, it's trivially managed. But this kind of cause-for-desync is the reason deterministic engines are such a PITA to actually write. Any source of actual non-determinism wrecks everything, and there's always some miserably rare cases.

TeMPOraL 21 hours ago | parent [-]

StarCraft Brood War replays would desync due to version issues, too. Any gameplay adjustments in a patch would affect the replay, often in subtle ways that would sometimes result in a valid and interesting game, just different outcome.

rcxdude 2 days ago | parent | prev | next [-]

That's not the kind of nondeterminism that would cause replay divergence. The PRNG seed is stored in the replay (if it wasn't, almost every game would diverge very quickly. And since the multiplayer works the same basic way, the game would basically not function at all).

RedNifre 2 days ago | parent | prev | next [-]

The way I remember it was that replay playback would only break if you played a replay with a different game version than it was recorded with.

esrauch 2 days ago | parent | next [-]

There was definitely sync bugs with replays at various points.

There was even desync bugs even in live multiplayer games; there was detection that it desynced which would end the game, which in turn meant exploits that would intentionally cause a desync (which would typically involve cancelled zerg buildings for some reason).

shaan7 2 days ago | parent | prev [-]

or, if you are replaying a single-player game that you saved+loaded (i.e. the replay only worked if the full game happened in one go without any loads).

cataflam 2 days ago | parent | prev [-]

You misinterpreted the comment you are citing.

This non-determinism would not and did not cause replays to diverge (the PRNG seed was most likely stored and would reproduce exactly the same results).