aws / lumberyard

Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Other
2.04k stars 541 forks source link

User path should be in platform-specific, user-writable directories #467

Open theblooopz opened 4 years ago

theblooopz commented 4 years ago

When people install a game on windows PC it's typically in the "Program Files" directory or a folder on their root drive like "games," for example. These folders are typically read only unless the application is given privileges.

Currently on PC, release build of Lumberyard will throw logs and cached data, like compiled shaders, in the "user" directory which is hardcoded to point to the game executable directory. This is bad design.

Suppose you ship a game and wish to keep shader compilation on which is a totally reasonable thing to want to do. If the user installs the game in a location that doesn't have write permission then the logs won't be saved and nor will the compiled shaders actually be cached. We know that shader compilation causes performance loss in game, and on every run the user will experience this performance loss depending on how many shaders were missed in packaging.

A more sensible solution is to point the "@user@" path to platform specific, user-writable cache directories. For windows, for example, the paths that called from the SaveData gem.

Ideally there would be a "Unified" user path selector like there is a unified launcher.

For now, I'm using this: https://gist.github.com/wcbx/23fdfb2252351e25d3f9d872e64db304 ... This follows the convention set up in SaveData gem to call the local appdata folder named according to he executable name. That's where it stashes all the compiled shaders and logs.

AMZN-alexpete commented 4 years ago

Hi @wcbx, thanks for providing these suggestions. I've created LY-112287 to track this internally.