ReplicaManager3
[ReplicaManager]

Third implementation of object replication. More...


Classes

class  RakNet::ReplicaManager3
 System to help automate game object construction, destruction, and serialization. More...
struct  RakNet::LastSerializationResult
struct  RakNet::SerializeParameters
class  RakNet::Connection_RM3
 Each remote system is represented by Connection_RM3. Used to allocate Replica3 and track which instances have been allocated. More...
class  RakNet::Replica3
 Base class for your replicated objects for the ReplicaManager3 system. More...

Enumerations

enum  RakNet::RM3ConstructionState { RakNet::RM3CS_SEND_CONSTRUCTION, RakNet::RM3CS_ALREADY_EXISTS_REMOTELY, RakNet::RM3CS_NEVER_CONSTRUCT, RakNet::RM3CS_NO_ACTION }
 Return codes for Connection_RM3::GetConstructionState() and Replica3::QueryConstruction(). More...
enum  RakNet::RM3DestructionState { RakNet::RM3DS_SEND_DESTRUCTION, RakNet::RM3DS_DO_NOT_QUERY_DESTRUCTION, RakNet::RM3DS_NO_ACTION }
enum  RakNet::RM3SerializationResult {
  RakNet::RM3SR_BROADCAST_IDENTICALLY, RakNet::RM3SR_BROADCAST_IDENTICALLY_FORCE_SERIALIZATION, RakNet::RM3SR_SERIALIZED_UNIQUELY, RakNet::RM3SR_SERIALIZED_ALWAYS,
  RakNet::RM3SR_SERIALIZED_ALWAYS_IDENTICALLY, RakNet::RM3SR_DO_NOT_SERIALIZE, RakNet::RM3SR_NEVER_SERIALIZE_FOR_THIS_CONNECTION
}
enum  RakNet::RM3QuerySerializationResult { RakNet::RM3QSR_CALL_SERIALIZE, RakNet::RM3QSR_DO_NOT_CALL_SERIALIZE, RakNet::RM3QSR_NEVER_CALL_SERIALIZE }


Detailed Description

Third implementation of object replication.

Enumeration Type Documentation

Return codes for Connection_RM3::GetConstructionState() and Replica3::QueryConstruction().

Indicates what state the object should be in for the remote system

Enumerator:
RM3CS_SEND_CONSTRUCTION  This object should exist on the remote system. Send a construction message if necessary If the NetworkID is already in use, it will not do anything If it is not in use, it will create the object, and then call DeserializeConstruction
RM3CS_ALREADY_EXISTS_REMOTELY  This object should exist on the remote system. The other system already has the object, and the object will never be deleted. This is true of objects that are loaded with the level, for example. Treat it as if it existed, without sending a construction message. Will call SerializeConstructionExisting() to the object on the remote system
RM3CS_NEVER_CONSTRUCT  This object will never be sent to this system.
RM3CS_NO_ACTION  Don't do anything this tick. Will query again next tick.

If this object already exists for this system, should it be removed?

Enumerator:
RM3DS_SEND_DESTRUCTION  This object should not exist on the remote system. Send a destruction message if necessary.
RM3DS_DO_NOT_QUERY_DESTRUCTION  This object will never be destroyed by a per-tick query. Don't call again.
RM3DS_NO_ACTION  Don't do anything this tick. Will query again next tick.

First pass at topology to see if an object should be serialized

Enumerator:
RM3QSR_CALL_SERIALIZE  Call Serialize() to see if this object should be serializable for this connection.
RM3QSR_DO_NOT_CALL_SERIALIZE  Do not call Serialize() this tick to see if this object should be serializable for this connection.
RM3QSR_NEVER_CALL_SERIALIZE  Never call Serialize() for this object and connection. This system will not serialize this object for this topology.

Return codes when constructing an object

Enumerator:
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


Generated on Fri Jul 22 08:28:34 2011 for RakNet by  doxygen 1.5.7.1