I am working on a project involving civilization-style gameplay, and need to save country info to a file or many files
I have seen many tutorials where 3 or 4 variables are saved to and read from a file, however, I want to save like 10 variables for each country, and having many, many countries. I thought of saving the set of variables for one country as a string, and each line in the file being such a string which could be deconstructed into all the variables.
I am having a very hard time figuring out how to get the information off one single line in the file, does anyone have any suggestions? It seems pointless to load the entire file into memory.
Would it be better to save every country as a separate file?