Large number of players but low message in a room.

We are creating a social game where it requires thousands to tens of thousands of players playing in one room. However, it requires essentially sending a final score to the master, so 1 msg for whole session. Is it doable with PUN ? (I know photon room technically limits the player cap at around 2million, but is there other technical issue) . And is there another product that's more suitable for this scenario. Thanks!

Comments

  • Hi @StephenG,

    Thank you for choosing Photon!

    Check out the answer to this question from our FAQ page.

    You should know that:

    broadcasting an event to everyone inside the room results in N + 1 messages
    multicasting an event to everyone else inside the room results in N messages
    unicasting an event to a single actor inside the room results in 2 messages

    we recommend 500 messages / second / room.
  • Hi @JohnTube ,
    Thanks for the timely reply. So in the case where of more than 500 msgs/s/room, what will happen, and is there a way to combat it? In our game, we need to broadcast msg from master to thousands of clients, but very low frequency, say 1 broadcast per 10 seconds.

    Stephen
  • There's really no way to prevent overflowing the 500 msg/s per room when sending a message to thousands of people.

    Because if you sent 1 message to 5,000 people.
    You just did 5,000 messages in a second.

    Now you might can work around this issue if you have a backend system and have clients speak to a backend system outside of Photon, but how you'd go about that is up to debate. As there are many different ways to do that, but only you could guess as to what route to take.

    Now there is possible another way to go about doing it, have the master client gather a set number of players, and send them message to them, then gather then next set of players and send, etc. But the problem with that is, nobody would be in sync at the same exact time or even close to the same exact time.

    But in reality, what you're wanting to do, just isn't realistic with PUN, now Photon Server, your all game.
    Just gotta set it up to work the way you'd like.
  • @N1warhead , thanks for the reply. The sending msgs to different groups of players asynchronously is a smart idea, since our game doesn't care too much about perfectly in sync.
  • N1warheadN1warhead
    edited February 9
    StephenG said:

    @N1warhead , thanks for the reply. The sending msgs to different groups of players asynchronously is a smart idea, since our game doesn't care too much about perfectly in sync.

    That's great to hear!
    Hope that works out for ya mate.

    EDIT: Just make sure to send the messages to the next group on the next second, so you don't pass the limit.
Sign In or Register to comment.