Add a "--continue" startup option and a "Continue" button

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Message
Author
LGM-Doyle
Programmer
Posts: 219
Joined: Mon Feb 29, 2016 8:37 pm

Re: Add a "--continue" startup option and a "Continue" butto

#16 Post by LGM-Doyle »

I was working on and have completed the following changes to the PR:
  • the continue functionality uses the newest save of either autosave or player save variety
  • the Continue and Load buttons on the Intro Menu are always present if there is an available save. (And absent if there are no saves to be loaded)
I did not intend to be dismissive of the incremental save.

Ideally no player actions would be lost in any crash. Timed saves could be the next step in saving every player action.

However, the current save approach causes small delays for saving (particularly for people using non solid state drives). The delay is distracting. With the autosaves it appears to be part of the turn processing. With timed saves, it will appear to be a random hiccup.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Add a "--continue" startup option and a "Continue" butto

#17 Post by Dilvish »

LGM-Doyle wrote:Ideally no player actions would be lost in any crash. Timed saves could be the next step in saving every player action.
However, the current save approach causes small delays for saving (particularly for people using non solid state drives). The delay is distracting. With the autosaves it appears to be part of the turn processing. With timed saves, it will appear to be a random hiccup.
Good point on the hiccup/distraction issue. Thinking about that a bit, I have an idea on how to possibly minimize that delay: A lot (or even most) of he savegame delay seems to stem from the AI-- clicking the save game button causes the server to query the AIs for their save-state-string, but the AIs have to finish determining their turn orders before they can process that request to prepare their savestate string. I don't think that's absolutely necessary though-- anytime you load a savegame the AI repeats all of its regular turn analysis and order determination based on the universe at that point.

So, when the save button is clicked, if the AI has already submitted its orders for that turn then it could be queried for its savestate and that would be bundled with its orders for that turn to be saved in the save file, but otherwise, if the AI had not submitted its orders for the turn yet, then we could simply reuse the save-state-string kept from the previous turn and use that with an empty order bundle in the save file. (That is premised on having an AI savestate string from the previous turn, which would currently be the case if autosave for every turn is enabled, but would otherwise not always be the case, so we could explore whether it would add appreciable delay for the AI to just always submit a new savestate string along with its orders for the turn.) That would allow a manual save, or a time-triggered save, to proceed smoothly without having to wait on AIs (it seems to me). (And we might even be able to expand on that to record all human player orders as we go).
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
biza
Space Squid
Posts: 67
Joined: Wed May 29, 2013 6:48 pm

Re: Add a "--continue" startup option and a "Continue" butto

#18 Post by biza »

Dilvish wrote:(And we might even be able to expand on that to record all human player orders as we go).
Then undo/redo could be implemented as well?

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Add a "--continue" startup option and a "Continue" butto

#19 Post by Dilvish »

biza wrote:
Dilvish wrote:(And we might even be able to expand on that to record all human player orders as we go).
Then undo/redo could be implemented as well?
I don't think I'm following you. Seems to me that we can already undo all orders except for deletion from production queue, and I don't know what kind of 'redo' you'd be looking for.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Morlic
AI Contributor
Posts: 296
Joined: Tue Feb 17, 2015 11:54 am

Re: Add a "--continue" startup option and a "Continue" butto

#20 Post by Morlic »

A player wants to move fleet A to system Alpha but mistakenly had fleet B selected which was on its way to system Beta.
The easiest way for him to correct this mistake is to press an undo button especially if he forgot what the previous order for fleet B was (e.g. fleet B is one of many colonization ships sent to a lot of different systems).
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
biza
Space Squid
Posts: 67
Joined: Wed May 29, 2013 6:48 pm

Re: Add a "--continue" startup option and a "Continue" butto

#21 Post by biza »

Thank you Morlic, that was exactly my thoughts.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Add a "--continue" startup option and a "Continue" butto

#22 Post by Dilvish »

biza wrote:Thank you Morlic, that was exactly my thoughts.
I think this 'Undo' discussion has diverged enough from the original topic that it deserves its own thread, so I made one.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

LGM-Doyle
Programmer
Posts: 219
Joined: Mon Feb 29, 2016 8:37 pm

Re: Add a "--continue" startup option and a "Continue" butto

#23 Post by LGM-Doyle »

Dilvish wrote:(And we might even be able to expand on that to record all human player orders as we go).
This would be facilitated by a non-monolithic save file format. Currently, to add a single order to a save file would require writing a whole save file.

Post Reply