Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed New Feature: In-game Profile creation, update and selection #35

Open
fisyher opened this issue Aug 14, 2020 · 5 comments
Open

Comments

@fisyher
Copy link
Collaborator

fisyher commented Aug 14, 2020

Currently all modifiable configurations are saved in plain config.ini file. Certain fields such as CardName, GroupName and NameColor are not configurable in-game.

This new feature should allow in-game creation of Profiles. Each profile stores CardName, GroupName, NameColor as well as System and Play settings. Profile should be switchable in-game to allow quick-swap of players without restarting Dtxmania.

The first step to implement this feature is to find a more scalable form of data storage or database. I have already port all config.ini fields to a sqlite database file in a separate branch named config_ini_to_sqlite. Please feel free to test the branch and provide feedback.

@ericpignet
Copy link
Collaborator

Good job!

My 2 cents:
I think a config profile would not be enough to really allow quick-swap of players, as all players would share the same score.ini files. Because of that, if I had several people playing in my household I would probably use multiple DTXMania installations. I think the main interest is when the same user has different configs depending on the song (for HH-x, FT-x, BD-x etc. options).
But if in the future we could also migrate the song.ini files (and possibly songs.db/songlist.db) into the SQLite DB, in order to also make scores per-user, then it makes perfect sense.
That would also make it easier to develop enhancements with stats/highscores/progress over time etc.

Regarding the code, I think that could have been better to keep ConfigIni.cs to be able to at least load the existing config, which would then be saved into the SQLite file, and possibly export it too (per user), to be able to move easily between the different DTXMania versions.

@limyz
Copy link
Owner

limyz commented Aug 17, 2020

This is a fork from issue #23, will keep this open for continuity.

@fisyher
Copy link
Collaborator Author

fisyher commented Aug 18, 2020

But if in the future we could also migrate the song.ini files (and possibly songs.db/songlist.db) into the SQLite DB, in order to also make scores per-user, then it makes perfect sense.

I didn't mentioned it in the first post, but I do intend to migrate score.ini files and songs.db into SQLite DB as well. This is but just a starting point to eventually have a Scores per user feature.

While I agree that a feature to import config from an external file into SQlite DB may be useful, I do not think keeping Configini.cs helps at all. It is a hot mess, parsing and writing ini file manually line by line. Also, all data members are copied over to ConfigDB.cs anyway so there is no loss of important information. A separate new implementation would be much cleaner.

@ericpignet
Copy link
Collaborator

Well as soon as you keep the hot mess for import only, I don't think it matters too much. That would just save you the efforts of writing the parsing code again just for import.

By the way, I believe there are quite a few technical options in config.ini which are not configurable in the UI. Are you planning to implement them in the UI? If you don't plan to, the import function is quite important as it's the only way to apply these options to your config.

@fisyher
Copy link
Collaborator Author

fisyher commented Aug 19, 2020

Yes, I am aware that some of the options are not configurable in-game. I do plan to add some of them in the UI; need to review which ones make sense to be configurable in UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants