Jump to content

  • Log In with Google      Sign In   
  • Create Account

Game Saves


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Tolito   Members   -  Reputation: 256

Like
0Likes
Like

Posted 10 July 2012 - 07:44 PM

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?

Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6305

Like
2Likes
Like

Posted 10 July 2012 - 08:00 PM

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)
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!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS