Discussion:
Recognizing $XDG_GAMES_DIR
Jerome Leclanche
2013-12-20 04:44:55 UTC
Permalink
Thoughts on recognizing and managing $XDG_GAMES_DIR, and possibly
translating it in xdg-user-dirs?
(http://www.freedesktop.org/wiki/Software/xdg-user-dirs/)

It's a bit analogous to windows' "My Games" / "Saved Games" folder.
Wine in fact needs it (currently its always using "<My Documents aka
$HOME>/my games"), though it can do without. Steam is in the same
situation (Steam on Windows saves to My Games and Steam's online
service).

On Windows, the folder contains saves, scores, player data etc for
specifically games applications.
This has been on the back of my mind for a little while now. There's
the obvious answer of using ~/.local/share for game saves (in fact
thats pretty much what that is for), but there's also obvious
advantages to having saved games in their own folders.

So there's also the option of defaulting it in
~/.local/share/gamesaves or ~/.local/games or something and not have
it localized by xdg-user-dirs, which is more unixy/linuxy and in which
case it wouldn't be managed by xdg-user-dirs at all. This comes down
to "Does game save data need to be user-facing?".

Thoughts?

J. Leclanche
Robert Qualls
2013-12-20 08:03:33 UTC
Permalink
Post by Jerome Leclanche
It's a bit analogous to windows' "My Games" / "Saved Games" folder.
Wine in fact needs it (currently its always using "<My Documents aka
$HOME>/my games"), though it can do without. Steam is in the same
situation (Steam on Windows saves to My Games and Steam's online
service).
I guess fighting what wine has chosen is probably pointless, but I'm
not super crazy about all these directories at the top level of home.
What's worse than "my games" is that some developers just put their
individual folders at the top level, even for wine. For example Mass
Effect 2 just creates ~/Bioware. Naturally, none of these get removed
when the games are uninstalled, so if you want a clean home, you end
up playing musical game save folders to hang on to the saves.
Post by Jerome Leclanche
So there's also the option of defaulting it in
~/.local/share/gamesaves or ~/.local/games or something and not have
it localized by xdg-user-dirs, which is more unixy/linuxy and in which
case it wouldn't be managed by xdg-user-dirs at all. This comes down
to "Does game save data need to be user-facing?".
Although something like ~/.local/share/gamesaves is more descriptive,
these directories also have configuration files in them. Some even
seem to have content packs. On the one hand, I don't think the user
needs to "see" game saves, since these take up little space and can be
managed by the games themselves. But the user might want to tinker
with configuration manually, in which case putting that stuff in a
non-obvious place / under a non-obvious name might be bad. I guess I
like ~/.local/share/games because it's consistent. Right now my
~/.local/share is cluttered with native game config folders, so they
could go in there.

Then again, if developers refuse to use anything other than "my
games," putting a "proper" folder somewhere else would just cause more
confusion. And then there's having both a wine and native version
installed simultaneously, overwriting each other's stuff through some
subtle inconsistency...

Robert Qualls.
Post by Jerome Leclanche
Thoughts on recognizing and managing $XDG_GAMES_DIR, and possibly
translating it in xdg-user-dirs?
(http://www.freedesktop.org/wiki/Software/xdg-user-dirs/)
It's a bit analogous to windows' "My Games" / "Saved Games" folder.
Wine in fact needs it (currently its always using "<My Documents aka
$HOME>/my games"), though it can do without. Steam is in the same
situation (Steam on Windows saves to My Games and Steam's online
service).
On Windows, the folder contains saves, scores, player data etc for
specifically games applications.
This has been on the back of my mind for a little while now. There's
the obvious answer of using ~/.local/share for game saves (in fact
thats pretty much what that is for), but there's also obvious
advantages to having saved games in their own folders.
So there's also the option of defaulting it in
~/.local/share/gamesaves or ~/.local/games or something and not have
it localized by xdg-user-dirs, which is more unixy/linuxy and in which
case it wouldn't be managed by xdg-user-dirs at all. This comes down
to "Does game save data need to be user-facing?".
Thoughts?
J. Leclanche
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
Jerome Leclanche
2013-12-20 08:43:15 UTC
Permalink
Post by Robert Qualls
Post by Jerome Leclanche
It's a bit analogous to windows' "My Games" / "Saved Games" folder.
Wine in fact needs it (currently its always using "<My Documents aka
$HOME>/my games"), though it can do without. Steam is in the same
situation (Steam on Windows saves to My Games and Steam's online
service).
I guess fighting what wine has chosen is probably pointless, but I'm
not super crazy about all these directories at the top level of home.
What's worse than "my games" is that some developers just put their
individual folders at the top level, even for wine. For example Mass
Effect 2 just creates ~/Bioware. Naturally, none of these get removed
when the games are uninstalled, so if you want a clean home, you end
up playing musical game save folders to hang on to the saves.
The polluting of $HOME by Wine apps is a side effect of "My Documents"
being $HOME by default. It can be changed in winecfg (Desktop
Integration tab).
Post by Robert Qualls
Post by Jerome Leclanche
So there's also the option of defaulting it in
~/.local/share/gamesaves or ~/.local/games or something and not have
it localized by xdg-user-dirs, which is more unixy/linuxy and in which
case it wouldn't be managed by xdg-user-dirs at all. This comes down
to "Does game save data need to be user-facing?".
Although something like ~/.local/share/gamesaves is more descriptive,
these directories also have configuration files in them. Some even
seem to have content packs. On the one hand, I don't think the user
needs to "see" game saves, since these take up little space and can be
managed by the games themselves. But the user might want to tinker
with configuration manually, in which case putting that stuff in a
non-obvious place / under a non-obvious name might be bad. I guess I
like ~/.local/share/games because it's consistent. Right now my
~/.local/share is cluttered with native game config folders, so they
could go in there.
Config and save data is very different of course. I'm not suggesting
putting *all* the program data from a game in XDG_GAMES_DIR. Programs
still should adhere to the current xdg standards; only game data
should go in that folder.
Graphics settings and resolution is config and goes in ~/.config.
Saves, scores, etc and what have you is game data and would currently
go in ~/.local/share, and is what I'm suggesting moving to
$XDG_GAMES_DIR.
From a games dev point of view, what the application needs is:
- A place for the game's binaries (this is handled by the package manager)
- A place for the game's data files (this is either handled by the
package manager of the game itself. At the user level it usually goes
in ~/.local/share)
- Game configuration (~/.config)
- Logs (usually end up in ~/.local/share), caches (~/.cache)
- Addons/customizations (~/.local/share)

And for the game-specific data:
- World data
- Saves, scores, progression, achievements, ...
- Screenshots (arguable)
Post by Robert Qualls
Then again, if developers refuse to use anything other than "my
games," putting a "proper" folder somewhere else would just cause more
confusion. And then there's having both a wine and native version
installed simultaneously, overwriting each other's stuff through some
subtle inconsistency...
As far as Wine goes, it's developers using the Windows "games" API. If
Wine decided to integrate with the aforementioned xdg variable, those
issues would go away immediately.
To be clear: Wine apps (almost) never touch anything in $HOME, as it's
only accessible as the Z: drive (unless sandboxed). All of the files
go in $WINEPREFIX, which happens to have a few symlinks to $HOME by
default (such as My Documents).
Post by Robert Qualls
Robert Qualls.
Post by Jerome Leclanche
Thoughts on recognizing and managing $XDG_GAMES_DIR, and possibly
translating it in xdg-user-dirs?
(http://www.freedesktop.org/wiki/Software/xdg-user-dirs/)
It's a bit analogous to windows' "My Games" / "Saved Games" folder.
Wine in fact needs it (currently its always using "<My Documents aka
$HOME>/my games"), though it can do without. Steam is in the same
situation (Steam on Windows saves to My Games and Steam's online
service).
On Windows, the folder contains saves, scores, player data etc for
specifically games applications.
This has been on the back of my mind for a little while now. There's
the obvious answer of using ~/.local/share for game saves (in fact
thats pretty much what that is for), but there's also obvious
advantages to having saved games in their own folders.
So there's also the option of defaulting it in
~/.local/share/gamesaves or ~/.local/games or something and not have
it localized by xdg-user-dirs, which is more unixy/linuxy and in which
case it wouldn't be managed by xdg-user-dirs at all. This comes down
to "Does game save data need to be user-facing?".
Thoughts?
J. Leclanche
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
Rex Dieter
2013-12-20 15:10:18 UTC
Permalink
Post by Jerome Leclanche
Thoughts on recognizing and managing $XDG_GAMES_DIR
Why should games be treated differently that other applications? Ie, why
not just put stuff under $XDG_DATA_HOME ?

You mentioned "but there's also obvious
advantages to having saved games in their own folders.", but I don't see any
obvious advantages (and some disadvantages, including the possible
proliferation of proposals for more $XDG_<some_new_kind_of_app>_DIR using
similar logic).

-- rex
Ingo Ruhnke
2013-12-20 17:07:35 UTC
Permalink
Post by Rex Dieter
Why should games be treated differently that other applications? Ie, why
not just put stuff under $XDG_DATA_HOME ?
While I have seen a few games using $XDG_DATA_HOME for savegames it feels
like the wrong place for them. As far as I understand XDG_DATA_HOME (the
standard really isn't all that clear on what it's actually meant to be used
for), it's basically just the user's version of /usr/share/, meaning it
might contain themes, add-ons, mods, icons and other third party program
data. Savegames on the other side are your personal data, so you really
don't want to get it mixed together with third-party stuff.

So at the moment I would store them together with the config data, as
that's the kind of data you want to backup. It's also matches best what
games do under Windows where you have a singe directory for the games
itself and then a ~/MyGames/ directory for config, savegames and
screenshots. The problem with this is that savegames aren't exactly like
config, config tends to be small, while gamesaves can go into the Gigabytes
depending on the game, with screenshots or video recording the situation
might even get more bloaty. But as games save all those files automatically
without a file dialog they need a default location of where to store them.

I am not sure that a XDG_GAME_HOME is needed, as the damage done by
spreading things out further could be more harmful then just stuffing
everything into XDG_CONFIG_HOME, but there is plenty of precedence for
games specific location, namely /var/games/, /usr/share/games, /usr/games
and so on.
--
Blog: http://grumbel.blogspot.com/
JabberID: xmpp:***@jabber.org
ICQ: 59461927
Jerome Leclanche
2013-12-20 22:24:33 UTC
Permalink
Post by Ingo Ruhnke
Post by Rex Dieter
Why should games be treated differently that other applications? Ie, why
not just put stuff under $XDG_DATA_HOME ?
While I have seen a few games using $XDG_DATA_HOME for savegames it feels
like the wrong place for them. As far as I understand XDG_DATA_HOME (the
standard really isn't all that clear on what it's actually meant to be used
for), it's basically just the user's version of /usr/share/, meaning it
might contain themes, add-ons, mods, icons and other third party program
data. Savegames on the other side are your personal data, so you really
don't want to get it mixed together with third-party stuff.
So at the moment I would store them together with the config data, as that's
the kind of data you want to backup. It's also matches best what games do
under Windows where you have a singe directory for the games itself and then
a ~/MyGames/ directory for config, savegames and screenshots. The problem
with this is that savegames aren't exactly like config, config tends to be
small, while gamesaves can go into the Gigabytes depending on the game, with
screenshots or video recording the situation might even get more bloaty. But
as games save all those files automatically without a file dialog they need
a default location of where to store them.
I am not sure that a XDG_GAME_HOME is needed, as the damage done by
spreading things out further could be more harmful then just stuffing
everything into XDG_CONFIG_HOME, but there is plenty of precedence for games
specific location, namely /var/games/, /usr/share/games, /usr/games and so
on.
That precedent alone is imho reason enough for $XDG_GAMES_HOME.
I'm conflicted myself about it, don't get me wrong. But in the end,
games managers (Wine's Windows games api, Steam, ...) will create a
location of their own for this stuff. Might as well try to catch this
one as early as possible.
Post by Ingo Ruhnke
--
Blog: http://grumbel.blogspot.com/
ICQ: 59461927
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
Loading...