[+][SUG][PL/ED] Keep playtest replay in memory

Started by WillLem, July 22, 2026, 10:08:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WillLem

From Guigui in this topic.

Quote from: Guigui on July 22, 2026, 09:13:44 PMI'd appreciate if replay carries when using the editor.
To be clearer : create a level, playtest it, exit to editor to make changes, play test the level again and find your previous replay ready for you.

WillLem

#1
Good idea.

The question is really how to do this. We can store a temporary replay file in the directory which always keeps the same name, updating the internal data whenever a level is playtested. If we're in Playtest Mode and the replay data matches the level, we load the replay. Otherwise, we only overwrite.

There may be a better way, though. My goal would be to not litter the directory with temporary replays, ideally.

Suggestions welcome.

Guigui

Your method of implementations sounds good.

I would add : delete temporary replay file when the editor is closed, or when a new level is loaded within the editor.
This way you always create a single temp replay file which vanishes when you end your work session with the current level.

With this method, you do not have a replay auto-loaded when you start working on another level. But this is not a problem imo, because then you do not have your intended solution (or close) autoloaded when you start working on this level, instead you have a fresh start and this helps tracking backroutes.

Save One level pack : do you have what it takes to save one Lemming ?
16 levels of medium-hard difficulty.
https://www.lemmingsforums.net/index.php?topic=7216.0

Bravo jolie Ln, tu as trouvé : l'armée de l'air c'est là où on peut te tenir par la main.

namida

Quote from: WillLem on July 22, 2026, 10:11:17 PMThere may be a better way, though. My goal would be to not litter the directory with temporary replays, ideally.

Maybe a dedicated folder (or subfolder of the replay dir) for these ones, and one file per level (perhaps tracked by level ID)?
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)

Guigui

I think namida's suggestion would mean there is a replay file saved somewhere for each level created with the editor.

Actually I do not think this is necessary. The main idea was to have the replay loaded when one quits playtesting a level, makes some changes in the editor, and then comes back playtesting the level again.

This is just to spare the time of playing the level again and again when spending a long time creating it. But I see no need to have a replay autoloaded when I edit a level I worked on some days/months/years ago.

So yes, I think a single .nxrp file which vanishes whenever I close the editor or load another level is enough for my needs ; that is unless another level designer thinks otherwise.

Save One level pack : do you have what it takes to save one Lemming ?
16 levels of medium-hard difficulty.
https://www.lemmingsforums.net/index.php?topic=7216.0

Bravo jolie Ln, tu as trouvé : l'armée de l'air c'est là où on peut te tenir par la main.

WillLem

I can see the merits of both ideas tbh.

A single replay keeps the feature neat, and focuses it on the level currently being worked on.

Multiple replays (one per level) does mean that a 'solution replay' is essentially being generated and stored per-level. This can be used to track later backroute fixes, and will no doubt come in handy if the author has forgotten the solution to their own level (I have done this a number of times!)

It could be confusing for a player to playtest a level and see that a replay has been loaded, though.

Feedback welcome.