Which is more suitable (UserDefaults vs plist) for saving data for RPG games?

I am making a RPG game, in which the user can create up to 3 characters.

The game would have to save a character’s

  • Max HP : int
  • Max MP : int
  • Current HP : int
  • Current MP : int
  • Current money it earned : int
  • Items it collected : string
  • Records of quests completed : string

etc.

about 40~50 data per character.

I am currently creating and writing to a plist for each character for storing data.

Is plist safe to store important data? (should not be erased by iOS or Android OS)

Or should I just use UserDefaults for this?

Or implement SQL?

What kind of method would you recommend? UserDefaults / .plist / SQL?

For this, I would use SQLite. Easy and fast. Just what I do.

2 Likes

I totally agree, use SQLite which is not difficult to use. I use with wxsqlite3 for encryption so players couldn’t change the values.

3 Likes