by 0mnicydle » Sun Dec 18, 2022 4:26 pm
EDIT/ After thinking about this some more I think I finally absorbed all your points, thank you for your patience.
Still curious as to how other games manage it. To be fair whatever the solution is is definitely the road less taken and most games do stutter while saving. Maybe it requires structuring things with this goal in mind from the outset... It's not really something I've seen all that often, it's just something I really notice when it's happening because I'm so used to games stuttering on save.
EDIT/ I probably shouldn't keep thinking about this since I don't know enough, but it's really got its hooks in me so here's my final crack at it: You have duplicate sets like I was saying, freeze the second set to serialize and everything else you have to do, and while this is happening for every tick that goes by somewhere else you keep track of the addresses that changed in the first set, and then when the save process is complete you freeze the first set (halt the game) only long enough to write the newest info into the second set. Given the time of the overall save process, and the amount of data that can change per tick, could the amount of data that would need to be updated in the second set represent a significant enough copy time to delay a frame, given the frame times needed to satisfy the typical display rate? Is it wishful thinking on my part to imagine this would be significantly faster than the actual save routine itself?
EDIT/ After thinking about this some more I think I finally absorbed all your points, thank you for your patience.
Still curious as to how other games manage it. To be fair whatever the solution is is definitely the road less taken and most games do stutter while saving. Maybe it requires structuring things with this goal in mind from the outset... It's not really something I've seen all that often, it's just something I really notice when it's happening because I'm so used to games stuttering on save.
EDIT/ I probably shouldn't keep thinking about this since I don't know enough, but it's really got its hooks in me so here's my final crack at it: You have duplicate sets like I was saying, freeze the second set to serialize and everything else you have to do, and while this is happening for every tick that goes by somewhere else you keep track of the addresses that changed in the first set, and then when the save process is complete you freeze the first set (halt the game) only long enough to write the newest info into the second set. Given the time of the overall save process, and the amount of data that can change per tick, could the amount of data that would need to be updated in the second set represent a significant enough copy time to delay a frame, given the frame times needed to satisfy the typical display rate? Is it wishful thinking on my part to imagine this would be significantly faster than the actual save routine itself?