Most the default installation path is Program Files. That needs elevation to write to. Fine when you’re installing something, but not something you want to need just to run the game.
Writing to %APPDATA% or really anywhere in %USERHOME% is guaranteed to have the right permissions for this user.
Granted, a lot of home PCs and gaming PCs are single-user environments. The “personal” computer. In that case there’s no reason games and applications can’t be installed in %LOCALAPPADATA%, and in fact, I think windows has an environment variable or registry setting for that.
It’s no different in Linux. You don’t want users writing to /etc. And you may expect multiple users. So all of that stuff goes to dot files in $HOME.
Granted, a lot of home PCs and gaming PCs are single-user environments. The “personal” computer. In that case there’s no reason games and applications can’t be installed in %LOCALAPPADATA%, and in fact, I think windows has an environment variable or registry setting for that.
I tried setting up my main windows gaming machine with a separate admin and user accounts, and tried to set it up to be multi-user. It didn’t work well. Most games worked but some random games had all sorts of bizarre issues, from only being able to run as admin, to requiring messing with directory permissions to just plain strange behavior but working sometimes. Steam also really didn’t like if I tried to run games as a different user and got very confused at times by the multiple user accounts
See, that’s dumb. Just because games aren’t enterprise software, there’s no reason basic security practice like least-privilege shouldn’t apply in development.
I mean, in Windows they literally have a “saved games” folder and almost no games use it. I too hate that most fucking games have to save their shit to the Documents directory. That’s the directory FOR MY FUCKING DOCUMENTS, NOT GAME SAVEDATA
My Documents > My Games is kinda the default, but then you have steam cloud syncing and tons of games that default to various Appdata folder seemingly at random.
C:\Users\Username\Saved Games is a thing. Not a lot of games use it though.
There’s also C:\Users\Username\Documents\My Games which seems more popular with some devs. Though some devs inexplicably use the base Documents folder, which is just obnoxious.
But yeah, a lot of devs still use AppData. I read a post from a dev once that explained the advantages and disadvantages to each Directory, though I can’t remember the specifics, there is at least logic to why saves get stored in so many odd locations.
hough some devs inexplicably use the base Documents folder
Shoutout to Anno 1404 which creates no less than 4 directories in the base Documents directory each for slightly different releases for the game that they later rolled into a single release so your user data is strewn across all of them if you bought the most complete release of the game
I have my own directories on windows. I never use system provided directories for my own stuff, it always sucks. And if I want to move directories between drives or just change permissions, all hell breaks loose because everything depends on the default locations… So I just leave them be if I can.
Why can’t the save game and config.ini just be in the main god damn game directory? Nobody knows.
To expand on the losing save data on uninstall:
Game devs would use Windows’ “Documents” folder for game saves until a couple years ago. They did this because it would be unlikely for users to delete their entire documents folder. This was, of course kind of stupid and hacky because documents are for documents, not game saves.
Microsoft remedied this issue a few years ago by adding a dedicated “Saved Games” folder.
The real issue and solution to this problem is that we need a dedicated gaming operating system. Or an operating system developed with gaming in mind.
Same shit happens on Windows. Games will just install their shit literally all over OS with no rhyme or reason to it.
Why can’t the save game and config.ini just be in the main god damn game directory? Nobody knows.
Actual reason is system permissions.
Most the default installation path is Program Files. That needs elevation to write to. Fine when you’re installing something, but not something you want to need just to run the game.
Writing to %APPDATA% or really anywhere in %USERHOME% is guaranteed to have the right permissions for this user.
Granted, a lot of home PCs and gaming PCs are single-user environments. The “personal” computer. In that case there’s no reason games and applications can’t be installed in %LOCALAPPADATA%, and in fact, I think windows has an environment variable or registry setting for that.
It’s no different in Linux. You don’t want users writing to /etc. And you may expect multiple users. So all of that stuff goes to dot files in $HOME.
Hence dot files
I tried setting up my main windows gaming machine with a separate admin and user accounts, and tried to set it up to be multi-user. It didn’t work well. Most games worked but some random games had all sorts of bizarre issues, from only being able to run as admin, to requiring messing with directory permissions to just plain strange behavior but working sometimes. Steam also really didn’t like if I tried to run games as a different user and got very confused at times by the multiple user accounts
See, that’s dumb. Just because games aren’t enterprise software, there’s no reason basic security practice like least-privilege shouldn’t apply in development.
deleted by creator
I mean, in Windows they literally have a “saved games” folder and almost no games use it. I too hate that most fucking games have to save their shit to the Documents directory. That’s the directory FOR MY FUCKING DOCUMENTS, NOT GAME SAVEDATA
Microsoft OWNS not just gaming companies, but one of the largest gaming hardware companies and many of the largest game developers.
You’d think by now we’d get a dedicated Saves folder to organize this shit after this long.
My Documents > My Games is kinda the default, but then you have steam cloud syncing and tons of games that default to various Appdata folder seemingly at random.
There is, been there since 7. Just hardly any game Devs use it, including Microsoft.
C:\Users\Username\Saved Games
is a thing. Not a lot of games use it though.There’s also
C:\Users\Username\Documents\My Games
which seems more popular with some devs. Though some devs inexplicably use the base Documents folder, which is just obnoxious.But yeah, a lot of devs still use AppData. I read a post from a dev once that explained the advantages and disadvantages to each Directory, though I can’t remember the specifics, there is at least logic to why saves get stored in so many odd locations.
Shoutout to Anno 1404 which creates no less than 4 directories in the base Documents directory each for slightly different releases for the game that they later rolled into a single release so your user data is strewn across all of them if you bought the most complete release of the game
I have my own directories on windows. I never use system provided directories for my own stuff, it always sucks. And if I want to move directories between drives or just change permissions, all hell breaks loose because everything depends on the default locations… So I just leave them be if I can.
deleted by creator
They’re probably trying to handle per user config. But nowadays, there’s mostly only one user using a machine.
To expand on the losing save data on uninstall:
Game devs would use Windows’ “Documents” folder for game saves until a couple years ago. They did this because it would be unlikely for users to delete their entire documents folder. This was, of course kind of stupid and hacky because documents are for documents, not game saves.
Microsoft remedied this issue a few years ago by adding a dedicated “Saved Games” folder.
The real issue and solution to this problem is that we need a dedicated gaming operating system. Or an operating system developed with gaming in mind.