[Bug][Player] Others' replays should not overwrite own records

Started by Proxima, February 06, 2019, 02:44:14 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Proxima

Edit Simon: This issue (others' replays should not overwrite own records) was a sidetrack by Simon in Record "Fewest Skills Used" and "Largest Excess Saved", but it's really a standalone issue. Thus here is its own topic.

Related issue: https://www.lemmingsforums.net/index.php?topic=3898.0




Quote from: SimonTrophy management ideally should detect when we run other people's replays and not update trophies for those results.

Quote from: namida on February 06, 2019, 11:19:15 AMUnless Nepster has added something, NeoLemmix has no way to differentiate between "replay created by this user" and "replay created by another user". It could fairly easily detect "was any replay used?", and wouldn't be much harder to add "...excluding replaying an attempt the user has just made", but beyond that it wouldn't be able to tell, other than by relying on an honesty system which would be both unreliable and annoying to the user.

The problem isn't honesty (or worrying about possible lack thereof); it's that the user has to take extra steps to avoid overwriting their own records; after forgetting this just once, or not knowing about it, one's own records are gone with no warning and can't be retrieved. This is already a problem with NL's tracking of lemmings saved records, and would just get worse if we add skills and time records to the mix.

Nepster

Related issue: NL shows "solved" tick if I download a replay and watch it

The main problem here is that (contrary to Lix), NeoLemmix has no player-name. So unless we add this, we have no way to correctly detect the author of the replay file.
And regarding namida's suggestions, there are some problems:
1) What if a player switches computers (or just the NeoLemmix folder) and runs their own replays (possibly through the mass replay checker)? Then they would want to keep their records. Yes, they could as well copy the userdata file, but when I do a clean-up and set up a new NeoLemmix instance, then I regularly forget doing that.
2) More importantly: What if a player loads one of their own replays in an attept to optimize it, lets it run for most of the level, then spots a way to improve it, aborts the replay and solves the level? So just using loading a replay at the beginning should not abort updating the trophies. Similarly checking at the end of the level whether we do a replay or not, won't work either. The main problem here is that we can no longer distinguish between having loaded an external replay and consistently replaying it, or replaying the current attempt due to a backwards frameskip. And maybe there is as well the problem of the "action insertion during replay" feature...
By the way: Checking whether a replay is active during the very last frame won't help either, because the player could abort the level after a backwards frameskip.

Upshot is: As far as I can see at the moment, we would need a proper user management to implement this in a sensible way. But I feel that there are more important things to add at the moment.

Current workaround, if you still have your own records in the way of a replay: After playing an external replay, go to the userdata.nxsv file, grep there for the level title (in uppercase with spaces replaced by underscores) and delete the corresponding section between the two dollar signs. Then run your own replay again.

ccexplore

Perhaps instead of trying to figure out which replay should or should not update your records, what we need is sort of a special "view only" mode for replays that the user can use on demand, so the user tells you what they want at the moment.  In this mode, you cannot interrupt the replay at any point to stop the replaying and start inserting new moves (or perhaps upon such an attempt, the player could pause, warn and prompt, to give user a chance to confirm exiting out of "view only" mode into normal mode), and records are not updated.

The main downside is it still relies on user remembering to use this mode, but I feel like for users who are most worried about this problem, they are most likely to remember as well.  You could perhaps further help by having the option in the level selection UI to start a level in this mode, in which case the game will also automatically prompt for a replay to load upon level start, as a further differentiation from starting a level in normal mode.  Basically, the goal would be to habituate user into using this mode for all the cases where they intend to merely see someone else's replay, versus playing the level for real themselves.

Simon

You could implement this view mode without touching the interface: Let the game game remember the loaded replay. After the level ends, game compares the replay at the end with the loaded replay. If they're identical, we don't write any trophies.

The downside is that you can't batch-run your own replays anymore automatically to restore trophies (game can't distinguish your replays from other people's replays).

-- Simon

namida

QuoteAnd regarding namida's suggestions, there are some problems:

Sorry - I didn't intend to suggest "just block all replays", but rather, I was simply pointing out what NeoLemmix currently could or could not theoretically do.
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)

namida

Okay, let's discuss how to handle this.

In regards to how to handle this - I assume we want one's own replay to update these records. But someone else's replay, we don't. What about if we load someone else's replay, partially play it, then interrupt it?

If we're going to do this - how do people feel about a name (which can, of course, be a pseudonym) being stored in the replay file? If we use the profiles feature, the name could simply be obtained from the current profile. If not, it would be entered on first run, and could be edited in the settings menu. A name would not be required if the profiles feature is not also in use - but replays saved without a name would not be possible to detect whether they're your own or not. If people want the "detect own replays" feature, but also want to be able to share replays without their name in them, they could edit the name out and (aside from not being able to pass a "Is this my own replay?" test) the replay would still work.
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)

namida

I've made a branch "feature/username" which implements this. (EDIT: Not to be confused with "feature/profiles", which was the rejected multiple-profiles feature.)

On a user's first run of this version of NeoLemmix, the configuration window pops up. This window now has a prompt for a username. If a config file already exists, the window will pop up with only the username prompt (if no config file exists, it will prompt for a username and the usual first-run prompts). The username can later be changed in the Settings menu.

This username will be saved in replay files. Any replay, whether in the mass replay checker or by actually running in-game, will only update records / talismans / completion state if the username in the configuration matches the username on the replay file.

The default suggested username is "Anonymous", which also has some special treatment. The username "Anonymous", case-insensitive, will not be written to replay files, and will be considered to never match the username in a replay file.

If the user attempts to enter an empty username, it will instead treat it as if they entered "Anonymous".

If NeoLemmix is run with the command line parameter "-match-blank-replay-username", any replay file that doesn't contain a username will be treated as if it matched the current user's username (even when the username is "Anonymous"). This only lasts for the current session, and will return to normal behaviour once NeoLemmix is restarted without that parameter.

There is no multiple-profile support (that feature didn't have enough interest to be worthwhile), just a single username setting.
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)