Closed roydejong closed 3 years ago
Some quick & dirty notes on swapping master servers:
MasterServerEndPoint
is defined in NetworkConfigSO
→ masterServerEndPoint
property. It's Harmony patchable, and when unpatched it's based on _masterServerHostName
and _masterServerPort
(2328).It looks like the game reads the master server endpoint whenever you try to quickplay, host or join. That's good news because we can swap it out during runtime whenever outside of a lobby and it will work.
Official endpoints seem to be steam.production.mp.beatsaber.com
and oculus.production.mp.beatsaber.com
.
109abf6 adds basic support for master server swapping. The rundown is this:
I like this solution because it means even when you use a crossplay mod, you could still play a game on official servers if you want. Or even if you don't have a crossplay mod installed you may still be able to join the crossplay server this way.
A few things to check and tidy up before this is 100% ready:
If you have already a custom master (test) server running, could you also release this one? I would love to test around with this concept a bit more.
@jcoenen96 BeatTogether is probably closest to completion and it looks like they'll be ready for testing soon ("in a day or two").
This is now implemented and will ship soon 🚢
Background
There are some mods in development currently that will make it possible to use unofficial Master Servers for Beat Saber multiplayer -- essentially private servers that enable things like cross-play and custom matchmaking.
How this affects the mod
Server Browser uses "Server Codes" to connect games, which won't work if the match was created on a different master server. Therefore, we need to be aware which master server was used by the host and:
1) add filtering (only show games on your master server); and/or 2) support automatic master switching (i.e. we'll change your master server to the one used by the game's host so you can be connected, and switch back after the match).
Also, for the good news, we can disable platform filtering for master servers that support cross-play (presumably all unofficial servers).
How this affects the wider player base
When multiple master servers are out there, as well as the official servers, the risk is fragmenting the player base. I think Server Browser can help bridge the gap by allow you to discover and connect matches across different master servers.
Zingabopp has set up a central repository for future master servers (empty at the time of writing): https://github.com/Zingabopp/BeatSaberMultiplayerServerRepo/blob/master/MasterServers.json
Stuff to research
Some early things to research in preparation: