• General Chat
  • User directory behavior on other operating systems

I was curious about where exactly the user:// directory is, and found that it stores stuff in a directory called app_userdata within a Godot directory that is somewhat deep into my home folder. (I'm on Linux)

In this folder, I noticed that all the projects I had ever opened, and even some other Godot games I had downloaded and played, had their own data folder, even projects and games that never used data storage functions. Why does this happen? It seems unnecessary to create a new directory when something doesn't even use data storage.

I'm curious to see if this works similarly on Windows and MacOS. I see that on Windows, the user:// directory is in a Godot directory under the AppData folder. If, for example, someone on Windows were to download one of my games, would it create a "Godot" directory in AppData with a userdata folder for my game, even if said game never accesses the user:// directory?

@Azedaxen said:

I'm curious to see if this works similarly on Windows and MacOS.

Yeah, it's a mess.

Unfortunately, Godot does make a folder for each and every Godot game in the user:// directory for whatever OS is being used. On one hand, I get it, as otherwise there would have to be a condition that checks for the user:// folder whenever it is used and that could add code complexity that can be avoided by simply forcing the folder to be made. Additionally, it allows Godot developers to have the confidence that the folder will be there whenever the need it. On the other hand, it does lead to a lot of empty folders that honestly are not needed for the majority of Godot games.

@Azedaxen said: If, for example, someone on Windows were to download one of my games, would it create a "Godot" directory in AppData with a userdata folder for my game, even if said game never accesses the user:// directory?

Yes, Godot will make this directory for you, even if you never use the user:// directory, or even if you never use the File API at all. Godot just makes it by default.

@TwistedTwigleg said: Unfortunately, Godot does make a folder for each and every Godot game in the user:// directory for whatever OS is being used.

Thanks for the answer, that's too bad. I hope that in the future we will be able to prevent the creation of this folder if it's not needed, and also customize the name of the Godot directory to something more professional.

Thanks for the answer, that's too bad. I hope that in the future we will be able to prevent the creation of this folder if it's not needed

I don't think it's worth the trouble. Creating the folder in advance makes everything that comes after it easier. Creating a few dozen or hundred folders won't slow anything down.

, and also customize the name of the Godot directory to something more professional.

This is already supported. Enable Use Custom User Dir in the Project Settings and adjust Custom User Dir Name to your liking :)

And also define it's location, I'd wish.

This is already supported, as outlined above. If you want the editor to be fully portable, create a file called ._sc_ or _sc_ next to the executable to enable self-contained mode. (This is already used by the Steam version by default.)

@Calinou said:

This is already supported, as outlined above. If you want the editor to be fully portable, create a file called ._sc_ or _sc_ next to the executable to enable self-contained mode. (This is already used by the Steam version by default.)

Ah, nice wasn't aware of that, so conceivably I should be able to create a installer letting the user chose the user data path then.