Saving a game across multiple devices, Android

My current project saves currency values, inventory values, position of objects in the scene (player can buy, sell, and move objects), and timestamp. I will also be adding land expansion so that will be another value to consider. These are saved to a structured scene variable. I have it set to autosave on key events, such as when the level editing menu is closed or the currency amount changes (which is quite frequent, so I can change that if it will make more economical sense in this question). Right now, the save event just triggers it to delete the previous save and save a new Json of the scene variable, but I can also set that up differently if it will be more economical to split things up and only save the thing that has actually changed instead of the whole scene variable.

Ok so if I wanted to make it so that a player can continue their game progress on a different device, what am I going to have to learn/do? I’m assuming that using the save game from Play Games Services is out (which is a pity because from what I read it seems that developers are not charged for that because it counts against the player’s Google drive quota). Would this be something firebase is capable of? And if so which one, Realtime Database or Firestore Database? I’ve been trying to look into it but I’m just not seeing if I would be able to tell if a user logs in on a new device, and the user already exists, to pull that user’s saved info. Also there is the question of a potentially massive number of writes for a small amount of info, so I don’t know if it’s economical. How should I approach this? And is there a way the user can just save this information themselves for a new device?

Would this be something firebase is capable of?
Yes absolutely

Realtime Database or Firestore Database?
Firestore Database

I’m just not seeing if I would be able to tell if a user logs in on a new device, and the user already exists, to pull that user’s saved info.
Of course :slight_smile:
In an android export(apk) the login via google account is not available, but if email+password are okay, it’s fine. A cloud save/load across all devices is possible.

potentially massive number of writes for a small amount of info, so I don’t know if it’s economical.
If you need to save a lot of things in real time every few seconds, it can be a problem. But for normal things it’s absolutely okay. With the json format you can also write many values in one field and only consumed one write.
You can also keep your local save mechanism and offer to the players a manual cloud save button. Then you don’t have an always online compulsion.

1 Like

Thank you very much for your help. I love your idea, it’s brilliant!

I suppose I’ll have to set up some logic to prevent needless spamming of the cloud save button. If you happen to have any ideas…

Is logging in via google account not available because it’s impossible, or not available because it would require effort and skill?

If the cloud save button is in a submenu and/or has a timer, it should be safe.

As far as I know it’s because of the technology how GD does native exports. So impossible at the moment, maybe someday.
For desktop/mobile browsers the Google login is available in GD.