Combination methods in multiplayer online turn-based games

Hi Nakama,
I’m creating a multiplayer match and allowing chat in it. But I don’t know how the logic is combined.

  1. Match + Party. Among them, Match for games and Party for text chat.
  2. Match: Match handles both games and chat messages.

=> For 1: Because there is a case when the room owner kicks a player out of the Match (forcing him out of the match), then how to kick that player out of the Party, because I can’t find a method? How to kick a player out of the Party.
=> For 2: Send a chat message in the room combined with a turn-based card game or like tictoctoe that is not fast-paced. Does it affect match load results?

I want to ask about the number of people in Party and Match for the system to work well. Can it be up to 50 per room?

Thank you.

Hello @dhforever,

The leader of a party can remove players from it using RemovePartyMemberAsync.

Sending chat messages to a room should not interfere with a match loop, regardless of it having a higher/lower tic-rate or being a realtime or turn-based game.

I see no issue with having 50 people in a chat room, just be mindful of payload size.

1 Like

Hi, There really is this method. My concern when researching carefully.
Thank you very much. I would like to ask if this method will kick players out of the party from the server?
(Some logic kicks people out of the room like Photon Pun: A person A will send person B a message telling him to leave the room and he will leave the room or not if he fixes the cheat code logic. Or if the person B has just press home to record the app in the background. Before the connection is over, it’s useless for A to send B a text message telling him to leave the room.)

func (p *LocalPartyRegistry) PartyRemove(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string, presence *rtapi.UserPresence) error {
if node != p.node {
return ErrPartyNotFound
}

ph, found := p.parties.Load(id)
if !found {
return ErrPartyNotFound
}

return ph.Remove(sessionID, fromNode, presence)
}

func (p *LocalPartyRegistry) PartyClose(ctx context.Context, id uuid.UUID, node, sessionID, fromNode string) error {
if node != p.node {
return ErrPartyNotFound
}

ph, found := p.parties.Load(id)
if !found {
return ErrPartyNotFound
}

return ph.Close(sessionID, fromNode)
}

I found this code on the server. Is that PartyRemove funtcion kick out of the Party? Thank you

Hello @dhforever, yes but this function is not exposed to the runtimes, please open an issue in the Nakama repository with a feature request and we’ll consider adding server side support for this in the future.

You can add some logic using something like notifications to force the player to leave the party. If the socket connection is severed the player is automatically removed from the party.

1 Like

Thank you so much.