简体   繁体   中英

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. I'm using NSCoding and FileManager to store all data in these folders. 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. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM