Where to store things, per OS

Started by knucracker, April 22, 2016, 01:52:12 PM

Previous topic - Next topic

knucracker

Where to put stuff on each OS...  what a pain.  I have some new ideas for Particle Fleet, but before I commit I thought I'd throw it out and see what the community has to say.
For CW3, I've been using 'documents' on OSX and linux but I get complaints about that.  So based on my research the following looks closer to normal for each platform. 

SETTINGS are things like your preferences and your key (if nonsteam).  GAMEDATA is everything else (your scores, downloaded missions, maps you are editing, etc).

Latest Proposal
Windows
SETTINGS: c:\Users\USER\Documents\My Games\particlefleet\settings\
GAMEDATA: c:\Users\USER\Documents\My Games\particlefleet\

OSX
SETTINGS: ~/Library/Application Support/com.knucklecracker/particlefleet/settings/
GAMEDATA: ~/Library/Application Support/com.knucklecracker/particlefleet/

Linux
SETTINGS: ~/.local/share/knucklecracker/particlefleet/settings/
GAMEDATA: ~/.local/share/knucklecracker/particlefleet/

Windows
SETTINGS: c:\Users\USER\AppData\Roaming\knucklecracker\particlefleet
GAMEDATA: c:\Users\USER\Documents\knucklecracker\particlefleet 

OSX
SETTINGS: ~/Library/Application Support/knucklecracker/particlefleet/settings/
GAMEDATA: ~/Library/Application Support/knucklecracker/particlefleet/gamedata/

Linux
SETTINGS: ~/.config/knucklecracker/particlefleet/
GAMEDATA: ~/.local/share/knucklecracker/particlefleet/

raziel

why not to store them in game's folder?

Jdban

Windows looks good, looks pretty standard. That's all I can comment on.

J

Quote from: raziel on April 22, 2016, 01:59:48 PM
why not to store them in game's folder?
Storing them inside the game folder causes security issues on windows machines. (Old) games that did that need to be run as administrator in order to work correctly.

I notice there's now a 'knucklecracker' folder, is it possbile to auto-move the game files of older games to that directory? My documents is looks a bit cluttered with all these games.

knucracker

Quote from: J on April 22, 2016, 02:12:15 PM
Quote from: raziel on April 22, 2016, 01:59:48 PM
why not to store them in game's folder?
Storing them inside the game folder causes security issues on windows machines. (Old) games that did that need to be run as administrator in order to work correctly.

I notice there's now a 'knucklecracker' folder, is it possbile to auto-move the game files of older games to that directory? My documents is looks a bit cluttered with all these games.

CW3 already supports (via gamesettings.xml) moving what I call the GAMEDATA folder for ParticleFleet.  So you could move CW3 to this new structure.  I'm nervous about releasing an update of CW3 that would do this automatically.  It could fail, mess up some backup of the old folder somebody was using, cause additional confusion when somebody look in the old place, etc.


kwerle

#5
The OSX game data is <edit> nearly </edit> spot on.  It should probably be:
~/Library/Application Support/com.knucklecracker/
or even
~/Library/Application Support/com.knucklecracker.particlefleet/


For settings, it's generally the right thing to use the settings and preferences APIs.  I'd be surprised if whatever IDE you're using doesn't support that:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/UserDefaults/Introduction/Introduction.html

If there's some reason you can't use that system, the location you suggested will do...

Ninja

Well, I use Windows, and what you put there does look pretty standard.
I will say, though, I've never quite understood why so many games use the AppData folder, and I find it a tad annoying as it can be hard to find. Can someone tell me why it is games usually use this folder?

MadKingMidas

I personally have a very small SSD running only my OS on my C:\ drive. I would prefer to be able to choose whete the game files and such are being stored during the insallation.

knucracker

Quote from: MadKingMidas on April 22, 2016, 02:37:14 PM
I personally have a very small SSD running only my OS on my C:\ drive. I would prefer to be able to choose whete the game files and such are being stored during the insallation.
I can make the GAMEDATA folder path something you can change in the game's settings menu.  So for any platform you can point it to wherever you prefer.  But, 99.9% of players will probably use the defaults.


J4kubS


Bingeling

On windows, help keep Documents somewhat tidy, and put it into "Documents\My Games". Many other games do that.

I do not see a reason why you should not also put the config there? Why hide it? In the case someone wants to move stuff the manual way, it would be just one folder to move. Just leave one item that points at the main storage folder in appData.

You can have a "Save Games", "Config", "Cache" or whatever is needed or suitable inside the particlefleet folder.

knucracker

#11
This is an article from several years ago that is interesting (the comments as much as anything).
https://www.rockpapershotgun.com/2012/01/23/stop-it-put-save-games-in-one-place/

If you had to fit a line to the data in the comments, it might be to use Documents\My Games\Game_Name...

As for SETTINGS and GAMEDATA.  I guess they could actually live together.  SETTINGS are really just game options (like graphics settings, and key mappings), plus the key if using the NONSTEAM version.

Based on that the following might be the proposed default locations.  Note there is really only one directory, and settings and gamedata are just siblings under it.   For windows, the dir moves under My Games.  For OSX there is a "com." in the company name.  And for linux everything moves under ~/.local/share/.  For linux I just left it as "knucklecracker" rather than "com.knucklecracker".  I don't supposed that is a common thing on linux, so I left "com." out.  Similar for windows.  Looks like the game, not the company name, tends to show up under My Games.

Windows
SETTINGS: c:\Users\USER\Documents\My Games\particlefleet\settings\
GAMEDATA: c:\Users\USER\Documents\My Games\particlefleet\

OSX
SETTINGS: ~/Library/Application Support/com.knucklecracker/particlefleet/settings/
GAMEDATA: ~/Library/Application Support/com.knucklecracker/particlefleet/

Linux
SETTINGS: ~/.local/share/knucklecracker/particlefleet/settings/
GAMEDATA: ~/.local/share/knucklecracker/particlefleet/


kingarthur

on windows it might be better to leave it just under documents as my games could make it harder to find. Im pretty sure the folder doesn't exist on my windows 8 computer and Im not sure about 7 or 10. so it would just create another folder that isn't needed.

MadKingMidas

Quote from: virgilw on April 22, 2016, 02:44:34 PM
Quote from: MadKingMidas on April 22, 2016, 02:37:14 PM
I personally have a very small SSD running only my OS on my C:\ drive. I would prefer to be able to choose whete the game files and such are being stored during the insallation.
I can make the GAMEDATA folder path something you can change in the game's settings menu.  So for any platform you can point it to wherever you prefer.  But, 99.9% of players will probably use the defaults.

Weird. I never use defaults. I like knowing exactly where everything I install is. Love my storage drive.

GoodMorning

I try to avoid caring, provided the game works. If the save needs to vary by user, then store it somewhere that isn't the install directory. Otherwise, I would prefer to find the entire game in one place. (I don't know what Steam &c. try to do...)
A narrative is a lightly-marked path to another reality.