简体   繁体   English

SpriteKit-组织保存的游戏数据的最佳方法是什么?

[英]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.

相关问题 在Spritekit(Swift)中实现“退出游戏”选项的最简单方法是什么? - what's the easiest way to implement a “game quit” option in Spritekit (Swift). 保护用户在本地保存的数据以及如何测试安全级别的最佳方法是什么? - What is the best way to secure user's data saved locally in app and how to test security level? 在iPhone上存储数据的最佳方法是什么? - What's the best way to store data on iPhone? 储存Trivia游戏数据的最佳方法? - Best way to store Trivia game data? 在iPhone上存储游戏数据的最佳方法? - Best way to store game data on iPhone? 从NSUserDefaults检索数据的最佳方法是什么? - What's the best way to retrieve data from NSUserDefaults? 限制核心数据存储大小的最佳方法是什么? - What's the best way to limit the size of a Core Data store? 在导航到ViewController之前为它加载数据的最佳方法是什么? - What's the best way to load data for a ViewController before navigating to it? 为iOS / Android应用存储敏感数据的最佳方法是什么? - What's the best way to store sensitive data for iOS/Android apps? 在发布应用程序之前将数据上传到 Firestore 的最佳方式是什么? - What's the best way to upload data into Firestore before publishing app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM