- Home /
Saving GridBased map Best Practices
Hi. I have some solutions in mind and have one implemented, however I would like to know what is the best approach to take.
I have cube oriented game like minecraft. Every cube have few important variables (like prefab of its graphics to place into game). This is all saved in 3 dimensional array.
System I have now is using C# Serialize to make Binary stream then I use Zip Algorithm to make binary smaller. then I save the file onto disk. I am not saving prefabs and I have to add them in deserialization process
My questions are:
is this good approach?
Is it good idea to have save file open during the game and write into it constantly? (lets say 3-50 write instructions per second)
Should I keep my data in 3D array or use some better container?
Can you rephrase question 2? I don't understand what you mean.
Also, on question 1, you should define what "good" is. =) If with good you mean "easy to handle" the answer might be yes. If with good you mean "fast" it might be possible to do some optimization.
Please tell me you are using voxels for your "cube world". Not just a whole lot of default cubes?
Of course I am not using Voxels.. and I can smell smelly code that's why am I rewriting it and posting this thread ;) Not 100% sure I need it for my map size but at least I have something to read to decide.
Your answer

Follow this Question
Related Questions
Serialize game objects in Unity~ 1 Answer
Application.persistentDataPath confusion (Android) 1 Answer
Let Game-Building finish over time / Gold increment over time 0 Answers
How to serialize and save for Win8? 3 Answers
Does anyone know why continuously saving to playerprefs would cause a performance drop ? 0 Answers