Page 1 of 1

[Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Posted: Fri Oct 13, 2017 8:54 am
by vyktor
Playing on current steam version.

I was farming green circuits for Mass production 3, in-game achievement tracker was displaying 11M/20M.

I:
  • saved the game
  • Alt-Tab to browser windows
  • realized it's late and with the game still running hit Windows->Power->Shut down
Today Achievemnt tracker show 7.8M as yesterday again.

Re: [0.15.34] Achievement progress doesn't survive hard shutdown

Posted: Fri Oct 13, 2017 9:23 am
by Rseding91
Thanks for the report. Achievement progress is saved on game exit and if it didn't exit normally (because it was killed as a result of you telling the computer to shut down) then that would cause what you experienced.

I'll see about the feasibility of saving progress on exiting a given save and going back to the main menu.

We don't do live write to disk because that has it's own troubles and slowdowns.

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Posted: Fri Oct 13, 2017 12:48 pm
by vyktor
Thanks for the reply!

Optimization is a way of life ;)

Since this is the only achievement that is "accumulative progress heavy" I'd suggest saving progress every 500k (this would trigger only 40 disk writes all together) and on a game exit.

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Posted: Fri Oct 13, 2017 8:59 pm
by Jap2.0
vyktor wrote:Thanks for the reply!

Optimization is a way of life ;)

Since this is the only achievement that is "accumulative progress heavy" I'd suggest saving progress every 500k (this would trigger only 40 disk writes all together) and on a game exit.
I'd suggest saving at every save (and maybe the game exit, if you feel like it or don't want to remove the code), which would make it save when you saved you game, even if you didn't exit, and on autosaves (any more than that is overkill because your save would be lost anyway, and it could cause problems, and saving it when the game saved would save it when you saved and quit the game, even if you exit - and even if you just used autosaves, which some people do).

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Posted: Sat Oct 14, 2017 7:25 pm
by Rseding91
I changed it so in 0.16 it will save the achievement progress every time a map is saved.

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Posted: Tue Nov 14, 2017 8:27 pm
by Geminus
Sorry for posting in this old thread, I got here because I had the same problem (viewtopic.php?f=47&t=53994). It seems that the more obvious fix is not persisting the achievement state more often, but bringing the achievement counter in line with the ingame counter (which still correctly displays the number of chips produced in this game, see my post for screenshots). It seems weird that those two counters that obviously track the same thing can get out of sync.

Re: [Rseding91] [0.15.34] Achievement progress doesn't survive hard shutdown

Posted: Tue Nov 14, 2017 8:31 pm
by Rseding91
Geminus wrote:Sorry for posting in this old thread, I got here because I had the same problem (viewtopic.php?f=47&t=53994). It seems that the more obvious fix is not persisting the achievement state more often, but bringing the achievement counter in line with the ingame counter (which still correctly displays the number of chips produced in this game, see my post for screenshots). It seems weird that those two counters that obviously track the same thing can get out of sync.
Some achievements are not per-game but global between all of the games you play.