actor list in the lobby?

generative
edited February 2012 in Flash (deprecated)
hi.
yesterday i started looking into the photon cloud with flash. everything works fine with the chat example.
you create the room and join it. and in the lobby i get list of all the rooms.
is it possible to get the list of all users in the lobby on the master server?
or should i put everyone to some default room?
where could i find some list of possible operations in the lobby and in the room for photon cloud?

Comments

  • You can't get a list of players on the Master and you can't create games on it. It's purely there to find rooms, no matter how many are doing that, too.

    I assume you want to get some kind of pre-match chat?
    Use joinrandom to get players into any fitting room. If none exists, this fails and you should create a room.
    Set a maxplayer limit per room and close the room once the match starts and noone else should join anymore.

    On the Master you could JoinLobby and LeaveLobby, JoinRoom or CreateRoom and JoinRandomRoom. That's it.
  • Thanks for the reply.

    What is the maximum numer of players in the room?

    I need to do a list of available players so the user can select his opponent.
    Now i open a new room for each player that come to the lobby. I make two peers for each player. one is listening for the events from the lobby and the other one for the room.
    Is that the right way to do this?

    How do i set the game closed when the second player joins?
    i have set the number of players to two, but when the second player joins i still see that room in the lobby and i can still join the room although the max number of players is set to 2.
  • generative wrote:
    What is the maximum number of players in the room?
    Depends on your game. Each extra player will add update events to the equation. If you have a lot to update, then a low number is better. Without extra care, you might want to stay below 10.
    generative wrote:
    I need to do a list of available players so the user can select his opponent.
    Now i open a new room for each player that come to the lobby. I make two peers for each player. one is listening for the events from the lobby and the other one for the room.
    Is that the right way to do this?
    Please, let's agree on some naming, or else this gets very difficult to discuss. The "Lobby" is on the master, lists rooms and does not send events.
    You should not create 2 peers per player, cause each is counted as concurrent user and those are limited per license / subscription.
    Are you using the Cloud solution or hosting yourself?

    In the cloud, you can't modify the server side, so selecting a specific opponent will be difficult, cause we list only players names in rooms.
    To get all your "currently available to be challenged" players together, make one room with a max of 20 players or so. Get everyone inside. Then, when one player challenges another, send an event to that. React to this challenge event by either agreeing and make up a room name (unique guid or so) OR deny the challenge and nothing happens.
    If both players agree, they could go and create the room they agreed on. Those rooms have a max of 2 players then.

    generative wrote:
    How do i set the game closed when the second player joins?
    There should be a property for it in the Room class.
    generative wrote:
    i have set the number of players to two, but when the second player joins i still see that room in the lobby and i can still join the room although the max number of players is set to 2.
    There should be an override of CreateRoom() which takes arguments to make the room invisible. This is the way to keep it from the list and from being joined randomly. Both.
  • Thanks for all the answers Tobias.

    i'm using the cloud solution.
    is there any other problems with my approach or is it just the problem with concurrent user doubling before they start playing.
  • Thanks for share with us..!!
  • generative wrote:
    is there any other problems with my approach or is it just the problem with concurrent user doubling before they start playing.

    Doubling the concurrent user count should be the only problem with that.