Description
Describe the new feature:
Right now the tournament client is not friendly towards having a setup for multiple tournaments. I've been moving around files multiple times to test out different videos, because I design graphics for tournaments, while using this client as well to run my own tournament. To make it easier for streamers and tournament hosts/graphic designers to manage files/setups across multiple tournaments a TournamentProfileManager
for the tournament client could be implemented.
This feature request also includes splitting up the current bracket.json into a mappool.json
(or rounds.json
), teams.json
and bracket.json
. This makes it easier for hosts that automate this data in their backend to publish this information to the streamers as this allows updates to just individual parts without having to re-download the whole bracket.json. This split up also makes it easier to manually make adjustments to teams in bulk using a text editor.
Proposal designs of the feature:
Changing the directory structure
In the current state the assets gets supplied in this structure
(%APPDATA%/osu)
tournament
┣ flags
┣ mods
┣ videos
With this feature the directory structure will change to:
(%APPDATA\osu)
tournaments
┣ mt-2020
┃ ┣ config
┃ ┃ ┣ bracket.json
┃ ┃ ┣ mappool.json
┃ ┃ ┗ teams.json
┃ ┣ flags
┃ ┣ mods
┃ ┣ videos
┃ ┣ header.png // A recognizable graphic of the tournament (UI Fluff)
┃ ┗ manifest.json
┗ owc-2021
┃ ┣ config
┃ ┃ ┣ bracket.json
┃ ┃ ┣ mappool.json
┃ ┃ ┗ teams.json
┃ ┣ flags
┃ ┣ mods
┃ ┣ videos
┃ ┗ manifest.json
┃...
A tournament package
A tournament package consists of the configuration folder containing the essential information to run a match and it includes all the flags, videos and mod icons in their respective folders. A manifest.json
is provided to differentiate between the tournaments in the UI.
The manifest.json
contains metadata about the tournament that will be displayed to the user in a dropdown menu on the SetupScreen
in the tournament client. This is the place where the user will be able to switch between profiles and create new tournaments.
Example of what could be in a manifest.json
{
"name": "osu! World Cup 2021",
"host": "osu! team",
"acronym": "OWC",
"ruleset": "osu!"
}
Creating a new profile in the client
On the SetupScreen
the user gets the option to create a new tournament profile. If the user presses the button, they will get presented with an overlay with the fields to provide the basic information about the tournament. After the user's input fields are validated and they press the Create Tournament
button they overlay will close and then an explorer window will open where they can place the necessary assets. They can then also use the client to create brackets, teams and rounds.
Creating an importable tournament package
When every tournament has a standardized file structure, a new file extension could be introduced. Two proposals I have are .oszt
or .ost
.
These are effectively zip files like the current osz
and osk
files that can be dragged and imported in lazer. The difference with regular beatmaps and skins is that these files will get imported to %APPDATA\osu\tournaments
(or the user's custom path for this).
The usage of this file could be expanded in the future once for example (advanced) skinning reaches the tournament client as well.
Migrations from the old setup
To prevent breaking everyone's tournament client, it's necessary to add migrations that safely splits up the bracket.json into the smaller respective files.
A migration for the currently stored tournament setup (videos, mods etc.) needs to be created as well. This migrates the existing files in tournament/
(if present) to tournaments/default
and creates an example manifest.json
for the user to modify.
Structuring it into pull requests
My proposal for this is that this gets split up in multiple smaller pull requests like this:
- Create a default tournament profile and the necessary migrations for the flags, mods, videos and other assets. (Add basic setup switching for the tournament client #9256)
- Split up tournament storage (bracket.json) into multiple files and add the necessary migrations for it to the default tournament profile.
- Implement detection of folders inside of the tournaments folder. (the profile could temporarily be hardcoded in steps 1 & 2)
- Add a dropdown menu to
SetupScreen
to choose between existing tournaments that are present. (Add the ability to switch tournaments to the SetupScreen #11118) - Implement file importing support for these packages
- Add a screen that allows the user to create a new tournament profile to provide assets.
- Implement the ability to dynamically change profiles in the client.
There's some other things I'd like to have added to this like dynamically importing assets from a server that the tournament host maintains, so that hosts just need to update the endpoint and the client pulls it whenever something has changed, but that is out of the scope here for now.