Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Suleymanov |
If a < b:
b = a #done
_save_b_value() #successfully saved
#now, how to update var b in all devices that has this app installed (while played or closed)?"
Do you want to save some data to a file that was executed during the game?
VarionDrakon | 2020-12-28 12:27
Thank you for the reply! Yes, but not only to a local file (which I can already do), but I want to save the same data to the files in all of the respected devices that has this application.
When var b is updated in one device, I want b to be updated in all devices for the same app. Say, my score updated to 3, it should show 3 in your device too (either live or upon scene reload).
Suleymanov | 2020-12-28 12:36
Well, for this you need a server on which the “Save” for the game will be stored. You can make it so that when you start the game and when the Internet is connected on the device, initially there is a check of saves on the server(or other place where it can be stored), and when you find a newer version of the file, it downloads to the device (this is called synchronization). If you play some semi-online games on Android, you may notice that some games and apps (Such as What’sapp) save to the user’s GoogleDisk what they chose Themselves…
VarionDrakon | 2020-12-28 13:26
Thank you for the guide! It’s a good base to start from. I’ll research servers and how to exchange data with them. Any further guide from you on where exactly I can find practical information about servers is much appreciated!
Suleymanov | 2020-12-28 13:42
I’ll wait for the results)
VarionDrakon | 2020-12-28 13:55