supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Improvements to profile management + unlimited profiles

Open Vankata453 opened this issue 3 years ago • 3 comments

Makes additions to the profile management system:

  1. Allows to create an unlimited amount of profiles, all of which are name-able. Profiles are created as folders in the format profile{id}, as well as added to the profiles section in the config file, where their respective IDs and names are stored. Names are limited to a maximum of 20 characters. The abilities to add and rename these profiles, as well as do so with a default name, were also added.
  2. Aside from the "Reset" and "Reset All" options, "Delete" and "Delete All" were added, which allow the user to delete the currently selected profile, or all profiles. If all profiles are deleted, the next one to be created will be 1.
Screenshots

Main profiles menu Adding a new profile Renaming an existing profile

Closes #485.

Vankata453 avatar Jan 13 '22 19:01 Vankata453

As usual, I'm pointing out only negative points here, but it's because only those require intervention; what works well need not to be changed.


Design issues:

  • This is not retrocompatible with the old profile system, and offers no smooth upgrade path. Progress will be lost for all users. This is a particularly problematic issue given the Steam release, which shares save data across computers.
  • The hardcoded charset restriction is inconvenient and penalises languages that use other characters.
  • In addition to the above, the multiple restrictions on the name (maximum size, etc.) are not obvious until the corresponding error message pops up. This increases the complexity of a task that should be simple; it goes from a single click to a click + inputting a string + receiving an error message that requires manual intervention from the user for at most as many times are there are restrictions.

Usability & Appearance issues:

  • There are too many category separators for user comfort; wouldn't it be better to have all action buttons in the same category?
  • The error message for the restricted charset says only lowercase letters are accepted, but it accepts uppercase letters; also, uppercase letters are converted to lowercase without warning.

There are also code-related issues (handling FS errors, formatting, optimisations, etc.), but the issues listed above should be taken care of first, as they will probably require big changes in the code.

Proposed alternatives (for some on the issues only)

  • Instead of using a name-based profile system, use a number-based system, like multiplayer does.
  • Instead of using a name-based profile system, use a sprite-based system, similar to SMG2.
  • If a name-based system is strictly required, use a system similar to world names: generate a folder name by parsing characters, and inside put an info file containing the real name of the profile (or put it in an already existing file). This, however, has the downside of not having a clear and recognizable filename for certain languages.

Additional note:

What is the use case which requires more than 5 profiles? I read the comments on the linked issue, but it fails to mention that use case. Although I am not strictly opposed to removing the hardcoded restriction of the amount of profiles, we should make sure the increase in complexity is not only optimal, but also better than the problem arising from the use case.

If the reason why having an unrestricted set of profiles is merely because, let's say, speedrunners don't want to reset all their profiles each 5 runs, then increasing the number of profiles to 10 would most likely be enough. Now, surely there are other use cases, but those use cases should be mentioned so that we can find the optimal solution. If we do not know what the use cases are, we cannot find an optimal solution.

Semphriss avatar Jan 16 '22 19:01 Semphriss

Has anything been decided about this? If my questions aren't considered relevant, it's all good to merge this PR as-is.

Semphriss avatar Mar 01 '22 22:03 Semphriss

This PR is still a WIP. When I'm ready for a review, I'll be sure to mark it. But in the meantime, I decided to follow some of your points and I think about re-making most of the changes here, so the game gets data about profiles from the config + other issues mentioned.

Vankata453 avatar Mar 02 '22 05:03 Vankata453