Cached Server Messages Possible?


I've been using Pun since a while now and always had problems figuring out a good balance of maxplayer and sendrate.
My old game "Ratz Instagib" uses 8 Msg/s for a max of 8 Players, which results in ~512 Msg/s.
It's a fast paced fps so 8 updates are very very low for that.

As far as i understood, the Photon Cloud Server does not cache any information, it instantly sends stuff to all players.
What if the server would wait 200ms(5Msg/s), and cache stuff like all player positions it receives in that time and then sends one Msg with information of all player positions to every player.
So instead of 10players*10players*5Msg/s = 500,
it would be 10players*5Msg/s + 5CombinedServerMsg/s = 55.

That's kind of possible if you send player positions to the masterclient only, who then does the caching and sends the big package back to all the other players. But that causes delay... since the information has to travel an indirect path.

So what am i missing here, why does it not work like that?



  • JohnTubeJohnTube mod
    edited January 10
    Hi @Lizzard4000,

    I moved this discussion to Photon Server category.

    The answer is simple:

    With Photon Cloud the choice is to rely on client logic and server is just a simple relay.
    However, if you want to have this you can achieve it using your own custom server-side code as there is no generic way to do this.
    Photon TrueSync (new one at least I think) and Photon Quantum may be doing what you suggest for client input.
    It is also not as easy as it may sound, as you need to consider worst-case scenarios, e.g. during 200 ms if the server does not receive the update from one player, etc.

    This does not look right to me:
    it would be 10players*5Msg/s + 5CombinedServerMsg/s = 55.

    It should be instead:

    10 players * 5 msg/s * 2 = 100


    every player sends a message to the server 5 times a second
    the server sends 5 aggregated messages to each player
  • Thanks @JohnTube !
    That clears things up for me. : )
  • JohnTubeJohnTube mod
    edited January 10

    Just to be clear, what I meant by "your own custom server-side code" is one of the following options ordered by recommendation:

    1. Photon Realtime (Game Server) Plugins
    2. Extending Photon LoadBalancing Server Application
    3. Making your own Photon Server Application from scratch
Sign In or Register to comment.