From what I can tell, RPC calls are send as "reliable delta compressed" no matter what, i.e. always received in the order they were sent, and never dropped.
I would like to be able to send RPC calls as "unreliable", is this possible?
From what I can tell, RPC calls are send as "reliable delta compressed" no matter what, i.e. always received in the order they were sent, and never dropped.
I would like to be able to send RPC calls as "unreliable", is this possible?
Check out uLink. It has support for unreliable RPCs:
I just can suggest you to use unreliable NetworkView synchronization to make unreliable RPC calls. But you have to implement everything by yourself.
I guess something like this (not tested, set sync method to "unreliable").
string lastUnreliableRpc = string.Empty; // you should use a queue here.
public void UreliableRPC( string foo )
{
lastUnreliableRpc = foo;
}
public void OnSerializeNetworkView( BitStream stream, NetworkMessageInfo info)
{
if ( stream.isWriting )
{
// send your rpc.
SerializeString( stream, lastUnreliableRpc ); // implement this :)
lastUnreliableRpc = string.Empty;
}
else
{
// receive rpc and execute.
string rpc = DeserializeString( stream ); // implement this :)
if ( !string.IsNullOrEmpty( rpc ) )
Invoke( rpc )
}
}
This really not the same as an unreliable RPC call.. it cannot be called when I want it to, and it uses network bandwidth when it isn't used (I suppose I could turn it off when it isn't used). This is probably how I will solve my problem, but it will require some more code, which I like to avoid.
– Atnas1010
Thanks a bunch. This has really bugged me for a long time :)
– Atnas1010