Author Topic: Definition of Complete Replay  (Read 2699 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Definition of Complete Replay
« on: November 12, 2022, 02:42:54 PM »
Hi,

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

last-minute idea come up on Discord - saving the frame on which the replay is expected to complete.

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

Online namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Definition of Complete Replay
« Reply #1 on: November 12, 2022, 08:14:21 PM »
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 Lemmings 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)

Offline Simon

  • Administrator
  • Posts: 3860
    • View Profile
    • Lix
Re: Definition of Complete Replay
« Reply #2 on: November 13, 2022, 10:49:17 PM »
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
« Last Edit: November 14, 2022, 01:13:34 AM by Simon »

Online namida

  • Administrator
  • Posts: 12398
    • View Profile
    • NeoLemmix Website
Re: Definition of Complete Replay
« Reply #3 on: November 14, 2022, 01:11:25 AM »
That's an excellent point. I should flag such cases in mass checks even if the replay ultimately still passes.
My Lemmings 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)