The CryENGINE networking implementation is a flexible setup used to communicate with game servers and other clients.
All network messages are sent from an independent networking thread in order to avoid network updates being crippled by the game frame rate.
Locally, each entity is represented by an entity identifier (entityId
). However, for network contexts, it is not viable to transmit these over the network as they are not guaranteed to point to the same entity on the remote client or server.
To resolve this, each game object is assigned a net object identifier represented by the SNetObjectID
struct, which contains a simple wrapper for the identifier and its salt.
When writing game code that serializes entities and entity IDs across the network, we don't have to deal with SNetObjectID
structs directly as the process of converting entityId
to SNetObjectID
(and back to entityId
on the remote machine) is automatic.
To make sure that your entity ID maps...