Pages: 1 2 »
  Print  
Author Topic: LGM Automatic Saving  (Read 26981 times)
Offline (Male) DarkAceZ
Posted on: April 30, 2012, 10:09:33 am

Member
Location: United States
Joined: Dec 2011
Posts: 75

View Profile
Is this even possible?
Logged
My Goodness! Is it 4:30? I'm supposed to be having a back, sack and crack!

[edit]
Offline (Male) Josh @ Dreamland
Reply #1 Posted on: April 30, 2012, 01:47:42 pm

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
Considering Ism has evaporated, no.

If she comes back, you can put in a feature request.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) DarkAceZ
Reply #2 Posted on: April 30, 2012, 03:47:28 pm

Member
Location: United States
Joined: Dec 2011
Posts: 75

View Profile
Where?
Logged
My Goodness! Is it 4:30? I'm supposed to be having a back, sack and crack!

[edit]
Offline (Female) IsmAvatar
Reply #3 Posted on: April 30, 2012, 04:57:29 pm

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
If you can be as specific as possible about how you'd like it to behave, you can put the feature request here:
https://github.com/IsmAvatar/LateralGM/issues
If not, this forum topic can be the proving grounds where people can discuss ideas for how it should work until there is a concrete proposal, and then you can stick it there.
Logged
Offline (Unknown gender) TheExDeus
Reply #4 Posted on: April 30, 2012, 05:36:44 pm

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Every time you change something an autosave is made so that if (or more precisely "when") LGM crashes, you can still get the data. Also, autosaving every time the project is compiled would also be great, as I now sometimes don't save for 20mins while compiling every 20 seconds. Then something crashes and all progress is lost. What autosave SHOULDN'T do is overwrite the existing project file. Also, making like 3 backups and then cycling trough them all the time would be great. Of course, all of this should be an option in setting panel.
Logged
Offline (Male) DarkAceZ
Reply #5 Posted on: April 30, 2012, 06:29:12 pm

Member
Location: United States
Joined: Dec 2011
Posts: 75

View Profile
^ Wut he sed, I'm just to lazy to write it.
« Last Edit: May 02, 2012, 05:48:00 pm by -DarkAceZ- » Logged
My Goodness! Is it 4:30? I'm supposed to be having a back, sack and crack!

[edit]
Offline (Female) IsmAvatar
Reply #6 Posted on: April 30, 2012, 10:47:35 pm

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
Define "Change". Do you mean every time a "Ok" button is pressed, or every time a character is typed in a textfield?

Also, where will said file(s) be stored?
Logged
Offline (Male) Josh @ Dreamland
Reply #7 Posted on: May 01, 2012, 12:21:36 am

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
Often, IsmAvatar, it's every N minutes. The storage is a trickier problem, since LGM doesn't create a ~/.lgm (or AppData folder on Windows).
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) TheExDeus
Reply #8 Posted on: May 01, 2012, 05:19:48 am

Developer
Joined: Apr 2008
Posts: 1860

View Profile
GM stores them in the same folder as GMK. That could also be an option. Otherwise store it in a temp folder and on crash report to the user that backup is in this folder. Or do what MS Office do and when you run LGM next time after the crash just ask if the user wants to reload the autosave.

Also, with change I meant every time "OK" is pressed. Every N minutes would also work. The more options, the better really.
Logged
Offline (Female) IsmAvatar
Reply #9 Posted on: May 01, 2012, 03:37:07 pm

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
One option is to store them in Temp. That is, if the user doesn't mind them disappearing when the computer cleans it out (typically at reboot, or when the file is several days old. On Windows, it's never cleaned. On Linux, it's cleaned at reboot). This is not usually an issue because a user will usually try to recover from a crash immediately, however this can become an issue on certain systems which arbitrarily delete temp files at regular intervals (do systems like that still exist?).

Next to the GMK is another option. This will cause issues for new games (that haven't been saved or loaded), or files in non-writable directories (e.g. loading a file from a CD). The prior is not a big problem because the user's stupid for not saving to begin with. The latter would require more work to resolve - first, we'd need to figure out if the directory is writeable, and if not, either put it in read-only mode (which would be a lot of work - going through LGM and making everything uneditable), or using an alternative method to those files (e.g. temp, or just not backing up). This also causes the typical issues of backup files next to the original (such as gedit) - like the files not getting cleaned up, and ending up in a repository for revisioned projects unless an ignore rule for them is written.

The Application Directory is something that probably needs to be done anyways. See http://enigma-dev.org/docs/Wiki/LateralGM:Workdir so that is certainly another option, but at the rate progress is being made with that, I wouldn't expect the feature to be implemented anytime soon...
Logged
Post made May 02, 2012, 02:54:39 am was deleted at the author's request.
Offline (Unknown gender) TheExDeus
Reply #11 Posted on: May 02, 2012, 08:01:09 am

Developer
Joined: Apr 2008
Posts: 1860

View Profile
If you can't write in the project file directory, then you can't save the project anyway. User will not write something for the project and then no save it. So temp is last resort, as in 99.9% cases this will not be a problem.
Logged
Post made May 03, 2012, 02:08:14 am was deleted at the author's request.
Offline (Male) Josh @ Dreamland
Reply #13 Posted on: May 03, 2012, 09:25:38 am

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
Whoa. Who said anything about temp?  And who said anything about backups?
An autosaved file belongs in ~/.programname, or %APPDATA%/programname. I am certain Java has a feature to fetch that.
If you want the files to be "temporary," then put them in ~/.lgm/temp. Clean out that folder on confirmed, successful exit (meaning not when LGM just dies because the user pressed X).

On launch, if the folder is not empty, ask the user "Would you like to restore...?" and display a list, like Firefox and OOo do. Emphasis on OOo. The Java one.

If you're not going to prompt for close on pressing X, IsmAvatar, it might be a good idea to autosave before you unceremoniously exit.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Female) IsmAvatar
Reply #14 Posted on: May 05, 2012, 08:58:52 am

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 877

View Profile Email
We have a bug open for Ask On Exit, so that will be implemented first. At this point, it should finally be doable with ease. What I'm really seeing a need for at this point, though, is an options panel, which means we're going to need to go through everything that is going to have an option.
-- Not in this thread, though :-)

As for %APPDATA%/progname vs ~/.progname, again, see http://enigma-dev.org/docs/Wiki/LateralGM:Workdir
« Last Edit: May 05, 2012, 09:02:17 am by IsmAvatar » Logged
Pages: 1 2 »
  Print