Smarter autosaving (ie: Not in combat)

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
chainedlupine
Inserter
Inserter
Posts: 48
Joined: Mon May 19, 2014 4:35 am
Contact:

Smarter autosaving (ie: Not in combat)

Post by chainedlupine »

One thing that is somewhat annoying about Factorio is the autosave functionality and how it triggers like clockwork every X minutes. (Default is two, I believe.)

There is a definite pause as the game writes to disk, particularly on larger factories/levels. I actually don't mind this for the most part, but there is a point where it becomes a real problem and that is during combat.

First of all, it's annoying the game is trying to save at that moment. There's nothing like being chased by 50 large biters and have run out of ammo and your Mk2 shields and batteries are flatlined -- And then the game pauses as it autosaves, breaking my concentration, where kiting left and right is important and only a half-dozen pixels separate me from life and death.

Secondly, I don't want the game to be trying to save at that moment, anyway. I've had the game save just 0.3 seconds before I was about to die in a completely unavoidable situation (ie: being chased by homing worm shots), and that's pointless.

What I propose is the autosave system is changed slightly. Something like where if the player has taken damage (to either shield or health), then reset the autosave counter. That way, if the player is in a combat situation, then the game will be less likely to try saving at a point that will either be disruptive or useless.

You could do more elaborate analysis of the situation the player is in, and try to determine when he's "in-combat" versus "out-of-combat" (perhaps look at how close the player is to any enemy entities and whether the player or any nearby entities have taken damage within X time), but I think just resetting the autosave counter on player damage would be enough to stop the most annoying two issues I mentioned above.

FishSandwich
Smart Inserter
Smart Inserter
Posts: 1847
Joined: Sun Feb 23, 2014 3:37 pm
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by FishSandwich »

OR, you could turn autosave off and just save manually before going into battles. Works wonders for me.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by ssilk »

With multiplayer this would be an hard issue, which forbids playing, so it can be assumed, that this will be fixed with introducing true multiplayer.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

H_Sage
Inserter
Inserter
Posts: 38
Joined: Wed Sep 21, 2016 3:58 pm
Contact:

Autosave in battle

Post by H_Sage »

Please do another autosave system.
Autosave very annoying during the battle. Really need the type of test, like - "get damaged / damage caused during 10 seconds" and let autosave once again make this test as long as the character is safe.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Autosave in battle

Post by orzelek »

Yeah it's very annoying especially if you are doing some kind of drivebys with car or tank. You want to turn and autosave pops up and.. yeah :D

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Autosave in battle

Post by ssilk »

Added to viewtopic.php?f=80&t=21367 Game Save File ans -Speed Related Suggestions
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Jürgen Erhard
Filter Inserter
Filter Inserter
Posts: 298
Joined: Sun Jun 12, 2016 11:29 pm
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by Jürgen Erhard »

To add to what the OP said (and I totally agree): it would probably be easiest if there was a simple option "Don't auto-save while moving". Would fix the "I'm kiting biters, don't break my flow!" too.

Yes, I AM THE NECROMANCER (Necromancer was my favority class in Diablo II :D)

Xeanoa
Fast Inserter
Fast Inserter
Posts: 190
Joined: Tue Apr 26, 2016 4:32 pm
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by Xeanoa »

I would like to hear some technical explanation why the game needs to pause anyway. Just save in the background, maybe make use of the multiplayer catchingup feature if you have to?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by Rseding91 »

Xeanoa wrote:I would like to hear some technical explanation why the game needs to pause anyway. Just save in the background, maybe make use of the multiplayer catchingup feature if you have to?
Because the simulation has to be stopped to copy out the data to be put in the save. If it wasn't then the map would corrupt every time it got half way through saving and something changed with the other half.

Just like how MP has to pause to save the map before someone can download it.
If you want to get ahold of me I'm almost always on Discord.

deepdriller
Fast Inserter
Fast Inserter
Posts: 184
Joined: Sat Apr 11, 2015 7:52 pm
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by deepdriller »

Is it possible to sort of dump the current state in an external saving module? SUre, that would probably spike the memory usage, but could get rid of the pause.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by Rseding91 »

deepdriller wrote:Is it possible to sort of dump the current state in an external saving module? SUre, that would probably spike the memory usage, but could get rid of the pause.
That's what saving is.
If you want to get ahold of me I'm almost always on Discord.

Piroko
Burner Inserter
Burner Inserter
Posts: 18
Joined: Wed Jan 06, 2016 7:06 pm
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by Piroko »

Rseding91 wrote:
Xeanoa wrote:I would like to hear some technical explanation why the game needs to pause anyway. Just save in the background, maybe make use of the multiplayer catchingup feature if you have to?
Because the simulation has to be stopped to copy out the data to be put in the save. If it wasn't then the map would corrupt every time it got half way through saving and something changed with the other half.

Just like how MP has to pause to save the map before someone can download it.
Wouldn't it be possible to do a copy of the game-state in local RAM and do the actual saving process from that copy in a background task while the game already continues?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by Rseding91 »

Piroko wrote:
Rseding91 wrote:
Xeanoa wrote:I would like to hear some technical explanation why the game needs to pause anyway. Just save in the background, maybe make use of the multiplayer catchingup feature if you have to?
Because the simulation has to be stopped to copy out the data to be put in the save. If it wasn't then the map would corrupt every time it got half way through saving and something changed with the other half.

Just like how MP has to pause to save the map before someone can download it.
Wouldn't it be possible to do a copy of the game-state in local RAM and do the actual saving process from that copy in a background task while the game already continues?
That's *what it is doing* when it saves.

It copies and saves at the same time using threads.
If you want to get ahold of me I'm almost always on Discord.

Piroko
Burner Inserter
Burner Inserter
Posts: 18
Joined: Wed Jan 06, 2016 7:06 pm
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by Piroko »

Alright, didn't think it would take that long to do a copy of the game-state within RAM but Factorio has grown quite a lot over the years as well.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Smarter autosaving (ie: Not in combat)

Post by ssilk »

Added to viewtopic.php?f=80&t=21367 Game Save File ans -Speed Related Suggestions
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

neoc
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Sun Apr 24, 2016 4:31 pm
Contact:

Re: Autosave in battle

Post by neoc »

Autosave in general should be postponed if the player is doing stuff at the moment, up to a configurable time span.

Not doing anything = not building, not shooting, not being attacked

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Autosave in battle

Post by ssilk »

Autosave in general should not disturb the game-play at all. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Xeanoa
Fast Inserter
Fast Inserter
Posts: 190
Joined: Tue Apr 26, 2016 4:32 pm
Contact:

Re: Autosave in battle

Post by Xeanoa »

ssilk wrote:Autosave in general should not disturb the game-play at all. :)
What really bugs me about the pause is, that the game ignores clicks that happens during the pause. Usually, that means having to interrupt and fix the missing clicks. An example would be if you place inserters, and you miss one because it decided to pause and ignore your command to place one.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Autosave in battle

Post by ssilk »

When there is no pause this needs not to be fixed. That is the target (see linked thread) and I'm 70% sure the devs want to fix this, but not when or if ever. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Ideas and Suggestions”