Lemmings Forums

NeoLemmix => NeoLemmix Main => Archived Bugs & Suggestions => Topic started by: namida on August 14, 2020, 08:48:35 PM

Poll
Question: How frequent should auto-saves be?
Option 1: Every minute votes: 3
Option 2: Every 2.5 minutes votes: 0
Option 3: Every 5 minutes votes: 3
Option 4: Every 10 minutes votes: 0
Option 5: Longer votes: 0
Option 6: I would disable them votes: 0
Title: [SUG][EDITOR] "Autosave" type function
Post by: namida on August 14, 2020, 08:48:35 PM
Prompted by a crash-during-save leading to a user losing a significant amount of work, I'm wondering if autosave should be implemented?

To be clear - this would NOT automatically invoke the "Save" function. That itself has far too much potential for damage, too. Instead, it would be more like, every so often, a copy of the level is saved to a seperate file - perhaps in an "Autosave" subfolder or something.

It would be possible to disable this feature, probably on both a "Disable permanently" and "Disable until I close the editor" basis.
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: mantha16 on August 14, 2020, 09:01:53 PM
+600000000000000000000 from me for obvious reasons lol
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: IchoTolot on August 14, 2020, 09:14:04 PM
A few extra autosave files would be a handy safety addition. :)
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: WillLem on August 17, 2020, 02:57:31 AM
Since Mantha has already cast 600 quintillion votes in favour of this, it hardly seems worth throwing my vote in as well. However, +1 for what it's worth :lemcat:
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: namida on August 23, 2020, 09:14:26 PM
Autosave functionality, in and of itself, is implemented in commit f1421b6.

In its current state, it saves a copy of the level every 60 seconds, and cannot be disabled. These will come later - most likely before any stable release (certainly, the next stable release will have an option to disable autosave, but it may not have an option to configure the autosave timing).
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: namida on August 24, 2020, 12:36:36 AM
Continuing on, let's talk about how frequent a copy should be saved. Implementing the option to configure this will likely happen if there's a lot of disagreement over the frequency; whereas if people are mostly / wholly in agreement, it'll likely be a single fixed frequency. Again, I'll stress that an option to turn it off altogether will happen either way. I'll put a poll up for this.

The other question is whether old autosave files should be removed after some time, and if so, how long this should happen after. This could be either a timeframe ("clear any older than 24hrs") or a quantity (keep no more than 20 autosaves). Feel free to comment on this via posts for now, I'll possibly put up a poll later.
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: WillLem on August 24, 2020, 03:54:39 AM
Quote from: namida on August 24, 2020, 12:36:36 AM
The other question is whether old autosave files should be removed after some time, and if so, how long

In what way will they be stored?
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: Dullstar on August 24, 2020, 01:43:33 PM
I'd suggest the following:

Time Interval: No greater than 1 minute, but no less than 10 minutes, assuming it isn't configurable. Maybe 5 minutes?
When to remove: Keep a fixed number of autosaves. When this number is exceeded the oldest is automatically deleted.
Other: Don't autosave if no changes have been made since the previous save/autosave.

Edge case with this set of suggestions: should the autosave timer be running constantly, or should it not start until the user makes a change to the level?

I think it would be preferable to have the time interval and how many to store configurable.
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: namida on August 24, 2020, 06:52:22 PM
Quote from: WillLem on August 24, 2020, 03:54:39 AM
Quote from: namida on August 24, 2020, 12:36:36 AM
The other question is whether old autosave files should be removed after some time, and if so, how long

In what way will they be stored?

In an "autosave" subfolder, with a filename consisting of the time at which they were saved + the level's title. These can be opened exactly the same way as any other level file.
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: mantha16 on August 24, 2020, 07:22:56 PM
looking at how many files are in the autosave folder already some kind of limit i think will be good like deleting the oldest once you hit that limit
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: namida on September 02, 2020, 09:56:00 PM
Since this will be easier to do than I expected, I'm going to make all of this configurable. You will be able to configure how often autosaves are made (in whole minute increments), and how many autosaves are kept. Defaults will be "every 5 minutes" and "keep the last 15 autosaves" respectively.

So far I've added these options to the config menu / to loading and saving settings; but they don't actually do anything yet.
Title: Re: [SUG][EDITOR] "Autosave" type function
Post by: namida on September 02, 2020, 10:30:30 PM
This feature is now fully implemented as of commit 5634026 and available to test in the V1.26-D experimental build (https://www.lemmingsforums.net/index.php?topic=5049.0).