Random matchmaking in photon chat

edited May 2017 in Photon Chat
Hi there,

We are using photon chat for a mobile game. Is there any matchmaking system built in photon chat. For example- four people can randomly join a "Channel" or create one if there is no existing channel? Or do we need to use some other photon product (For example, PUN can do matchmaking randomly. But it creates room not channels).

Thanks in advance!


  • Tobias
    Chat is for chatting. You can use PUN or the LoadBalancing API for gaming related tasks.
    Can you please elaborate why you chose chat and now ask for features?
  • quiieee
    Thank for the reply Tobias.

    Thing is, we are actually creating a chat application which happen to have built in mini games . And for the "games" part we are using unity. So it would be convenient for us if we could just use Photon chat .

    Anyways. We are doing things now this way - We are using PUN to do the matchmaking randomly(creating a random room) then we use Photon chat to do the communication among the room's players.

    Any advice on this^ way of doing things?


  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @quiieee,

    Thank you for choosing Photon!

    I'm interested in this approach and I would like to try it myself when I have time. I find it suitable for asynchronous games or turn-based ones where you open multiple matches at the same time with different opponents.

    Here is how I see it now (these are just thoughts and not tested):
    1. Always on Realtime's MasterServer
    In this case, code needs to be modified to add the shortcut:
    when operation response is returned from MasterServer for Create, Join or JoinRandom rooms do not follow up and go to GameServer.
    2. Leave Realtime's GameServer as soon as done with Matchmaking
    In this case, depending on your matchmaking process, you need to leave the joined room (leave GameServer) and return to MasterServer as soon as you're matched. This can be either:
    - when room is created
    - when room is joined
    - when room is full
    - etc.

    Other thoughts:
    1. Public channels as replacement for rooms:
    Chat channel names need to be equal to Realtime's room names.
    You create one chat public channel per realtime room.
    Send in game events as public messages.
    2. Aggregate messages per target receiver:
    Send in game events as private chat messages to target user and tag it with the room name (use complex data structure for messages that embeds/includes room name). This may be more suitable for 1vs1 games.
  • quiieee
    Thanks @JohnTube !
  • Aidin0181
    is it secure to not disconnect Client from Master to be in lobby and still in gameserver??????
    i think in this case we have some unknown OperationRequest from Gameserver to master or wisa versa.but it can be solve.for example check if the operation request is coming from a node on gameserver or masterserver.right?????? :#:#:#:#:#