Skip to the bottom for a TL;DR
This is a pretty broad question but I’m hoping someone can give some insight on this topic. Most mainstream games have the feature of storing your game progress in the cloud so that you can pick up where you left off on other devices. On the surface this sounds pretty easy to implement but I’d like to do it the smart way. I also don’t want to rely on platform specific tools like iCloud or whatever the Android equivalent is.
My naive approach was to send the entire json file to and from the server when it’s time to sync. But if you consider a game like Candy Crush, which has hundreds of levels, if I send the entire file just to update one score then I’m wasting a lot of bandwidth.
My next idea was to duplicate any changes in a separate file that is specifically made for syncing. If the user is playing offline then any new progress will be saved there, and once the user connects only the data in that file will be sent to the server. Afterwards, the file will be cleared to indicate there is nothing new to send. But then, if I pick up my tablet and want to continue the game, how will the server know to only send the newly updated information? And what if the user has more than two devices? How would I make sure that all devices get properly updated?
I guess the main question is: What is the best way to store user progress on my server so that I can easily and cheaply sync that progress across multiple devices (regardless of device platform)?
Does anyone out there have experience with this stuff?