lobby/team based/round multiplayer?

Hey guys, I am looking to get some insight on the most practical way to do team and round based Multiplayer with a lobby before the match starts, for example, each game needs a certain about of players, and it will start once all the players have joined in the lobby... once all the players join, it starts the game, and creates each team, and then there is X number of rounds based off a timer.
Where would be the best place to start? I am know it's possible but I am curious to hear what the most proper approach would be from some of the experts, like @JohnTube.

Thanks!

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited January 2017
    Hi @HooDoo,

    Thanks for the expertise mention but I think I still have tons of things to learn about Photon, Unity, game dev. and netcode to earn the title of expert.

    To answer your questions, in my opinion, here is a way to do team matchmaking in Photon:
    1. Random team members:
    - create rooms with max players set to team size * number of teams.
    - once inside the room assign players to teams, preferably by MasterClient and using room properties (to keep track of teams sizes or members) and actor properties (so each player knows to which team he/she belongs to).
    2. Party with friends:
    - create invisible rooms by party owner (one user) and set expected users to all party members.
    - send room name to party members so they can join.

    I think there is a basic teams PUN demo.

    For round logic, I think, it should be handled by MasterClient and maybe use PunRPC to broadcast round start and end events. So the MasterClient keeps track of time and round. You can also use room properties for the round.

    Please take a look at RockPaperScissors for how turn based is logic is implemented and maybe tweak it to make it suitable for the rounds logic.
  • Thanks very much for all the info @JohnTube
    Appreciate it a lot!