Nubie: How do buffered RPC work?

Options
Hello,

I was wondering how buffered RPCs work. Lets say that I have multiplayer game, where anything any player does all other players should see it since they are in the same room.

So for example one player picks up an object, so then I send buffered RPC to all clients so that they can update their scene to show that player has picked up the object.

Then the player puts down the object at a different spot, so I send another buffered RPC to all players to put down the object. Then another player picks up the same object and then drops it off some place else. Same buffered RPCs are sent again.

What if the game ran for hours, thousands of players picked up moved and dropped off different objects, probably some players logged off, and others logged on, with objects all in different places because different players move objects around. Each time buffered RPCs are sent for pick up/drop off each action.

Now a NEW player joins the room, will he suddenly get hundreds of buffered RPCS for each time all the different players of the past picked up an dropped off objects?

Can someone please tell me how it works and the proper way to code this scenario using Unity Photon PUN?

Thanks

Comments

  • Hi dreadlocks,

    Now a NEW player joins the room, will he suddenly get hundreds of buffered RPCS for each time all the different players of the past picked up an dropped off objects?


    Mostly, yes. Maybe some of the messages are removed by the server, when the client, who made these calls, disconnects. Currently not sure about that. However you might still have a lot of messages to be send to a newly connected player, who is not interested in what happened some minutes or hours ago.

    Can someone please tell me how it works and the proper way to code this scenario using Unity Photon PUN?


    For your described scenario you maybe want to have a look at the Pickup Demo from the PUN package. It uses RPCs without buffering them.