Quote: "What I do for options is check to see if the option file exists already.
If it does exist, load it up.
If it does not, create one with default values and leave it up to the player to change them. You can safely assume that players will usually use the 'options' menu/button to set the game the way they want."
This is exactly what I do as well - with a slight twist. Within my init code, I search to see whether or not my "userpref.txt" file exists. If it does, I load the values. If it doesn't, I set all variables to their default values.
I don't save the "userpref.txt" file unless the user goes into the options screen and exits out. If the user doesn't change any default value - no need to save them then, because they're the same whenever the application starts up
EDIT The same thing here applies to high-score tables and the such. Don't ever assume that there will be a file there to load from (users might delete it, etc.) so ALWAYS create it from scratch programatically, and save it whenever you update or change any values.
This way, whenever someone starts the app, the default mode it goes into is "fresh install, clean state". Whenever they make a change to options, or complete a level, save it immediately after updating the values.
Hi there. My name is Dug. I have just met you, and I love you.