The online racing simulator
#1 - wien
Store user data in the user's home
I have no idea if the devs are still reading this section, I sure wouldn't be, but here goes.

I would like to propose a change to where LFS stores its configuration and all other user-specific data like setups and skins. Instead of storing these in the directory in which it is installed, LFS should instead store these files in the user's home (Documents and Settings/<username>). This has numerous benefits:
  • It will allow users with limited permission user accounts, Vista or Windows 7 to use LFS without having to install the whole game to their home directory. Limited permission users will usually not have write access to the disk outside their home. This means that if LFS is installed in, for instance, the Program Files folder they have to run LFS as an administrator or that Windows will display UAC warnings. A lot of people have posted in the forums with problems related to this, and I would imagine the devs get some support requests about it as well. Solving this would be the primary benefit.
  • On for instance a home computer, multiple family members with their own Windows user account can use LFS without having to share setups, skins and controller setup between them. If unlocking information is stored in the home directory as well, each user could also unlock the same install of LFS with their own license simultaneously.
  • Multiple installs of LFS, say a test patch and the stable version, can be installed simultaneously and share setups, skins, etc without the user having to manually duplicate them. Some care would obviously have to be taken to avoid problems with changes in file formats etc. but that shouldn't be too much worse than it already is.
  • Backup of important files in case of system failure is, IMO, made easier since you don't need to hunt around the disk to find them. Just backup your user directory and you're done. Many retail backup solutions also automatically back up the user directory by default which is useful for "normal people".
On Vista and above the correct folder for storing game data is the user's Games folder. The location of this can be found by calling the WIN32 SHGetKnownFolderPath function with FOLDERID_Games.

Windows versions before Vista did not have a Games folder, so there the proper folder is somewhat up for debate. Some games use "My Documents/My Games", but personally I'm not a fan of that as savegames and configuration files are not documents. AppData would seem like the best candidate to me, but that is admittedly a bit obscure and will be hard to locate for most people as it's hidden by default.

Either way, the proper way of fetching these directories on pre-Vista OSes is probably SHGetFolderPath with CSIDL_APPDATA or CSIDL_PERSONAL depending on the chosen location.

Thoughts? Comments?
+1 from me, it's a sensible suggestion IMO, for years MS has been telling clearly the developers where their apps should store data and since Vista came out this has been factually enforced. That was 2 years ago, LFS should have been complied already.

OTOH XP is still alive and kicking and most Vista user will just set LFS to run as admin and then forget it, so it's just a matter of *cough* priorities
1) afaik apps are supposed to store their things in app data which is the worst possible place to put anything important (eg thunderbirds data or mirandas received files and yet thanks to microsoft its all in a hidden folder thats easily forgotten when backing up data)
2) putting lfs in any folder where it has rwx under your own user account shouldnt exactly be hard for anyone
3) only if there is some kind of "self contained 1" line in the config to switch to a mode which for me is much much more convenient
most of my day to day apps are either stored on some other drive or on c in self containd mode (if available) so i can just copy them from the backup and or put a shortcut on my desktop to get up and running after a system format again
#4 - wien
Ah, I was awaiting your objection, Mr. Glass. :drevil:

An option to keep LFS self-contained would certainly be a good idea as long as it isn't too much trouble to implement (shouldn't be). That way people can choose for themselves. Hopefully "self contained 0" would be the default though.

I also agree that AppData isn't the best solution on XP and below, but I find the My Documents approach most games seem to use equally annoying. One possibility is to default to "self contained 1" on XP and below and the opposite on Vista+, but that could perhaps be a bit confusing.

Putting LFS in a folder where you have write permission shouldn't be too much of a problem, I agree, but most people seem to have no idea what write permission even is. Judging by posts I've seen around this place quite a few people seem to have trouble with it and often they are running LFS as Administrator or turning off UAC to get around it (bad).
I agree with shotty. I hate it when a program stores important data hidden well away without noticing me about it. So I say it would be wasted developement time (rework how data is stored, possibly using an installer over a self extracting archive, etc) with no gain.
Quote from wien :That way people can choose for themselves. Hopefully "self contained 0" would be the default though.

fine with me
would be the first thing i change any time i install lfs

Quote :I also agree that AppData isn't the best solution on XP and below, but I find the My Documents approach most games seem to use equally annoying. One possibility is to default to "self contained 1" on XP and below and the opposite on Vista+, but that could perhaps be a bit confusing.

whats different about where vista stores these kind of things compared to xp except ditching the "my"
thanks to the way windows handles user folders id consider anything other than the contents of /desktop and /my documents to be somewhat equal to .files in linux ie hidden and worth forgetting about
besides being an old dos guy i greatly appreciate any self contained app and the ability to have full control over where my data ends up


oh btw something i just remembered
4) i like to use tweak to do silly mods with engine power somewhere in the range of a us bank bailout which can wreak havok on your setups if youre not careful so i tend to use a seperate lfs folder just for that (and thankfully lfs allows you to copy paste unlocked folders anywhere to create two unlocked copies)
#7 - wien
Quote from Shotglass :whats different about where vista stores these kind of things compared to xp except ditching the "my"

Nothing really, AppData is still "the place" for user specific data, but Vista has a new, user accessible, "Games" folder that can be used for savegames and suchlike. There are also other folders for Pictures and Music etc that don't interfere with (My) Documents. Personally I find these distinctions fairly arbitrary and I prefer the single home directory of *nix, but Microsoft is boss so there you go.
Quote from wien :Nothing really, AppData is still "the place" for user specific data, but Vista has a new, user accessible, "Games" folder that can be used for savegames and suchlike. There are also other folders for Pictures and Music etc that don't interfere with (My) Documents. Personally I find these distinctions fairly arbitrary and I prefer the single home directory of *nix, but Microsoft is boss so there you go.

I think this suggestion is a sensible suggestion, but may you allow me to make a few objections (Maybe they were already told with a computer-specific language that I couldn't understand properly, so please forgive me if what I say is a re-say ).

1) As someone mentionned earlier, AppData is usually hidden (well you can unhide it) and sometimes not easy to remember when you want to find savegames or whatever

2) I splitted my HD in two C: and D:. The C: partition is usually very very small, just enough to install the OS and the OS-related programs (DX, Office, etc), with let's say 1-1.5 go in my documents for future downloads and work files. On D: I find the vast majority of my programs. If the data was stored in C:\Users\AppData, I would soon reach the capsize of the HD, since my LFS folder already weighs 1.7Go (with all the skins that you download each time you enter a server, it gets big pretty fast !). So I would hate manually suppressing each old-unused skin so that I can still have room to store my work there .

3) I get suspicious when I "have" to store my information on a Windows folder

But apart from what I have said, I feel that it's a prety well thought suggestion
#9 - wien
Quote from Zen321 :I would soon reach the capsize of the HD, since my LFS folder already weighs 1.7Go

With AppData that would be a problem, yes, but the Vista+ Games folder can be moved wherever you want it. That's why it's important to use the functions I mentioned in the OP to retrieve this path instead of hardcoding it into LFS. Good point though.
#10 - J.B.
Lets's put hardware settings in HKLM, driver settings in HKCU, program files in, well, program files, user files in app data and savegames in "my games"...

Not.

Dos style program folders are perfect for almost all the programs that most people use on their personal PC. I hate how program structures that only make sense for large companies and massively multi user terminals are shoved down our throats for no reason whatsoever.

PS: I have a DOS games folder over 20 GB in size and guess how long it takes to install all those games? That's right: just as long as at takes to copy the data.
#11 - wien
Quote from J.B. :Dos style program folders are perfect for almost all the programs that most people use on their personal PC.

Unless they use Vista or Windows 7 in which case this is a real problem (see uproar about UAC). I wouldn't expect Joe Blow to fiddle around with permission settings, nor know what they are. I realise you don't like it, but that's just the way Windows, and every other OS out there, is built to work these days. Applications don't need huge installers and all that crap to work with this layout either (though most vendors for some reason think they need one). After formatting you simply restore your home, copy your 20GB of games, and there you go.
#12 - J.B.
But I don't get what the point of it all is for home computers used by small numbers people. To make sure Joe Blow doesn't accidentally delete "important" program files? Aren't the most protected files (program files) the least important and most easily restored type of data anyway? And putting programs in 5 different places at once just makes it even harder to protect yourself against data loss as you have find a way to do a backup in the first place. I just don't get it.

What do you mean by "After formatting you simply restore your home, copy your 20GB of games, and there you go." How do you simply restore all the registry entries and files that are scattered everywhere? Just disabling UAC and keeping everything in one place is far simpler than any of the other options I can imagine.
#13 - wien
The registry is evil and should never be used, especially not by games. You'll get no argument from me there. Storing files in the home directory does not require using the registry though. I very much agree with the stand-alone nature of LFS currently, I just disagree on where user data should be stored.

The reason limited user accounts are a good thing for home users is that when Joe opens his "Britney Spears nude" email and runs the attached executable he won't have write access to any of the executables already installed on the system and the malware can't hook itself up in the depths of the system. You also protect the files of other users on the computer from Joe's idiocy. It's simply about limiting the attack surface available to malware.
so just copy lfs to some location where you have full rights anyway and be done with it
imho games have no place being in program files anyway

btw quick sidenote its funny how frantic some people get with home file access rights when every day i work in a place where everybody has admin rights on his pc... mind you the place is full of engineers but still
I personaly hate not having full rights to my OWN computer and I turn off anything that limits those rights. I am by no means a computer expert but I do have the common sense to not bugger things up.

The only reason people need to have thier hands held when they use thier own computer is because they lack the sense to think "If I delete this it might kill my OS".

If it wheren't for people like that windows would be alot less cluttered with wizards and helpers that do nothing more than piss off experianced users.

If I could go back to windows 98se I would in an instant, but do to something microsoft somehow calls "progress" I can't.

I mean seriously, how is making things more complicated for people progress, sometimes I feel like I'm using some kind of nightmare interface where it just bombards you with usless information and prompts.

I want my DOS back .
you really dont need root privileges all the time... in fact you dont need them 99% of the time
That's a good suggestion, recently I installed windows7 over winXP, including a hdd-wipeout. I made a backup of all my personal files, which were on a separate partition, and also saved the whole user data folder, because that's the place where games and apps put there saves/config these days. But I forgot that LFS saves it all the old fashioned way, in the LFS folder itself. Now all my layouts, server settings and setups are gone.
I'd prefer having the option of uploading all of your user data to LFSW and downloading it again if and when you need it. Sort of like Valve are doing with Steam Cloud.

I just checked and each setup file is only 56 bytes, making my 592 stored setups only 64k(ish) with another 1.5k for a player profile. Not massive, so quick to do and not going to eat the bandwidth. Obviously things like custom sounds use up a bit of space, but the odds are people who go making their own will back them up themselves anyway, so I wouldn't be too worried about storing those.
In less than the space you save a single car skin you could backup your settings, and obviously LFSW would be able to install them to the right directory, even if you had to point it at your LFS folder.
Quote from wien :...

I recognize that you are proposing this for general ease of use in a MS Windows kind of way. However, I veto the usage of that motion and up the ante with this:

All your problems are solved with symbolic links - known in the world of NTFS as "junction points". Separate all your customizable data folders to someplace else and then create junction points from multiple installs to there. I've used them in the past for: a. multiple installations when using various test patches to update and roll back, b. multiple users with same license and even c. multiple users with different license - hell, I even spread symbolic links on toast in the morning so I don't have to open the refrigerator and get the jam out.
Well, it could be done even easier if there was a pointer to the skins/setups/configs folder in an ini which you could simply edit to point to any location.
Quote from Dajmin :I'd prefer having the option of uploading all of your user data to LFSW and downloading it again if and when you need it.

thats actually a pretty good idea

Quote from xaotik :All your problems are solved with symbolic links - known in the world of NTFS as "junction points".

his whole suugestion bases itself on the idea of making things simpler for the average pebcaker (how putting data into a folder most people dont even know exists would help with that im not quite sure but still) and junction points are definitely not something the average windows user knows how to set up
heck im sure most year long knowledgeable windows users dont even know what its called in nt and how to set it up without using google to find some man page on it



btw wien how do you propse to deal with skins? i havent checked but im fairly sure "all users" is write protected for user accounts
Quote from DragonCommando :The only reason people need to have thier hands held when they use thier own computer is because they lack the sense to think "If I delete this it might kill my OS".

Limited privileges make it harder for malicious software to cause serious trouble. There's no other reason for all of the security improvements in Vista vs XP
Quote from Shotglass :his whole suugestion bases itself on the idea of making things simpler for the average pebcaker

Ah, ah.

Quote from xaotik :I recognize that you are proposing this for general ease of use in a MS Windows kind of way. However, I veto the usage of that motion

Vetoed. Sorry - ease of use is out of the question.
#24 - wien
Quote from Shotglass :btw wien how do you propse to deal with skins? i havent checked but im fairly sure "all users" is write protected for user accounts

Well my initial thought was to have them per-user along with everything else, but I realise that could be wasteful. At least in the case of auto-downloaded ones on a multi-user computer. (But then, so is my current set of LFS dirs all downloading skins into their own directories)

All users would be ideal of course, but like you I'm not sure if limited users actually have write permission there. Would seem logical though. I'll give it a try later.
so according to you folder structures should be similar to wikipedia?
1

FGED GREDG RDFGDR GSFDG