FreeOrion

Forums for the FreeOrion project
It is currently Wed Dec 13, 2017 1:47 am

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Aug 14, 2017 7:54 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 204
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.


Top
 Profile  
 
PostPosted: Tue Aug 15, 2017 1:45 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
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


Top
 Profile  
 
PostPosted: Wed Aug 16, 2017 3:50 pm 
Offline
Space Squid
User avatar

Joined: Wed May 29, 2013 6:48 pm
Posts: 67
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?


Top
 Profile  
 
PostPosted: Wed Aug 16, 2017 4:01 pm 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
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


Top
 Profile  
 
PostPosted: Wed Aug 16, 2017 5:37 pm 
Offline
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 224
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


Top
 Profile  
 
PostPosted: Wed Aug 16, 2017 8:47 pm 
Offline
Space Squid
User avatar

Joined: Wed May 29, 2013 6:48 pm
Posts: 67
Thank you Morlic, that was exactly my thoughts.


Top
 Profile  
 
PostPosted: Thu Aug 17, 2017 1:55 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4390
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


Top
 Profile  
 
PostPosted: Thu Aug 24, 2017 2:47 pm 
Offline
Programmer

Joined: Mon Feb 29, 2016 8:37 pm
Posts: 204
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group