0 votes
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)?" 
Godot version 3.2.3
in Engine by (307 points)

Do you want to save some data to a file that was executed during the game?

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).

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...

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!

I'll wait for the results)

1 Answer

+1 vote
Best answer

Well, basically you want a server, something the client can "look up to" and ask "do you have any updates for me on other players?"...
basically a server to hold all the data, since if 2 players aren't connected(to the internet) at the same time you cannot really enforce the data to pass between them

by (1,181 points)
selected by

I just wrote about this in the comments above...

Thank you for the reply! Since I am new to the process, another question arises: Can player's device be the server for other devices? If not, are there free 24/7 server services out there since all I have to save is literally one single data. Any reference to how it can be accomplished is much appreciated!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.