Sessions per user

Hai, been using Tiled for a while and so far it brought me joy. In fact, for a retro game system we’ve been using this one together with custom Powershell scripting to fill in the blanks (like export to binary file).

We use Tiled in a project shared fashion, and the user sessions are a pain. In the docs there’s a note confirming that. At this moment, Tiled uses a project-based session file.

I’d suggest to make this a user-based session file. That way, local computer information like users and file locations are stored per user, and don’t give errors on other computers or with other users where different resource locations (like files) are used.

The session files are already essentially per-user: the idea is that you don’t send the session file along with the project. All the actually important information is stored in the project. When using something like git, you should set it to ignore the session file.

Hai eishiya, thank you for your quick reply.

Now, perhaps we should define “user-based” first; it is data that follows the logged on
user. In this case, a session file is like preferences and in user context.

The session file is not stored in that user context, but rather in the project root directory. Any one starting the project file will have the session file active as well.

In a shared space, like we do with a file store on a file server, this brings problems because USER based information is stored in the session file. Sure, when using a local copy (for example with GIT), you can choose to not send the session file. But in our case, it is one share location. Every one works in the same file store.

A solution could be to save the session file to user context. In Windows, for example, that would be drive:\users<username>. Just like preferences are store in user context in the registry (HKEY_CURRENT_USER\SOFTWARE\\Tiled)
Another solution would be to have a file location in the preferences for session files, users can decide to place a session file in user space.
Or, have the session file attached to the user by using the user name and still store the session file in the project.

As long as user data is stored in the session file, the session file should be considered user-based and stored in user context.

Looking forward to any reply :slight_smile:

Atm I have change the session path in the registry on my local computer, and that seems to work atleast :slight_smile:

set-ItemProperty registry::HKEY_CURRENT_USER\SOFTWARE\\Tiled\project -name lastsession -Value C:/Users/roman/roman.tiled-session

I support the idea of allowing the session file to be external to any project to make projects easier to share and to unify preferences across multiple projects. Even though .gitignore allows me to easily share my project without any cruft, it would be nice to not have to use it.

Perhaps it can be an option in Preferences somewhere, e.g. “Session data: Project | Global | Custom”, where Global is the default session that Tiled uses when no project is loaded, and Custom lets you specify a specific file location.

Edit: “Global” is probably a bad idea, so scratch that. But Project | Custom would still be useful.

1 Like