I've recently started to play with the idea of coding for more than just a passing hobby and one of the first problems that I ran into was what to do with save files. I understand how to write information to disk, but where I get lost is on how that information is typically organized and identified for retrieval later. Is every line given some sort of a tag so it can be searched and assigned to a variable when it's read after the program starts up? Does the program just read everything on line 1 and assign that to some variable?

I guess what I'm looking for here, is if there are any standardized ways to handle reading and writing from disk in an organized and efficient way. I did search the forums but most of what I was able to find was dealing with specific problems. I am looking for more general knowledge. If someone could point me to a link or give me an idea what to search I would be grateful.

Also, in case it helps, the file I am playing with would have to store a very large amount of different variables from many different objects. (Many thousands of objects)

Thanks for any help you can give.