Does each client use a PlayerController class in multiplayer?
I'm a little confused about how to set up a multiplayer game (online).
My initial understanding of the setup was
This is important to me, because if every player has to do all of the calculations for every player's actions on their own PC at once, I don't think my game idea is valid performance wise. Whereas if the players only have to do the calculations for their own actions, and just see the server's replication of the other actions, it would work.
So my questions would be:
If anyone can help me understand or point me in the right direction that would be great!
PlayerController is in on local player client (if you have split screen you will have 2 or more of them) and it getting synced with the server, but it does not have player controller other players only server has access all of them. And it's mainly for security reasons not performance.
So what get replicated is actor state also if you have movement components those have special more optimize replication code with prediction, so movement of other players should not be calculated (other then related to movement replication, but it should not be as heavy as running full physics)
If oyu do tick on actor it will run on all machines (or else you disable tick on localy on that actor) , if you do tick on PlayerController it will only happen on server and client of that player
answered May 28 '19 at 12:45 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here