Play icon indicating copy to clipboard operation
Play copied to clipboard

online multiplayer mode

Open basisbit opened this issue 5 years ago • 3 comments

Issue type: Feature request

Actual behaviour

Currently UltraStar Play does not support playing karaoke together with friends who are not in the same room/location.

Expected behaviour

The game should support some multiplayer mode where users can use their own device or share a device to and play together with users of other devices running UltraStar Play.

Topics to consider

  • [ ] how can different devices find each other? maybe some online matchmaking / party finder website that could be hosted on usplay.net
  • [ ] we probably don't want to rely on commercial-only Unity online services.
  • [ ] consider using a network multiplayer framework that supports various platforms that Unity supports. Maybe something like this: https://github.com/MidLevel/MLAPI
  • [ ] local multiplayer might be nice eventually
  • [ ] decide on what development path to take. The first iteration of the multiplayer feature should only contain what would usually be considered the minimum viable product (MVP). Once that is implemented, more developers will probably help developing the fancy features.
  • [ ] people have different song file databases with different variations of song txt files - how should matchmaking work and still be fair? For legal reasons, the online multiplayer mode may not exchange / transfer / store any lyrics or song txt files or similar. Maybe a md5/sha1 hash of the song txt files minus the headers could be used as song "identifier" and to support party match making.

basisbit avatar Nov 29 '19 15:11 basisbit

This blog post names possible libs. Out of these, free open source solutions seem to be MLAPI and Mirror.

MLAPI will be the starting point for Unity's upcoming networking solution. They just released some docs.

I already tried the current state of MLAPI in a branch (anst/mlapi). It is quite nice to implement mulitplayer features. It supports all that is needed for USPlay.I think implementing multiplayer this way could be relatively simple. MLAPI should be included in Unity's next major release.

So I suggest to wait until then before digging deeper.

achimmihca avatar Apr 02 '21 10:04 achimmihca

  • people have different song file databases with different variations of song txt files - how should matchmaking work and still be fair? For legal reasons, the online multiplayer mode may not exchange / transfer / store any lyrics or song txt files or similar. Maybe a md5/sha1 hash of the song txt files minus the headers could be used as song "identifier" and to support party match making.

Regarding this point, maybe some kind of "song normalization" (performed internally, without touching the actual text file, or only with user consent) could be performed. Meaning, e.g.

  • doubling BPM and note lengths for low BPMs (until 200 < BPM < 400 for example)
  • normalizing pitch values (e.g. to center the mean/median around 0), some songs are in the 60s and above, especially some songs derived from SingStar
  • adjusting GAP so that first note starts at zero
  • normalizing line breaks (halfway between end of last note of previous line and beginning of first note of new line)
  • Shift spaces between words to end/beginning of syllable (consistently)
  • Capitalize/uncapitalize first word of each line
  • etc.

Basically, these are all tasks that UltraStar Manager can already perform. This way, seemingly different versions of song files are identical after all (without changing the relevant content).

bohning avatar Apr 02 '21 11:04 bohning

#265 mentions a possible UI for song selection with multiplayer

  • Multiple remote players want to decide for a song
  • Alternative (a): Synchronize song browsing
    • Only songs can be selected that all players have in their lib
    • If a player selects a song, then other player's UI is synchronized with this state
    • Similarly, mic selection and enabled players have to be synchronized
  • Alternative (b): Each player can decide for a song independently, but can continue only after all decide for the same
    • Show player choice somewhere near song
  • Only show songs that both players have in their song lib
    • or mark other songs as disabled / not available

My vote for Alternative (b) and songs that not all players have are disabled.

achimmihca avatar Jan 16 '22 09:01 achimmihca