- Home /
How to save progress in the game?
I'm thinking of making an RTS game. As you build things and make armies, I need a way to save it so that if you quit the game then come back, the progress will be saved. I know haw to use PlayerPrefs but I can't use it to save big things like everything in a scene. Is there any way to save everything in a scene so your progress could be saved?
Answer by Gilead7 · Oct 10, 2016 at 10:51 PM
You have a few options:
Database like sqlite would do a nice job, but it's hard to find tutorials.
JSON is great but it is human readable, so anyone that finds the file can open it, read it and change it. Not good if you don't want the player to change their armies from 100 to 900000000000000. Some might say XML, but the files are much larger than JSON. Boomlagoon is a good library.
Binary Files give you the security you want and there are tons of tutorials out there on how to do it. You make your own functions so you can code it the way you want and name it whatever you want with whatever extension you want.
Only use player prefs for small things like volume setting, difficulty, things like that. You can use whatever way you want, but I would recommend the binary saves.
Your answer
Follow this Question
Related Questions
Saving for a Level Editor 1 Answer
Updating main menu using PlayerPrefs when collecting an object in different scene (level) 1 Answer
PlayerPrefs performing function even when it doesn't have that key 2 Answers
Checkpoint with PlayerPrefs 0 Answers
How to save gameobject values with respect to scene? 1 Answer