Aurora 4x

C# Aurora => C# Suggestions => Topic started by: slevir on December 23, 2020, 05:41:27 AM

Title: Periodical auto-saves
Post by: slevir on December 23, 2020, 05:41:27 AM
Losing several hours worth of gameplay for some random reason like a blackout or a game/windows freeze/crash/etc is painful, especially in Aurora, so it seems to be a good idea to me to have some sort of auto-save.  I hear from more experienced players that in some previous versions Aurora saved every action to DB, which slowed the game down quite considerably, so instead I propose periodical saves like this:

- on loading the game, initialize last save time with current time
- after processing one turn, check how much real time has passed since last save
- if this time is larger than X seconds/minutes/whatever (possibly a setting?), save the game and reset last save time to the current time

This won't be exactly "each X minutes/whatever", but it's close enough, and more importantly doing it like this won't introduce sluggishness (due to saving) at random points of time, which can be annoying if the player tries to do something useful.
Title: Re: Periodical auto-saves
Post by: Zap0 on December 23, 2020, 07:13:08 AM
Some kind of autosave or reminder would definitely be appreciated, yeah. I'd prefer it to be a reminder - saving my DB takes already the better part of a minute, so I don't want some of my 30s increments to be stretched even longer if I can't help it.
Title: Re: Periodical auto-saves
Post by: Kylemmie on December 23, 2020, 09:36:15 AM
While the AuroraoMod  has an excellent function that includes autosave and/or a reminder to save, I'm not sure it will be supported beyond 1.12