UltraStar-Deluxe / USDX

The free and open source karaoke singing game UltraStar Deluxe, inspired by Sony SingStarâ„¢
https://usdx.eu
GNU General Public License v2.0
812 stars 160 forks source link

More than 6 players #634

Open 1wojak opened 1 year ago

1wojak commented 1 year ago

Please, do not create duplicate issues Not really an issue but feature request - any chances to allow more than 6 singers simultaneously?

Actual behaviour

Tell us what happens

Expected behaviour

Tell us what should actually happen

Steps to reproduce

Please supply step-by-step instructions so that anyone with the same environment can reproduce the issue. Whenever you offer a description, imagine yourself in the shoes of someone who has never encountered this problem before and would like to know exactly how to observe it under a given set of conditions. Here is an example:

  1. Open the ultrastardx.exe
  2. Click on button X, then on the menu that appears, click Y
  3. Wait for 3 seconds, and note the appearance of an unexpected message

Details

Provide some additional information:

barbeque-squared commented 1 year ago

I already have this more or less working (9 players on one screen) on my own machine, but it makes already-hard-to-follow code even more difficult by adding about 3000 lines of near-duplicate code. That's not including some of the truly bizarre things that I ran into, like how in some places "the number of players" actually means "this is the x'th option from the possible values you can set the number of players to".

At the very least, testing if everything else still works properly would be way easier if most of this duplication/weirdness got taken care of first. #627 was the first of such an improvement, but that has already been stuck for longer than it took me to do 9 players 'the ugly way'. I'll probably create a fork one of these days and just implement it properly on there instead. You're not the first one to ask about more players, and I also want it.

1wojak commented 7 months ago

Hi,

are there any news concerning proper displaying of more than 6 players at once (either on one or or two monitors)? I have read that there are a few updates to the game and some of them include fixes/changes to number of players and dual-monitor. Does that have smth to do with the above matter? My use-case is 8 players wanting to sing simultaneously (either on 1 or or 2 monitors). Whenever we use more than 6 players the screen becomes unreadable.

barbeque-squared commented 7 months ago

@1wojak it should already be possible to run 8 players on 2 screens (doesn't work on a single screen). See the section on Configuration in the readme (ignore that it says 2 or 3 players per screen, it should also work for 4 or 6 players per screen but it was never documented, yay)

Damn it has been a year already? I am still working towards it, and I think my ~3000-line diff from a year ago is already more than halved (these numbers do not include theme files). I know there's still some deduplication left, but most of the remainder is probably stuff like "player 8 has that specific rectangle on the screen" which currently has to be hardcoded in like 7 different places. That also needs to become just a single place first.

I don't really have an idea when I'll get around to this specific issue. I know it's one of the more often-requested ones, but there's also other parts of USDX I want to improve in the meantime.

1wojak commented 7 months ago

Hi, it does not work for 8 players. It works properly on two monitors for up to 6 players but when changed to 8 there are only 3 players on one screen and another 3 on the second and there are no "singing bars" plus hitting escape generates error and crashes the game. Also choosing 8 players is not fully functional - first 6 are visible on the screen and the 7th and 8th can olny be created/personalised by hitting "right arrow" button and are not there on the screen - they appear somewhere above/inbetween the others. So it all works up to 6 players. 8 is still unusable for me.

barbeque-squared commented 7 months ago

Yeah the setting up of more than 6 players is a bit weird -- P7 and higher were just never defined in the theme files -- but at least that bit should still kinda work.

I can't say I'm surprised that it's doing weird things with 8 players on 2 screens. I'm going to suspect 12 players on 2 screens is also broken then. I've come across code in some of my refactorings where the variants for 8 and 12 players were just... completely absent.

Considering that Linux literally used to crash if you selected more than 6 players at all, I have some doubts about this ever having worked. Could you maybe check 2020.4.0 and 2017.8.0 if it worked in either of those? If not, then I really don't know why the options for 8 and 12 players were ever added in the first place.

The upside is that 8 and 12 players should be very similar code to the "4 or 6 players on 2 screens" code, so while there would be rough edges (because that code is a nightmare to work with) it would at least be functional in the short term.

s09bQ5 commented 7 months ago

Considering that Linux literally used to crash if you selected more than 6 players at all

if you built with special compiler flags

barbeque-squared commented 7 months ago

Considering that Linux literally used to crash if you selected more than 6 players at all, I have some doubts about this ever having worked. Could you maybe check 2020.4.0 and 2017.8.0 if it worked in either of those? If not, then I really don't know why the options for 8 and 12 players were ever added in the first place.

To answer myself: I was looking to do some refactoring in UScreenSingView and can now say with certainty that more than 6 players (across two screens) has never worked. It was started on (at the latest in 2016, probably just the player selection) and then just never finished.

It's broken to the point where short-term, I'm probably just going to remove the 8- and 12-player selection from the player setup screen. The way in which what currently does work (ie, up to six players across 2 screens) is implemented is also extremely hardcoded: it won't scale at all to, for example, 3 screens.

barbeque-squared commented 1 day ago

An update because I know people will end up on this issue from google sometimes:

Short term 8 and 12 player options are going to be removed entirely.

Long term I have enough experience now with USDX in general, and specifically my 9-player hack, to have a rough idea on how to approach this:

  1. The code that draws stuff on the screen needs more refactoring (but it's getting there)
  2. Support 1-6 players (effectively only adds 5 players on the 6 player layout initially)
  3. Spread players across the available number of screens
  4. Look into speeding up drawing/rendering (see point 5)
  5. Run USDX at native resolution (9 note areas on effectively 750x500 just doesn't work, but I already can't get 60fps on 1080p on certain screens)
  6. Figure out if it's worth it to keep certain parts of USDX customizable by the user, or at least simplify it (there's already a lot of hardcoding going on)
  7. Finally, have more than 6 players on a single screen

The bad news is that outside of 5 and 7, not much will appear to be happening on this front. The good news is that most of these steps are also going to enable new features/improvements to be added.