How to join a game in process (like many io games)

Options
Hi all,
I am trying to realize some join&leave features like many io games.
.player can join a game in process or create one if no room/ all room are full
.dead --> leave game
.game has 0 player-->destroy this game in server

But in the tutorial it is all about create room and make matching...
Need bit tips and clues.
Thanks

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @JUUEN,

    Thank you for choosing Photon!

    You can use:

    A- webhooks
    B- custom plugin
    C- custom server app
  • JUUEN
    Options
    Thx for reply :)
  • JUUEN
    Options
    @JohnTube
    Hi I may need bit more tips...
    To clarify I don't wanna create any room. Player will join a random game which is already in process. I am wondering if there is any good practice for this. The base tutor is about creating room and master start the game.
  • JUUEN
    Options
    @JohnTube
    I think I misunderstood the tutorials..sorry
  • Hi @JUUEN,
    You can use PhotonNetwork.JoinOrCreateRoom to do this.
    If there is room, you will join and if there isn't room, you will create and join.

    And Local player will get OnJoinedRoom() Callback and you can use PhotonNetwork.Instantiate to create gameObjects.

  • JUUEN
    Options
    @DmitryAgafonov
    thx. I read the tutor again and found I have misunderstood its purpose.XD