[英]SpriteKit - What's the best way to organize saved game data?
I want to organize my game files in the best way possible. 我想以最好的方式组织我的游戏文件。 Right now i'm organizing my data in three folders: /Document/Save/Stages , /Document/Save/Entites , /Document/Save/GameData.
现在,我将数据整理到三个文件夹中:/ Document / Save / Stages,/ Document / Save / Entites,/ Document / Save / GameData。 I'm using NSCoding and FileManager to store all data in these folders.
我正在使用NSCoding和FileManager将所有数据存储在这些文件夹中。 For performance, what's the best way to organize the saved files: Multiple folders, witch one with they own data or one single folder with all data?
为了提高性能,最好的组织存储文件的方法是:多个文件夹,一个拥有自己的数据,一个拥有所有数据的单个文件夹?
Thx. 谢谢。
OBS: My english is't very good. OBS:我的英语不是很好。 Sorry for any mistakes
对不起,有任何错误
Not really a question with a set answer. 答案不是确定的问题。 My preferred way is to have 1 singleton game data class with NSCoding to handle all the saving.
我的首选方法是使用NSCoding拥有1个单例游戏数据类来处理所有保存。 Depends how much data you have and what needs to be saved.
取决于您拥有多少数据以及需要保存什么数据。 I dont think performance should be that different, its properly more of a choice of how you like to organise it.
我不认为性能应该有什么不同,它应该更多地是您喜欢如何组织的选择。
If you like multiple folders than go for it. 如果您喜欢多个文件夹而不是它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.