Multiple MatchHandler Flow

Hi I’m new to Nakama, I just want to confirm if my idea is right for having multiple matchHandler with different tickrate.

  1. So let say I have a LobbyMatchHandler with tickrate of 1 and GameMatchHandler with tickrate of 30.
  2. When all players are ready in LobbyMatchHandler and the host/roomMaster start the main game on client side,
  3. It will send an rpc to signal the LobbyMatchHandler to end the MatchLoop and call MatchCreate to start the GameMatchHandler thus it will give a new matchID to be broadcasted to the players.
  4. The new broadcasted matchID will be used in Client side so players can join the GameMatchHandler.

Is my idea correct or is there any better way to do this to transfer players between match handler?

Hello @Shuin,

I don’t think you need step 3 via an RPC, the “roomMaster” could just send a “start” message to the lobby match handler that would trigger it to call nk.matchCreate(), broadcast the resulting new match matchID to all players in the lobby and return nil after some ticks terminate itself. Meanwhile the clients disconnect from the lobby and connect to the match with the higher tickrate.

Hope this helps.

1 Like