Used for Replica3::QueryConstruction_PeerToPeer() and Replica3::QuerySerialization_PeerToPeer() to describe how the object replicates between hosts
R3P2PM_SINGLE_OWNER | The Replica3 instance is constructed and serialized by one system only. Example: Your avatar. No other player serializes or can create your avatar. |
R3P2PM_MULTI_OWNER_CURRENTLY_AUTHORITATIVE | The Replica3 instance is constructed and/or serialized by different systems This system is currently in charge of construction and/or serialization Example: A pickup. When an avatar holds it, that avatar controls it. When it is on the ground, the host controls it. |
R3P2PM_MULTI_OWNER_NOT_CURRENTLY_AUTHORITATIVE | The Replica3 instance is constructed and/or serialized by different systems Another system is in charge of construction and/or serialization, but this system may be in charge at a later time Example: A pickup held by another player. That player sends creation of that object to new connections, and serializes it until it is dropped. |
Return codes for Connection_RM3::GetConstructionState() and Replica3::QueryConstruction().
Indicates what state the object should be in for the remote system
If this object already exists for this system, should it be removed?
First pass at topology to see if an object should be serialized
Return codes when constructing an object
RM3SR_BROADCAST_IDENTICALLY | This object serializes identically no matter who we send to We also send it to every connection (broadcast). Efficient for memory, speed, and bandwidth but only if the object is always broadcast identically. |
RM3SR_BROADCAST_IDENTICALLY_FORCE_SERIALIZATION | Same as RM3SR_BROADCAST_IDENTICALLY, but assume the object needs to be serialized, do not check with a memcmp Assume the object changed, and serialize it Use this if you know exactly when your object needs to change. Can be faster than RM3SR_BROADCAST_IDENTICALLY. An example of this is if every member variable has an accessor, changing a member sets a flag, and you check that flag in Replica3::QuerySerialization() The opposite of this is RM3SR_DO_NOT_SERIALIZE, in case the object did not change |
RM3SR_SERIALIZED_UNIQUELY | Either this object serializes differently depending on who we send to or we send it to some systems and not others. Inefficient for memory and speed, but efficient for bandwidth However, if you don't know what to return, return this |
RM3SR_SERIALIZED_ALWAYS | Do not compare against last sent value. Just send even if the data is the same as the last tick If the data is always changing anyway, or you want to send unreliably, this is a good method of serialization Can send unique data per connection if desired. If same data is sent to all connections, use RM3SR_SERIALIZED_ALWAYS_IDENTICALLY for even better performance Efficient for memory and speed, but not necessarily bandwidth |
RM3SR_SERIALIZED_ALWAYS_IDENTICALLY | Even faster than RM3SR_SERIALIZED_ALWAYS Serialize() will only be called for the first system. The remaining systems will get the same data as the first system. |
RM3SR_DO_NOT_SERIALIZE | Do not serialize this object this tick, for this connection. Will query again next autoserialize timer. |
RM3SR_NEVER_SERIALIZE_FOR_THIS_CONNECTION | Never serialize this object for this connection Useful for objects that are downloaded, and never change again Efficient |
RM3SR_MAX | Max enum. |