CullArea

Options
I have added the cullarea to my flightsim.
This seems to work in the amount of updates it's receiving.

In other (older) posts i read that this does not influence the message send to save bandwith. Is this still the case?
Also, Is it possible to control the sendrate speed for the groups in any way?

Thanks

Comments

  • stevie
    Options
    ps the transform view is amazing!
  • Hi @stevie,

    In other (older) posts i read that this does not influence the message send to save bandwith. Is this still the case?


    Mostly. There is no message reduction when clients send their messages to the server. It might be possible to add this behaviour with some additional work, but currently we don't have any plans for this kind of feature. However the number of messages being sent from the server to the clients is reduced if clients are not staying next to each other and have subscribed different interest groups.

    Also, Is it possible to control the sendrate speed for the groups in any way?


    Yes, this is possible. When taking a look at the beginning of the CullArea script, there are three different arrays, each representing a different setting for the number of subdivisions set in the inspector. Let's take the first one for example. This is { 0, 1, 1, 1 }. This tells the system, to send one message to the global group 0 (in order to keep every other client informed about this client) and the next three messages to the group (not the global group) the client has subscribed to.

    When using default settings (20 messages a second) this means, that five messages are sent to the global group and 15 messages are sent to the 'specific' group each second.
  • stevie
    Options

    Hi Christian,

    Great thanks for your reply. This is all clear now.


    One more thing i've noticed is when i'm flying in formation with another player, the remote / proxy client seems to start to shake voilently the closer i get (i'm talking close as in 30 to 1 units).

    When OnJoinedRoom is invoked I spawn the local player, and Send and RPC to spawn a proxy on network clients basically as shown in the documentation. They both get assigned the same viewId. The proxy instantation is not done on the local client as shown. This is the proper way i'm guessing?:

    [PunRPC]
    void SpawnOnNetwork(Vector3 pos, Quaternion rot, int id1, PhotonPlayer np)
    {
    if (np.IsLocal)
    return;

    GameObject go = Instantiate(proxyPrefab, pos, rot) as GameObject;
    PhotonView[] nViews = go.GetComponentsInChildren();
    nViews[0].viewID = id1;
    }

    The difference between the local and proxy client is that the local uses rigidbodymovement and the proxy is moved by the transform view (which is observed) by estimating speed.

    So basically, the slower my own player goes, the smoother the others seem to go. I'm actually aiming for an arena based combat flightsim and I am aware of the limitations, but i'm trying to see how far i can get with on prem server (LAN) and a single room.

    Could this be network related or unity physics wise?

    I will most likely move over to onprem soon. Should i replay the positions by buffering a few perhaps?

    Thanks for your swift response.
  • stevie
    Options
    I'm sorry for the noob question above. It's fixed, we're flying smooth enough.

    I've tinkered around with some settings untill i got it right. It also had to do with rigidbody movement, fixed and late update issues.

    Only when flying real close now shows minor stuttering.
  • Hi @stevie,

    good to hear you got it working. You don't need to apologize for the questions, it's all fine. :smile: