- Home /
PlayerPrefs v. XML File for Saving Data?
Hello all,
I searched all around Google and YouTube and I could not find a definite answer to my question.
Should I use PlayerPrefs or XML files to save the all the data that is in Version 1 of my game? Or is their any other format of saving that you prefer?
My game does not have much data that will be saved onto it, but it is not very minimal either. The things that I will save in my game are: Options Menu (Sound FX on or off, game music on or off, and the 10 second Story Animation on or off), Scores for the distance you go in my game (around 10 scores, kinda like a billboard), and a very simple store where you can unlock two more characters after you have achieved a certain distance in the game. Their is not much right now but I am going to be releasing updates in my game and it will continue to grow and expand, so I would like the savings option that can be expanded upon the best. I tried my best to explain my unique scenario, if you need more information just let me know and I will add it. Thank you! :)
Answer by FortisVenaliter · May 13, 2016 at 07:37 PM
Definitely sounds like an external save system would be overkill for you. Generally, the rule is to use existing tools until they no longer work for you and you have to write your own. So, write it with PlayerPrefs, and if you find that you need to store something PlayerPrefs can't handle, then you write your own. Ideally, you want to make this an informed decision beforehand, but that comes with experience, and trying things out is how you get experience.
Okay. Thank you for your input! Would you $$anonymous$$d answering this also... Isn't it more safe and secure against cheaters to use an external save system as oppose to using PlayerPrefs?
No, it's safer and more secure to use a remote server to save them... but also prohibitively more expensive to develop. Anything on the local machine can be hacked easily for those who are persistent. X$$anonymous$$L is particularly easy to modify.
Honestly, the best advice I can give is this: If cheating doesn't break the game for other players, allow it. They already paid for your game, so who does it hurt if they want to cheat their way through it and rob themselves of the experience? Some gamers get their fun out of breaking games.
Obviously, all that goes out the window if your game has an online component.
$$anonymous$$y game is a simple mobile game that will be free and then you pay .99 cents (or 1.99 dollars, haven't decided just yet) to get rid of the ads after every time you get a game over. They do not have to pay anything to be able to play my game. That is my other dilemma, should I even try to make the security better since they will be able to download my game for free?