-
Notifications
You must be signed in to change notification settings - Fork 16
5. Networking Overview
Note This page only contains information related to multiplayer games. If you're developing a standalone game, you can skip this.
Target synchronization works out of the box and is relevancy agnostic.
LockOnTarget is designed to be local-authority. That's mean that the local player controls the Target and sends it to the server, which replicates it to other players. The system pursues completely different goals, unlike the shooting system, the combat system, the inventory system and others. By its nature, the system doesn't provide any benefits to cheaters, being purely optional in terms of gameplay, simply providing convenience for the player. But at the same time, the Server and other clients need to be informed.
Therefore, the system works locally, providing the following benefits:
- Eliminates latency.
- Frees the server from the tasks of finding targets (which is a relatively heavy operation).
- Facilitates calculations on the client by skipping irrelevant Targets.
- TargetComponent is not replicated. All dynamic changes should be synchronized manually.
- Only stably named TargetComponents with a replicated owning Actor can be captured.
- TargetComponent is serialized through the owning Actor, and Sockets are serialized as indices.
- Replicated data takes 1-26 bits and mostly depends on the NetworkGUID size.