Definition of Complete Replay

Started by Simon, November 12, 2022, 02:42:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Simon

Hi,

namida said in the closed topic Any changes / additions needed in replay?:

Quote from: namida on December 31, 2021, 12:15:26 AM
last-minute idea come up on Discord - saving the frame on which the replay is expected to complete.

Quote from: namida on November 06, 2022, 11:54:13 PM
Commit 6b1bca2 implements this.

Mass replay check will make use of this too. Currently, a replay check will give up and return "undetermined" if 5 in-game minutes have passed since the last action and the save requirement is not yet met. It will now only do this if it's also been at least 5 in-game minutes since the expected completion time, if one is set in the replay file.

What moment will the game choose to write into the replay as completion time?

Sensible candidates:
* When the replay satisfies the save requirement,
* when the replay wins a talisman,
* when the replay wins all talismans,
* when you lose all lemmings.

At the game moment we save the replay, some replays satisfy none of the above. Will the game extrapolate to find a completion time, or will it write nothing? I assume you don't extrapolate. The completion time dosen't seem important enough to compute it at all costs.

-- Simon

namida

I have interpreted this as "the frame on which the save requirement is met". If a replay is saved prior to this, it won't contain a completion frame (exception: if a replay that contained one was loaded, and is saved again without any modifications, before reaching the expected completion frame, it will retain the existing completion frame).

When playing back a replay in-game, the expected completion frame is not used in any way (but will be modified / erased accordingly if the expectation is not met). It is only used by the mass replay checker. The mass replay checker uses this to set a lower bound on the frame at which it will terminate and return an "undetermined" status - the previous behavior was "5 in-game minutes after the last action"; it is now "5 in-game minutes after either the last action or the expected completion frame, whichever is later". Note in particular that this will never cause a replay to terminate earlier than it already would have. However, it also doesn't override the existing condition of "terminate if no lemmings remain alive".
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

#2
Thanks. Yes, it's sensible to write the frame of satisfying the save requirement. Especially if the purpose is to let the replay check run for longer than 5 minutes past final assignment on lengthy levels.

A secondary benefit would be to treat these replays as test cases for physics changes. If the replay doesn't break, but nonetheless wins during a different frame, we know that the physics must be different. For that, of interest can be both the frame of winning and the frame of last lemming's disappearance. But that's only a concern during engine development. I don't see how level maintainers can use frame of last lemming's disappearance (other than allow them to verify that, yes indeed, a new game version didn't break physics), so it's probably okay to not to worry about it.

-- Simon

namida

That's an excellent point. I should flag such cases in mass checks even if the replay ultimately still passes.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)