Setting up Client-Side Prediction and having the MasterClient keep the authoritative game state.
Options
Hi guys, I'm setting up a small multiplayer RTS game with PUN 2 in Unity. I know PUN uses a client-authoritative model, so I'm trying to use a 'dumb-client' model where every player in the room issues their commands to the master client, which sends the updated game-state back to the players. After that I will implement client-side prediction so that it seems instantaneous to the client while really it takes a little bit for the master client to get back to them, and as long as the client had the correct gamestate X ms ago (where X is the ping to the server) then it should be good, otherwise it will be corrected.
My question is regarding doing this with PUN 2. From what I've read, I will have to do this all manually with RaiseEvents. Does anybody here have experience setting stuff up like this in PUN? It seems like it's really going to be a pain. I'm pretty new to this so I feel it's going to be a STEEP learning curve. Any suggestions on how I can implement this so it's simple and effective is greatly appreciated, thanks.
My question is regarding doing this with PUN 2. From what I've read, I will have to do this all manually with RaiseEvents. Does anybody here have experience setting stuff up like this in PUN? It seems like it's really going to be a pain. I'm pretty new to this so I feel it's going to be a STEEP learning curve. Any suggestions on how I can implement this so it's simple and effective is greatly appreciated, thanks.
0
Comments
-
Hi @matthewjd24,
PUN does not do any client side prediction.
Regarding Master Client, here is what you need to know.
RaiseEvent is a key to all custom logic yes.
Did you consider Photon Bolt? Not sure it has what you need but it may be suitable for you.0