No (or default) room only a player list

Hi,

is it possible to add players to a default (call it main) room?
I want to create a turn based game, and before the game starts I want to keep a list of players how are currently online. Then, a player can invite another player to play a game, and when the game starts I will create a room for that game.

Is this possible?

Thank you,
Vasilis

Comments

  • Hi Vasilis.

    The room logic is not suited for having lots of players inside a single room. There is no hard limit, but if you put too many players inside that main room it may from a certain point on just not perform reasonably anymore.

    Photon Chat should be a much better suit for your needs: Just put everyone into the same Chat channel and let them send the invitations through Chat (Photon Chat is not restricted to text messages - you can send any type of data with Photon Chat that you could send with Photon TurnBased!).

    Nice side effect:even while actively playing people can continue to chat with their friends that are not inside the same room.
  • Hi Kaiserludi,

    Thank you for the reply.
    I am reading the online doc, and I think I know how should I set it up. But, once a user is connected to the Chat application, he has to join the "main" channel. How can I create this channel? If I set all users to subscribe to the "main" channel, will it be created only once?

    I believe that the game invitation will be handled by private messages. But, how do I send a private message? How do I get the sender ID?

    Thank you,
    Vasilis
  • KaiserludiKaiserludi admin
    edited October 2015
    Hi Vasilis.

    "If I set all users to subscribe to the "main" channel, will it be created only once?"
    Yes and that is exactly what you should do: let every Client use the same name for the channel to join and they will all end up in the same channel (as long as they connect to the same region and with the same appID and app version).

    "But, how do I send a private message? How do I get the sender ID?"
    Which Client SDK do you use?
  • VasilisVasilis
    edited November 2015
    Hi Kaiserludi,

    I can make sure to have the same appID and app version, but they won't be connected to the same region. I have players from all over the world, and I want them to be able to play against each other. Is this possible?

    With regards to the client SDK question, I will use the latest one

    Thank you,
    Vasilis
  • Hi @Vasilis.

    I was not talking about the Client version, but the Client platform/language. C#,C++, objC, JavaScript, Lua, Java, Flash - which Client are you using?
    Questions like "how do I send a private message" can be answered more precisely if we know which Client SDK you use.

    " but they won't be connected to the same region. I have players from all over the world, and I want them to be able to play against each other. Is this possible?"
    Regions are totally separated from each other. Clients in one regions can't communicate with clients in another region. The reason behind that limitation is that otherwise we would need to forward messages from one region to another, which adds latency. The whole purpose of having multiple regions for the clients to connect to is to reduce latency by not having to send messages to the other end of the world. Having players from all parts of the world playing against each other defeats this purpose.
    You need to decide what is more important for your game: If low latency is critical, then you need to let your players connect to the nearest region and accept that players from different regions can't communicate with each other.
    If making it possible for players in one part of the world to play and chat with players on the other side of the planet is more important to you than low latency, then you should let all clients connect to the same region.
    As a compromise you may also want to consider only using some, but not all regions, to not split up your player base too much.
  • Hi Kaiserludi,

    I will use both objC and Java clients. If time permits, I will also use the javascript client.

    If I have control on the region that players can connect to, then I prefer to have all players connect to the same region. I do not want to break my players list into regions, because there are players who like to play against other players, and those players might end up in different regions.

    If I have 100 players, and about 30 concurrent games, how much latency should I expect to have ?

    Thank you,
    Vasilis
  • @Kaiserludi,

    could you please reply to my question?

    Thank you
  • Hi @Vasilis.

    The latency is independent from your overall amount of players and rooms and only depends on the physical distance and the connection quality between client and server. Therefor different players will experience different latencies.

    For example if you have one player in the US and one in Japan and you let both connect to the Photon EU-cloud, then the US player may end up with a latency of 130ms and the Japanese one with one of 300ms (the intercontinental connections between US and Europe are considerably better than the ones between Asia and Europe). That would result in an overall latency of 430ms between the two players . It would take 215ms for a message from player 1 to reach player 2 and another 215ms for an acknowledgement from player that it has received the message, to get back to player 1.

    The values from my example are realistic for good stationary internet connections. However if the players are on mobile networks, then their latencies may be a lot worse.
  • VasilisVasilis
    edited December 2015
    Hi @Kaiserludi,

    I do not mind having a latency less than 2s. Based on what you wrote, such a latency would be the word case scenario.

    I will start working on the chat client then.

    Thank you for your support!!

    Vasilis
Sign In or Register to comment.