Hi,
Is there a way to determine the progress that has been made in a game through the save file itself?
I'm working on an iOS game and need to use cloud saves along with game progress synchronization. It compares save files in the cloud and on device and tries to determine which save file has the most progress and will use the one where the player is furthest along in the game. I can't use the date of the file since someone could play offline and create a save at the beginning of the game. Any suggestions would be much appreciated!
Thanks
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
A bit tricky. Off the top of my head, you have a couple of options, but both would require custom scripting and essentially involve checking each save file in turn to compare.
If you are setting custom save labels, you could set the progress within the label itself. Custom save labels can be set through script, or by using the Save: Save or load Action. To get a save file's label, call:
AC.SaveSystem.GetSaveSlotLabel (0, X, true);
Where "X" is the ID number of the save slot. You'd have to iterate through each available to get all labels.
This may be problematic when using cloud saves, however, because these labels are actually stored in the PlayerPrefs, as part of the user's profile data. It may be that these could become de-coupled during the cloud save process.
See the SaveSystem script's DoImportCheck function for this example, which takes a file's raw data, deserializes it, and checks the value of a given variable.