skell wrote:
Afaik that's more or less how it works. The algorithm goes as follows (it's from my memory):
- If total time spent on calculating moves since last snapshot is greater than X (where X is something like a second or two), make a new snapshot
- If there was no snapshot so far, consider 0th move a snapshot
- If there are too many snapshots, remove the oldest
It would be useful if that was the case, but from reading the code, it seems to do this instead:
- If total time spent on calculating moves since last snapshot is less than 500ms, don't make a new snapshot.
- If total turns since the last snapshot is less than 30, don't make a new snapshot.
- If 30 snapshots have already been made, don't make a new snapshot.
- Otherwise, take a snapshot.
So in short, there must be both half a second and 30 turns between each snapshot, and only 30 snapshots may be taken.
If computation time between turns is constant, than that means the time it takes to rewind from one snapshot to the next is equal to
Turns/4 seconds (since computation time from the previous snapshot to each rewound turn in course would have an average computation time of 250ms). So if there's 100 turns between two snapshots, even though it took 0.5 seconds to compute a single undo, it would take ~25 seconds to rewind the whole thing.
Note that this wasn't supposed to be *that* bad a thing when players were limited to a single undo (though the lack of continued snapshots after the 30th could be a problem with really intensive rooms). It's become more of a problem with the advent of UU, and the fact that the LCS puzzles are not hardcoded: the numbers next to the grid themselves are dynamically verifying the solution.
I'm not sure what's the best way to proceed from this, but that's my own findings on the subject.