- Home /
Best SAVE/LOAD system for my 4X Strategy hobby game?
Hello. I have made my hobby 4x Strategy game. I will be the only one playing it. I have to somehow save the game (e.g i spawned a new city or there is an army unit or some cities have unlocked the tech tree some havent etc.). JSON? XML? Binnary? PlayerPrefs? What should i use for my hobby game saving/loading system?
Answer by TenaciousDan · Aug 24, 2020 at 01:45 PM
PlayerPrefs should not be used for saving a game.
I created my own save system that I use in all my projects that require it. It saves game data to binary format. If you want to protect the save file further, you will have to encrypt the data before writing to the binary file and decrypt it back when loading it.
Here is a good tutorial to follow to start: tutorial
Hope that helps.
Cheers.
hey i was looking at that game dev video. my problem is i just cant wrap my head around the mechanics behind game saving i get all jittery and anxious and start breathing heavily. its so stressful i just wanted to make a hobby game. thank you for your answer. do you have any tips on how i can start to wrap my head around the topic?
I am a god walking amongst mere mortals. I have fully understood binary formatting and have successfuly saved my game data. I am unstopable. I am Binary.
Happy to hear! If the answer I provided is satisfactory, can you please accept it? Thanks!
Your answer
![](https://koobas.hobune.stream/wayback/20220613010416im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
how to save last position for the player before he die 2 Answers
What is the best way to save data on Android? 0 Answers
Saving and Loading Data with a for loop 2 Answers
SerializationException: Type UnityEngine.Vector3 is not marked as Serializable. 1 Answer
How can I continue the game without losing values after Game Over? 1 Answer