Game development for iPhone, saving state with files or sqlite?

For developing games for iphone. How do most people keep their condition? Using sqlite? or some kind of file.

A game is an RPG game.

+5
source share
3 answers

If you need to often search / sort your game data, or you usually only load one subset of the data, then you should consider SQLite.

If you just need to save the object graph to disk and reload it all at startup, use NSCoder to archive game objects to a file (it is stored as a binary disk by default).

, , XML JSON.

+3

, . . , ( NSKeyedArchiver - ). , ( ), SQLite .

, CoreData.

+2

RPG , , , SQLite ( OS 2.x) Core Data ( OS 3.x). , . , RPG , , , , .

Core Data , , SQLite, , iPhone OS 3.x. 2.x, SQLite - .

In my experience, both Core Data and SQLite were much faster than simple files for all but the simplest cases requiring data storage.

+1
source

All Articles