How to make "unreliable" RPC calls? (as opposed to "reliable delta compressed")

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?

2 Answers

2

Check out uLink. It has support for unreliable RPCs:

http://www.unitypark3d.com/developer/manual-ch4.html

Thanks a bunch. This has really bugged me for a long time :)

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.