Poll

How frequent should auto-saves be?

Every minute
3 (50%)
Every 2.5 minutes
0 (0%)
Every 5 minutes
3 (50%)
Every 10 minutes
0 (0%)
Longer
0 (0%)
I would disable them
0 (0%)

Total Members Voted: 6

Voting closed: August 31, 2020, 12:37:24 AM

Author Topic: [SUG][EDITOR] "Autosave" type function  (Read 2059 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
[SUG][EDITOR] "Autosave" type function
« 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.
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 mantha16

  • Posts: 287
    • View Profile
Re: [SUG][EDITOR] "Autosave" type function
« Reply #1 on: August 14, 2020, 09:01:53 PM »
+600000000000000000000 from me for obvious reasons lol

Offline IchoTolot

  • Global Moderator
  • Posts: 3612
    • View Profile
Re: [SUG][EDITOR] "Autosave" type function
« Reply #2 on: August 14, 2020, 09:14:04 PM »
A few extra autosave files would be a handy safety addition. :)

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SUG][EDITOR] "Autosave" type function
« Reply #3 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:

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [SUG][EDITOR] "Autosave" type function
« Reply #4 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).
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 namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [SUG][EDITOR] "Autosave" type function
« Reply #5 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.
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 WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SUG][EDITOR] "Autosave" type function
« Reply #6 on: August 24, 2020, 03:54:39 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?

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: [SUG][EDITOR] "Autosave" type function
« Reply #7 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.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [SUG][EDITOR] "Autosave" type function
« Reply #8 on: August 24, 2020, 06:52:22 PM »
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.
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 mantha16

  • Posts: 287
    • View Profile
Re: [SUG][EDITOR] "Autosave" type function
« Reply #9 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

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [SUG][EDITOR] "Autosave" type function
« Reply #10 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.
« Last Edit: September 02, 2020, 10:25:10 PM by namida »
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 namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [SUG][EDITOR] "Autosave" type function
« Reply #11 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.
« Last Edit: September 02, 2020, 10:52:30 PM by namida »
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)