Immediate autosave/overwrite of AGS projects... why?

Started by The Swampling, Sat 08/09/2018 13:59:53

Previous topic - Next topic

The Swampling

Just a simple query I've been unable to find an answer to elsewhere...

I'm fairly inexperienced with AGS but I'm quite happy to muddle through, however I've noticed that when I want to test something out, for example if I change the background image and get rid of the walkable areas and walk behinds etc. just to play around with a new room, intuitively you'd think you could simply reload the project, or close the program, reopen it and then reload the project, thus reverting all the changes; an intuition confirmed by the dialogue box which implies that your project is unsaved and changes will be lost.



So I click NO and lo and behold all of my changes have been saved upon reloading the project, helpfully undoing all of my previous work. I do like autosave features and the protection against lost work, but this in and of itself results in lost work, unless you manually make backups of your project, or make new rooms to play around with which will undoubtedly become tedious... :-\

So... Yes, I'm a noob, how does one turn this feature off or at least modify its behaviour, as I can see no such option anywhere in the software?

Any help is much appreciated.

Regards!



Crimson Wizard

Sorry, my previous answer was not very accurate, so I decided to rewrite it.

In AGS room editing work like a separate editing process with its own save/load mechanic, and is not connected to the rest of the game data. There is even separate menu command for saving room.

After you edited room you may close it without saving (answer NO when it asks you if you want to save the room).

If it actually saves the room without asking when you close the editor, then that's perhaps a bug. I'd test that out.

But it also DOES autosave the room when you run the game, it cannot do otherwise.
The only way to work around that is to either make backup copies of your game or even better use source control utility that lets you switch between old and new states of your project files: like Git, Mercurial, SVN etc.

The Swampling

#2
Quote from: Crimson Wizard on Sat 08/09/2018 14:29:59
After you edited room you may close it without saving (answer NO when it asks you if you want to save the room).

If it actually saves the room without asking when you close the editor, then that's perhaps a bug. I'd test that out.

But it also DOES autosave the room when you run the game, it cannot do otherwise.

I loaded a new background just to see how it would look and quickly put in some walking areas etc. just to test it out. I then ran the game and had a look, then decided to revert back to what I had originally by loading the game, only to find that my changes had been saved somehow without my consent and I now have to manually redo all of my original work to revert the room to its previous state.

Quote from: Crimson Wizard on Sat 08/09/2018 14:29:59
The only way to work around that is to either make backup copies of your game or even better use source control utility that lets you switch between old and new states of your project files: like Git, Mercurial, SVN etc.

I will look into the options you suggested to manually backup the rooms before I edit them, though it would be nice if AGS had some sort of built in mechanism to protect against unwanted changes and allow you to revert a room to an earlier state.

Thank you for your suggestions.

Snarky

Well, the key part of CW's response is this bit:

Quote from: Crimson Wizard on Sat 08/09/2018 14:29:59
But it also DOES autosave the room when you run the game, it cannot do otherwise.

In order to run the game, it has to save it (and the rooms) first. That's just unavoidable. I suppose I can see how as a newbie you might expect it to work more like a preview, but building a game so it's runnable involves complicated processing of the game's project files, and so those files have to be in the state the game needs. The alternative would be to create a copy of the whole game project every time you compile, which would be a bad idea.

Cassiebsg

If you just want to test stuff, you can just create a new room in your project and use that one as a test room. ;)
There are those who believe that life here began out there...

Matti

What Cassiebsg said. Using a different room is definitely less tedious than changing backgrounds, areas, objects etc.

Mandle

I also expected AGS to work in the way that The Swampling thought it would way back in the day...

Oh, so many cursing, so much swears, when it didn't!

The Swampling

Quote from: Snarky on Sat 08/09/2018 17:16:10
Well, the key part of CW's response is this bit:

Quote from: Crimson Wizard on Sat 08/09/2018 14:29:59
But it also DOES autosave the room when you run the game, it cannot do otherwise.

In order to run the game, it has to save it (and the rooms) first. That's just unavoidable. I suppose I can see how as a newbie you might expect it to work more like a preview, but building a game so it's runnable involves complicated processing of the game's project files, and so those files have to be in the state the game needs. The alternative would be to create a copy of the whole game project every time you compile, which would be a bad idea.

It just seems intuitive to the uninformed that saving should work the same way in AGS as it does in other software and would allow one to experiment to their heart's content, which is really the best way to learn. I do see how I shot myself in the foot previewing the game, but experience with various coding software, whereby one can preview the code without fear of it saving over your work, ill-prepared me for AGS with which I am unfamiliar.

I think it would be wise to at least inform the user of this, perhaps in a dialogue box when you click play or press F5, so that inexperienced users such as myself don't fall into the same trap in the future. Redoing all of that work is incredibly laborious. :sad:


Crimson Wizard

#8
It suddenly came to me that in theory it might be possible to save the opened room as a separate file into the preview (_Debug) folder instead of the game project, since engine supports reading rooms from outside the data package.
This way if you run the game with unsaved changes these changes will only be applied to a temporary room in _Debug, but not to the one in the project. And later you could close the room editor/AGS without saving it and reload one from project files.
Maybe even the whole game may be saved same way.



PS. Then again, the biggest problem of AGS is very limited UNDO command.

artium

QuotePS. Then again, the biggest problem of AGS is very limited UNDO command.
+1 Caused me some wasted work


A different approach to solve the original problem could be to make an automatic backup each time auto save saves the game/room.

SMF spam blocked by CleanTalk