[data file] in Gaming programing what data file to use

[data file] in Gaming programing what data file to use
0.0 0


What kind of data file do games use?

Excel, ORACLE, txt…

I want to hear YOUR opinion and experience.
Because I’m not used to data files, I’ll be using txt whether it’s standard or not for now. I want to know what data file is the standard one.

You know, I saw txt files in crysis for recording stuff.

and is there any reference or hint about using data file?

//Just curious
Also, what about risk of being hacked? Is txt file easier to be hacked?



I think there are many solutions depending on what you mean with “data file”.

For example, if I need to store user preferences for sound and difficulty in my games, I usually go with NSUserDefault with iOS games which is native and reccomended, and cocos supports this as well :slight_smile:

This is howerver restricted and limited if you need complex data structures. For these, I’d go with a .xml or .plist or .json file. I don’t know many differences between these, except that maybe .json are smaller and more used w.r.t plist.

Regarding the “hacking” issue, unless you encrypt your files, I think there is no difference in which format you use: every file is equally easy to hack, since they are ‘just’ plain text files, no matter what.

Hope this helps :slight_smile:


I always use default reference or plist if some data need used in IOS.
and, to avoid cracked, write checksum which generated with MD5 key in data file is better.