- Home /
The best way to save character progress used by 2 games?
Let's say I split my game into 2 parts, first part gets released and after for example few months second part gets released. The problem is when I start playing second part I want to use character (with all the progress) from the first part, so I need to save the data somewhere permanently where it's not removed even when game files are removed (cause why would you keep them if you beat the game). What's the best way to do it?
Save it on a specific location inside User/local/CompanyName/... (up to you), use the same path to retrieve them, persistent data path could be used, unique between builds but if i am not mistaken games with same company name share the parent folder so you may navigate in there to locate said data.
Any serialization can be used (text/ bit/ X$$anonymous$$L/ Json/ any database etc), except Unity's serializer.
The data will be safe as long they are not located insise game data folder.
Anyway because save data are saved localy you can/ should not ensure that won't be deleted by the User. But you should give a warning to prevent such action, no more and under no circumstance take more measures to prevent it. And if you provide an Unistaller give the option for complete clean up or to keep save data, with appropriate warning of course.
As proposed remote host is the safest, but an overkill in my opinion.
Also an overkill would be, to create a base for the game and hook each part as a "patch" (DLC?!) to it, that way all parts share data, nonetheless thats "quite" hard.
PS: personaly I hate applications that dump all over the disc and not provide the means for proper clean up.
Answer by hectorux · Nov 15, 2018 at 02:31 PM
You might use an encoded XML file, this can be moved, bur the lpayer wont be able to change anything. Also if you save it with other things it will be more difficoult for the player to know what holds the data
You don't even need it to be an X$$anonymous$$L file. It can just be plain text that you only know how it is written/read so there would be no problem with anyone trying to modify it.
Yes, but in X$$anonymous$$L you can save a serializable class
Answer by s_awali · Nov 15, 2018 at 09:13 AM
As you said, it has to be saved somewhere, but not on the player computer (since he can modify it/remove it). Your only option is to create a server and sync user data directly to it. Prehaps a much simple way would be to use a FTP.
Yeah, I was worried that I'll have to get into some networking to do that, which seems like a very big step forward from just making simple singleplayer game :[. I'm gonna check it out anyways, thx.
Your answer
Follow this Question
Related Questions
How do I save a List in my project? 0 Answers
PlayerPrefs not saving in build 1 Answer
Playerpref is not saving 1 Answer
Best Saving Practices using Firebase 0 Answers
How to save some integers and bools when a scene is switched. 0 Answers