How to limit the number of Rooms for the entire game?

Options
I am using free 20cc player limit key. I found that many ppl are making their own Rooms and not joining any. I would like to limit the number of rooms that can be created in my game to 4 only.

How do I do so? Please help I am not good at coding.

Comments

  • vadim
    Options
    Check PhotonNetwork.GetRoomList().Length before sending CreateRoom request.
  • I do not know where and how to put this. Is it suppose to be in "Room.cs" or "RoomInfo.cs" ?

    And if you can give me an example like this, that would be helpful as I am not good at coding.

    public override int GetHashCode()
    {
    return this.nameField.GetHashCode();
    }
  • Tobias
    Options
    You have to make sure people will try to join a random room before they can create their own.
    Instead of limiting things work on the usage of your game. Show them there are rooms and match them if possible.
    Use PhotonNetwork.countOfRooms
  • I have a lobby where people can choose 2 maps and and create room. As I mentioned before I am not good at coding at all, hence I asked for help here on how to limit the number of Rooms.

    If I was good at coding I wouldn't have chosen Photon.
  • Tobias
    Options
    "If I was good at coding I wouldn't have chosen Photon."
    Ouch. That hurt!

    Not related to your comment: Actually, we will help developers to use Photon but we can't help you code in general. Please try to learn things and do tutorials, etc. We can't help you beyond giving advice.
    Did you do the Marco Polo Tutorial http://doc.exitgames.com/en/pun/current ... marco-polo ?