default install folder for windows game

Started by
32 comments, last by Aardvajk 8 years, 8 months ago


There is no reason for the user to modify your game data directly and therefore no need for any of it to be in a modifiable folder. If you want to support mods, then let the user specify a folder where they can drop the modified files that you will check first before loading from your own local folder. Not only does this play nicely with UAC on all OSes, but if the user screws something up they can simply nuke the mod folder rather than having to re-install your game.

This.

Advertisement
What's the advantage to "everything in one folder"? I'm missing something here.

I've had bad experiences with using the current working directory, especially in apps that use file dialogs, so I tend to always use the fully qualified path for resource loading. For the exe folder you can get this from GetModuleFileName or whatever it is called and you can use the relevant calls to get the correct AppData path.

So unless you are talking about relying on the CWD being the exe directory when the game launches, which I don't think is terribly robust, I don't understand what the advantage is.

What's the advantage to "everything in one folder"? I'm missing something here.

backup purposes primarily. and no chasing down long directory trees to mass delete saved games through the OS (ever tried to delete a couple hundred savegames in skyrim from inside skyrim?).

and yes at the moment, the game just uses current working dir, no specific paths. so you can install and it works anywhere (well, at least anywhere UAC allows). this also means you can freely move the game folder without breaking anything. however, such a setup does not take user permission systems into account. i remember first noticing way back at OSU (late 80's) that such a setup is really not the UNIX permissions way of doing things.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php


What's the advantage to "everything in one folder"? I'm missing something here.

backup purposes primarily. and no chasing down long directory trees to mass delete saved games through the OS (ever tried to delete a couple hundred savegames in skyrim from inside skyrim?).

and yes at the moment, the game just uses current working dir, no specific paths. so you can install and it works anywhere (well, at least anywhere UAC allows). this also means you can freely move the game folder without breaking anything. however, such a setup does not take user permission systems into account. i remember first noticing way back at OSU (late 80's) that such a setup is really not the UNIX permissions way of doing things.

Things like backup actually becomes easier if everyone plays by the rules and stores things in (roughly) the correct place, As a user i don't want to keep backups of all my installed games (doing so would require insane amounts of space and re-installing them from disc/steam/gog or a downloaded installer is trivial) and i definitely don't want to set my backup scripts to make backups of C:\Program Files\game1\saves , C:\publisherX\game2\saves, D:\game3\saves, etc

If all applications behave as they should i only need to make a backup of the user folder and everything that can't be re-installed will be covered (documents, photos, code, save games, settings, my browser bookmarks, etc, etc), if i use network/domain user accounts (or just store the user folders on a NAS and configure the local users on all machines to use that) i can share all that stuff between all my machines seamlessly while still having all the big game assets, binaries, etc on a local SSD on each machine for fast loading.

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

I personally save all my games to a separate games folder I created on my E drive. Not because of any experience with UAC file corruption issues but just to conserve space on my SSD by storing games to my traditional hard drive.

ok, how does one handle multiple installs vs using the prescribed directories? if the exe is going in programFiles\caveman3 by default, and other data is going in user\<current>\whatever (i haven't figured out which types of data should go where yet for mod-friendly design AND using the prescribed directories). and then you do a second install to programFiles\caveman3_2 (for example) - you'd need to differentiate the other data files for the two installs somehow - place them in separate folders and associate the folders with their particular installs. its a modularity, portability, coupling and cohesion kinda thing. if my game install files are spread out over multiple folders like the tentacles of an octopus, it makes it hard to detach and move around easily. use the user specified install folder name (caveman3 or caveman3_2) to create separate data folders under the user\<current>\whatever dir(s)?

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

ok, how does one handle multiple installs vs using the prescribed directories? if the exe is going in programFiles\caveman3 by default, and other data is going in user\<current>\whatever (i haven't figured out which types of data should go where yet for mod-friendly design AND using the prescribed directories). and then you do a second install to programFiles\caveman3_2 (for example) - you'd need to differentiate the other data files for the two installs somehow - place them in separate folders and associate the folders with their particular installs.

Why do you have two different installations of the .exe? Are they the same semantic version? If not, simply use the version number to create a subdirectory in %APPDATA%\YourCompany\YourGame\YourVersion\...

If they are the same version, well, that's a bit weird, but if you want to support that use, say, a hash of the installation directory of the .exe as a uniqueifying identifier for the %APPDATA% subdirectory.

[background=#fafbfc]ok, how does one handle multiple installs vs using the prescribed directories? if the exe is going in programFiles\caveman3 by default, and other data is going in user\<current>\whatever (i haven't figured out which types of data should go where yet for mod-friendly design AND using the prescribed directories). and then you do a second install to programFiles\caveman3_2 (for example) - you'd need to differentiate the other data files for the two installs somehow - place them in separate folders and associate the folders with their particular installs. [/background]


Why do you have two different installations of the .exe? Are they the same semantic version? If not, simply use the version number to create a subdirectory in %APPDATA%\YourCompany\YourGame\YourVersion\...

If they are the same version, well, that's a bit weird, but if you want to support that use, say, a hash of the installation directory of the .exe as a uniqueifying identifier for the %APPDATA% subdirectory.


Only thing I'd be careful about there is you don't want the user "losing" all their settings when patching, which might happen if you use the version number to determine which setting folder to pick.

I'm not sold on supporting multiple installations. I don't know of any program that has ever done this - and even if they did - why would the user have to remake all their settings for two copies of the same program? Should he only be able to open his save games with a particular copy? How would he even tell the difference?

well, everything in one directory does have some advantages during development. i can run the game straight from the release folder - don't have to install or update first. i can test install the demo to \program files(x86)\caveman3 without interfering with the version in the release folder - IE two completely separate installs with their own settings. also, everything in one folder makes it easy to find stuff - no chasing through folders to the right subfolder for some particular file type, etc. i can get away with it due to the relatively low number of assets in the game due to heavy reuse. example: all humans are implemented with just 10 skinned meshes and about 10 hair meshes.

but for end users, none of this "all in one folder" stuff is really necessary.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

You could just add optional command line parameters and/or config file to specify the data folder and savegame folder. Or first look if there is a subfolder near the exe file, then check the appdata. Could be nice to have the game data safe inside the protected programs folder and then look for mods inside appdata.

This topic is closed to new replies.

Advertisement