Facepunch / sbox-issues

175 stars 12 forks source link

Store realtime server data #4709

Open cs716 opened 9 months ago

cs716 commented 9 months ago

For?

S&Box

What can't you do?

How would you like it to work?

Access the LobbyInformation after GameNetworkSystem.CreateLobby(); or through another method available to the host and allow us to set options to the lobby that outside players can access for a matchmaking system or lobby browser such as privacy status, gamemode options that can be changed between lobbies, etc.

What have you tried?

N/A - No way to do this that I can find. For the time being (unless this is an easy implement or there is a way to do this that I'm missing) I'll be using an external API to store and retrieve lobby information by the Id.

I can see the two internal functions that may allow for this: image

Additional context

This was brought up by Carson previously in https://github.com/Facepunch/sbox-issues/issues/4482 but was a reply to the issue and doesn't appear to have been implemented

garrynewman commented 9 months ago

What kind of things do you want to store?

In the network system I'm trying to avoid using lobby specific features, because if you're running a dedicated server etc, it won't have a lobby.

cs716 commented 9 months ago

For my game, the state of the game in progress is mainly what I’m trying to store (like preparing, in progress, etc). The idea being players who want to get in and play aren’t joining lobbies where a round is in progress if they don’t want to.