Timeline for Should I use text files for my save data?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 23, 2013 at 1:34 | comment | added | BrianH | I should note the biggest advantage for such flat-file database systems is actually for the developer - you can add fields and columns and thousands of rows and you don't necessarily have to rewrite any existing code and in some systems it doesn't even have to break older save files (but that usually requires some coding logic). It's really just a happy accident such resulting files don't load well into Notepad. | |
Jul 23, 2013 at 1:30 | comment | added | BrianH | It really only feels unprofessional to use text files because very few games store things as "save-data.txt" - but if you've ever spent time looking into most saved game files you'll find they are often nothing more than text files that sometimes have binary data added to them. Every Civilization and Total War series game, for instance, uses actual .txt files for a wide variety of game data. The most common 'upgrade' for this is a database system that ends up storing the data as a flat-file that - except for some binary blobs - is just a text file. | |
Jul 22, 2013 at 19:54 | comment | added | ClassicThunder | It is a sad world when developers want to be able to lock users out of information they store on thier computers. | |
Jul 22, 2013 at 13:31 | comment | added | anthonyvd | @Althezel It's a pleasure and good luck making your game! | |
Jul 22, 2013 at 13:30 | comment | added | Althezel | A sad world it is that that is the case. I'll check that out. Thanks a bunch! | |
Jul 22, 2013 at 13:21 | comment | added | anthonyvd | @Althezel As for the databases, think of it as a sort of engine to which you pass requests to read or write data. That engine is responsible for saving/reading it in an efficient manner, usually in relational form in tables. In your use case, I'd take a look at SQLite (sqlite.org). Basically you'd use a C++ library to connect to a local SQLite database (SQLite uses local files) and pass that library calls in SQL syntax to access your data. | |
Jul 22, 2013 at 13:19 | comment | added | anthonyvd | @Althezel The thing is, regardless of how you save your data, someone determined enough to modify it will be able to. In that sense, it's usually a waste of your precious development time to try and put protections in place :) | |
Jul 22, 2013 at 13:19 | vote | accept | Althezel | ||
Jul 22, 2013 at 13:18 | comment | added | Althezel | It's a single player game, and those were my thoughts exactly if they wanted to mess with the data. I don't know, something about text files just seemed unprofessional, and I figured if I could keep the user from screwing up, I probably should. Also, What do you mean when you say "Database"? I hear that thrown around a lot but I have no idea as to the exact definition or what kind of file that entails. | |
Jul 22, 2013 at 13:15 | history | edited | anthonyvd | CC BY-SA 3.0 |
added 35 characters in body
|
Jul 22, 2013 at 13:09 | history | answered | anthonyvd | CC BY-SA 3.0 |