question

entelicon avatar image
entelicon asked

Selective Game Servers

I was just wondering, when matchmaking, if you guys have any system in place where we can set game server states? For example, I would not want to connect to a game that already in progress when I can connect one that in a voting lobby.

If not, any idea on the best way to do something like this?

Custom Game Servers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Sure, you can set the servers to not be open to matchmaking using https://api.playfab.com/documentation/server/method/SetGameServerInstanceState.

6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

entelicon avatar image entelicon commented ·

But what if I still wanted them to have the posibility of joining, but save it for the last resort? I would have to have some sort of custom logic.

0 Likes 0 ·
brendan avatar image brendan entelicon commented ·

Could you explain the game flow you have in mind? Do you mean that players would join it by knowing the LobbyId (because a friend is in it, perhaps), or something else? What does "last resort" mean, in this context (given that you can always just start a new game server instance)?

0 Likes 0 ·
entelicon avatar image entelicon brendan commented ·

I would want to have my own matchmaking logic.

For example, if 5 servers are up, compare each one.

If a server is in the lobby state, prefer to join that one. If no servers are in a lobby state then find servers that have an opening in the gameplay state. If no servers are up then, then go ahead and spin up a new one.

Just trying to maximize the current servers that are up before creating a new one.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.