Messeges - How does Photon count them?

Basically, I'm working on MOBA game.
I have notices something very interesting:

When I use multiple RPCs in one frame, the messeges counter shows that messeges number grew only by 1.
The same time when I look at chart from photon web site, messeges number pick is very high!

I'm afraid to use to many messeges and reach limit.

Is the "Messeges Pick" coming from logging, or my game really uses so many messeges (I don't think so...) ?
Do Photon compress multiple RPCs to one messege, if they are being send in one frame?
If not is it worth making some kind of compressing multiple player actions to one RPC?

:confused: Please, can someone explain me how does it work?

If theese topic are somewhere in internet, please send me some links. I couldn't find any topic about messeges.
PS Sorry for my english


  • From what I've experienced:
    - Photon will try to buffer all RPCs from one frame into a single packet (or as few packets as possible).
    - Any RPCs that are targeted at the current player will be run immediately rather than after buffering.
    - Photon will send a couple of messages a second just for it's "keep-alive" system.
    - Using observable components will include packet data for that component several times a second, unless you don't put anything in the stream during OnPhotonSerializeView.
    - The last player in the room will send RPCs, but not call OnPhotonSerializeView as there's no-one to stream to.
  • The information, that photon buffers all RPCs from one frame is great!
    RPCs targeted at itselfs Client, being invoked immediatelly is important too. I think it may be, because Photon authors made it as optimalization not to send to many not needed packets.

    By the way I'm still considering about synching HP via OnPhotonSerializeView or RPCs.

    Thanks for reply :blush:
Sign In or Register to comment.