开发者

iPhone save game state

I'm implementing a save game feature to my game, so I'm looking for the best way to store the saved game.

Since I'm using C++ everywhere it's possible, I can't use NSKeyedArchiver to store the state of the game. I am thinking开发者_如何学Python in saving the state manually in a file, so I have a questions about that:

In which subfolder of apphome should I save that file? Looking into the iOS Programming Guide I didn't found a folder that perfeclty fit that need. Should I create a custom subfolder in Library or am I missing something?

Thanks in advance


Write the file into the Documents directory (NSDocumentDirectory). Thats the path to save your stuff, you can alter its content in any way by eg. adding subfolders for your save games or whatever. DON'T save it inside the library folder!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜