I’m planning to implement a private room feature which means host player will create a custom match and other players can join this game by a custom room password.
We have already implement a 4-players match by matchmaker that every player can join by automatic pairing. Private room feature is for the same game but with different match type. From docs, I see there’s match_create function from client-side, but it seems not to allow to bring parameters to create a custom match type. Would you have a suggestion for me about implementing that?
@renhades Are your multiplayer matches client-relayed after players are matched together or are you using the authoritative multiplayer engine with your own match handler?
Using authoritative multiplayer engine with your own match handler.
Sorry for unclear description. Our game must require 4 players.
What I want to do is:
Player can open a room and invite other players to join.
If all 4 players are ready, they can start to play game.
Is it possible to do that with authoritative multiplayer engine and won’t impact original auto-pairing match logic?
Authoritative multiplayer is a great fit for this. Match players into an authoritative match either through the matchmaker or match listings, then if the match isn’t full allow them to invite their friends. The invitations could be delivered over in-app notifications for example.
Once the match is full or at least has met your minimum threshold of players or wait time, you can start the gameplay itself. This would be governed by the authoritative match logic you write.
Thanks for the reply. Could you help check if my understanding is correct?
Matchmaker need at least 2 players to begin matchmaking so I cannot make a match with 1 players at first, and invite other players to join this match.
Maybe I need to implement a private room feature to invite other players by in-app notifications until match is full, and then, let all players start to matchmaker_add with same properties/query to start play in the same match?
You can create an RPC function that creates an authoritative match on demand, you’re not limited to only using the matchmaker. Once the user calls that RPC and joins the match they can then invite their friends.
The private rooms you’ve described would also work. Get people together first, then have one player find them a match and invite them.
Choose either of these methods based on what suits you best. I’d recommend the first one because it’s simpler to work with.