It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
begolf00: Hi wpegg I like your post, it gave me some insight into why developers do what they do. I think I can understand where your coming from. The customers you deal with, will always be the majority over someone like me and as such your decisions make sense. I don't know if I agree with you on some points that would apply to someone like me though.

What do you mean exactly by "things that may confuse my application". Is this a programming decision?

The way I see it if a gamer starts messing around with files and then all of a sudden the game does not work any more they shouldn't be asking the developer for support. Either reinstall or put the settings back to the original (life's not perfect though is it?). AC is a good example of having some configuration settings that can be tweaked that are located in appdata/roaming. They shouldn't be there in my opinion, a lot of other games don't put that file there so why should AC. I know BG keeps their config files in the install location which I like.

I think the purchaser of the software should at least have the decision though on where to install saved game data.
So, by "confuse my application" I mean modifying files to a state my app wasn't expecting. That is indeed a programming decision. Imagine from a gaming perspective if a savegame said someone was dead, but also said they killed someone after that point (and weren't undead). Then I come to assign XP, and my code bombs out. It's not a case an application should not consider, but you can't catch them all. So I use AppData to avoid that file being publicly manipulated. In my opinion you have no more right to that file than decompiling the exe and changing its innards, then recompiling it and running it. It's not a defense so much as a statement that this file is not to be played with.

Limitation of scope is an important principle for a coder, and as a result we only want people changing things we publish as changeable. There are ini files etc. that are expected to be tinkered with, but there's a limit.

As for save game data (and I think you're mixing this in with other data here, but lets focus on just savegames), If I have a game that syncs with the cloud (i feel dirty using that expression, but it fits), or that is involved in online play. I have to be able to manipulate it with confidence that I have access to the file. These things suggest that the file should not be publicly exposed, as ultimately it is not the final source of truth of the file, it is just a local cache.

As for your assertion that the user should have access to the save data, I've noticed that you've not mentioned the registry access. This is just data, no more or less than a file. In fact if a developer were so maniacal, they could save games in the registry in a load of sequential keys. The cold truth is that your hard drive cannot be considered "The game" anymore, it's just part of it. If a game is written to be entirely standalone (any linux one would) then you'll get your wish.

I should point out at this point, that I am not a games developer, and am drunk.
avatar
begolf00: Hi wpegg I like your post, it gave me some insight into why developers do what they do. I think I can understand where your coming from. The customers you deal with, will always be the majority over someone like me and as such your decisions make sense. I don't know if I agree with you on some points that would apply to someone like me though.

What do you mean exactly by "things that may confuse my application". Is this a programming decision?

The way I see it if a gamer starts messing around with files and then all of a sudden the game does not work any more they shouldn't be asking the developer for support. Either reinstall or put the settings back to the original (life's not perfect though is it?). AC is a good example of having some configuration settings that can be tweaked that are located in appdata/roaming. They shouldn't be there in my opinion, a lot of other games don't put that file there so why should AC. I know BG keeps their config files in the install location which I like.

I think the purchaser of the software should at least have the decision though on where to install saved game data.
avatar
wpegg: So, by "confuse my application" I mean modifying files to a state my app wasn't expecting. That is indeed a programming decision. Imagine from a gaming perspective if a savegame said someone was dead, but also said they killed someone after that point (and weren't undead). Then I come to assign XP, and my code bombs out. It's not a case an application should not consider, but you can't catch them all. So I use AppData to avoid that file being publicly manipulated. In my opinion you have no more right to that file than decompiling the exe and changing its innards, then recompiling it and running it. It's not a defense so much as a statement that this file is not to be played with.

Limitation of scope is an important principle for a coder, and as a result we only want people changing things we publish as changeable. There are ini files etc. that are expected to be tinkered with, but there's a limit.

As for save game data (and I think you're mixing this in with other data here, but lets focus on just savegames), If I have a game that syncs with the cloud (i feel dirty using that expression, but it fits), or that is involved in online play. I have to be able to manipulate it with confidence that I have access to the file. These things suggest that the file should not be publicly exposed, as ultimately it is not the final source of truth of the file, it is just a local cache.

As for your assertion that the user should have access to the save data, I've noticed that you've not mentioned the registry access. This is just data, no more or less than a file. In fact if a developer were so maniacal, they could save games in the registry in a load of sequential keys. The cold truth is that your hard drive cannot be considered "The game" anymore, it's just part of it. If a game is written to be entirely standalone (any linux one would) then you'll get your wish.

I should point out at this point, that I am not a games developer, and am drunk.
Thanks for your clarification, it helped a lot in my understanding. Yea for some reason the reg files don't bother me. Don' know why? Though I routinely use cc cleaner to clean reg files.
avatar
begolf00: AC is a good example of having some configuration settings that can be tweaked that are located in appdata/roaming. They shouldn't be there in my opinion, a lot of other games don't put that file there so why should AC.
But they should be put there; those settings are not machine specific and should be able to roam with the profile, and as such, that's the exact location where they should be stored.

It's extremely bad practice to store configuration/user specific files in the install location (usually Program files) because those configuration/user specific files need to be available just to that user, and need to have certain privileges which the user might be missing for the Program Files folder (for example a user might not be able to write to that folder).

I think your confusion comes from not understanding best practices and what the %appdata% folders represent.

For example, "LocalLow" is the low integrity folder which is used by Internet Explorer add-ons. When IE runs in protected mode, the extensions use the "LocalLow" folder for storing files/settings.

The Roaming folder is to preserve user data. Imagine a company with 1000 workstations, and employee use different workstations each day. By roaming the user profile data (copy to server), the custom data is always available regardless of any workstation the employee uses.

Windows uses the Local folder for application data that does not roam with the user. Usually this data is either machine specific or too large to roam. The AppData\Local folder in Windows Vista+ is the same as the Documents and Settings\username\Local Settings\Application Data folder in Windows XP.

As for Baldur's Gate, it was written for pre-NT systems which had no resemblance of security, true segregated multi-user accounts and roaming profiles.

avatar
begolf00: Though I routinely use cc cleaner to clean reg files.
Stop doing that. You're not gaining any performance benefit (the registry isn't sequentially read, but read as a dictionary: when the application needs a specific key it loads exactly that key, so no memory or system resources are used) and run the risk of hosing your system in the long run.
Post edited April 09, 2012 by AndrewC
I don't know coding at all and I'm not a developer, but your examples seem to relate to security and office environments that have 1000 workstations, not people just using a single computer. Why would you be playing a game like AC or BG at work? I mean I can think of reasons but I thought that most people who play games on their computer systems do so on a single user account usually.

I understand what your saying, your explanations help. When ever I install stuff I always install for myself not other users. So I guess I don't really care for roaming profiles and segregated multi-user accounts at least not for games. I can see the benefits and if your a you were a company how you would want the computers set up that way.

In regards to reg files been doing it for as long as I can remember and I've never had a problem cleaning reg files. I don't do it for speed though I just like having a clean reg system. At least from my understanding that's what I'm doing (Cleaning). I usually make back ups when I do clean the reg files. Also when you un-install something what's the point of having reg files associated with what your un-installing, like games for example? Curious. If you never cleaned the reg after a few years You would have all these keys that are not needed any more from my understanding because of programs being uninstalled. Maybe I should do some research and see if what I'm doing is just plain wrong:) I'm always open for change.


avatar
begolf00: AC is a good example of having some configuration settings that can be tweaked that are located in appdata/roaming. They shouldn't be there in my opinion, a lot of other games don't put that file there so why should AC.
avatar
AndrewC: But they should be put there; those settings are not machine specific and should be able to roam with the profile, and as such, that's the exact location where they should be stored.

It's extremely bad practice to store configuration/user specific files in the install location (usually Program files) because those configuration/user specific files need to be available just to that user, and need to have certain privileges which the user might be missing for the Program Files folder (for example a user might not be able to write to that folder).

I think your confusion comes from not understanding best practices and what the %appdata% folders represent.

For example, "LocalLow" is the low integrity folder which is used by Internet Explorer add-ons. When IE runs in protected mode, the extensions use the "LocalLow" folder for storing files/settings.

The Roaming folder is to preserve user data. Imagine a company with 1000 workstations, and employee use different workstations each day. By roaming the user profile data (copy to server), the custom data is always available regardless of any workstation the employee uses.

Windows uses the Local folder for application data that does not roam with the user. Usually this data is either machine specific or too large to roam. The AppData\Local folder in Windows Vista+ is the same as the Documents and Settings\username\Local Settings\Application Data folder in Windows XP.

As for Baldur's Gate, it was written for pre-NT systems which had no resemblance of security, true segregated multi-user accounts and roaming profiles.

avatar
begolf00: Though I routinely use cc cleaner to clean reg files.
avatar
AndrewC: Stop doing that. You're not gaining any performance benefit (the registry isn't sequentially read, but read as a dictionary: when the application needs a specific key it loads exactly that key, so no memory or system resources are used) and run the risk of hosing your system in the long run.
Saved games in a central location would be fine if ALL games saved to that folder. But that is not possible because there are a lot of old games where the save folder in in the game's directory. I prefer consistency, and so I don't like it when new games save to My Documents or Saved Games.
avatar
doady: Saved games in a central location would be fine if ALL games saved to that folder. But that is not possible because there are a lot of old games where the save folder in in the game's directory. I prefer consistency, and so I don't like it when new games save to My Documents or Saved Games.
Consistency = putting user files in system-wide folders? Sorry, we're past 2002 now.
avatar
doady: Saved games in a central location would be fine if ALL games saved to that folder. But that is not possible because there are a lot of old games where the save folder in in the game's directory. I prefer consistency, and so I don't like it when new games save to My Documents or Saved Games.
avatar
kavazovangel: Consistency = putting user files in system-wide folders? Sorry, we're past 2002 now.
No I'm not past 2002. That's why I come to a site called Good Old Games, so I can play games from 2002 and earlier, games which have save files in the game directory

If you don't play any pre-2003 games, that's your choice. But it makes me wonder why you are here in the first place.
avatar
doady: ...
What do old games have to do with modern protection and multi user management improvements?

Oh, and I play old games, sometimes. I'm here for the community not the games.
avatar
begolf00: Though I routinely use cc cleaner to clean reg files.
avatar
AndrewC: Stop doing that. You're not gaining any performance benefit (the registry isn't sequentially read, but read as a dictionary: when the application needs a specific key it loads exactly that key, so no memory or system resources are used) and run the risk of hosing your system in the long run.
There's no reason to do it routinely, but I've definitely had times where my performance had dropped significantly where a clean up of the registry did the trick. The registry does tend to get bloated when people install and uninstall lots of stuff.

But, for most people, you're almost certainly correct, the registry isn't usually big enough to cause a problem.


Honestly, the easiest way of dealing with this is cameyo, at least for smaller games it takes care of the clutter for you and makes it really easy to back up the whole program in one go if you need to.

For large games though which are pretty much all the newer ones, I'm not sure other than moving the folder to a sane place and linking back to where the game expects it to be.
Post edited April 10, 2012 by hedwards