Saving login credentials and some data to server?

Hi all,

Unity newbie here!

So I am making a simple lightweight 2D mobile game where the player mainly play offline. Now I want to add a new feature so that once the player enters the game for the first time, I will assigne a unique ID to them. By providing the ID on another device, the player can retrieve the data saved on the old device.

My question is: do I need a server for that?
(I will likely have a “backup” button ingame, and once that’s clicked, I send the user’s .bin file, the savedata, to the server through http)

If so, can I use my own website as a server? If not, what are the other options?

I have my own personal blog setted up using wordpress, I tried putting some picutres in the root folder and I can request them in game. I am also thinking about creating some assetbundles and put them there for the user to download for the first time.

If website method works, ideally I want to build another website for this. I have some experience building a simple website using .Net core’s razor pages, with MongoDb if it’s needed(or i can just save stuff in server’s file system).

I don’t know if the above methods I metioned would work, can anyone share some ideas?

Thank you!

You need a backend for this.

I’m not familiar with Wordpress, but I think it uses MySQL and if you are coding the back-end of your wordpress site, you should be able to save And retrieve your data in the database with post/get requests.

Yes, you can also use MongoDB for this, I’m using MongoDB right now with Node and Express and things are working fine at the moment.

It seems that you just need a simple setup. With MongoDB, You could setup a User schema with the fields you need and a simple login on your backend. I’m using express-passport for user sessions which is great.

Another viable option for you is to use the firebase sdk and take advantage of their user Authentication and also their Firestore NoSQL database.

Hope something in their helps