x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

  • Each player has a player controller which gives them control of the game

  • The results of any actions by a player using a player controller would be replicated on the server, minus the performance issues.

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:

  • Does each player have a single player controller that gives them access to controls

  • Does replication mean that no one else has to take a performance hit from the actions (for example if a group of characters is moved, and needs to use event tick to work correctly, does that tick happen on everyone's machine?)

If anyone can help me understand or point me in the right direction that would be great!

Product Version: Not Selected
Tags:
more ▼

asked May 28 '19 at 11:15 AM in Blueprint Scripting

avatar image

Flohhhh
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

more ▼

answered May 28 '19 at 12:45 PM

avatar image

Shadowriver
37.2k 936 172 1116

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question