Clients
The client is the simplest part of the architecture because most of the actors will have the authority on the server, so in those cases, the work will be done on the server and the client will just obey its orders.
Here is an overview of the main responsibilities of a client:
- Enforcing variable replication from the server: The server typically has authority over all of the actors that the client knows, so when the value of a replicated variable is changed on the server, the client needs to enforce that value as well.
- Handling RPCs from the server: The client needs to process the remote procedure calls (covered in Chapter 17, Remote Procedure Calls) sent from the server.
- Predicting movement when simulating: When a client is simulating an actor (covered later in this chapter) it needs to locally predict where it's going to be based on the actor's velocity.
- Spawning the actors that only a client needs to know about: If you want to spawn an...