Game Saves

Started by
0 comments, last by SimonForsman 11 years, 9 months ago
I know I can use FILE *save; and then take it from there, but is this the most effective way to make a game save in the C programming language? If the game is installed in Windows' "Program Files" directory, it will not alert the user that an administrative password is needed in order to change the contents of that folder? Would Windows somehow automatically redirect these actions to the "Documents and Settings" directory for both reading and writing a file?
Advertisement

I know I can use FILE *save; and then take it from there, but is this the most effective way to make a game save in the C programming language? If the game is installed in Windows' "Program Files" directory, it will not alert the user that an administrative password is needed in order to change the contents of that folder? Would Windows somehow automatically redirect these actions to the "Documents and Settings" directory for both reading and writing a file?


You can and should use the OS API to get the appropiate location for user / application data. (on *nix you can just write to ~/.appname/yourfileshere but for Windows you need to use the OS API to get the appropriate location as it varies depending on what version of the OS the user has (and for atleast some versions it also varies between languages). (The same goes for your installer, never assume that applications are or should be installed in C:\Program Files, non english versions of windows tend to have other names for that folder)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

This topic is closed to new replies.

Advertisement