Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

optimization

Discussion in 'Multiplayer' started by llavigne, Jan 29, 2008.

  1. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
    I am reading in the doc that transforms get sent as 9 floats across an unreliable state synch. Scale is almost never changed in most games which economizes 3 floats. How does one filter out transform which shouldn't be transfered?
     
  2. larus

    larus

    Unity Technologies

    Joined:
    Oct 12, 2007
    Posts:
    274
    Use OnSerializeNetworkView to only synch the parts of the transform you need (note there is an error in the example script on that page, a C#/javacript mashup, the website will be updated with the fix soon). See the NetworkInterpolatedTransform script in the networking example project. It synchs the rotation and position of the transform with interpolation and a 100 ms playback delay.

    Also, if you use ReliableDeltaCompressed the scale is only sent once and never again, as it never changes.
     
  3. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
    yes delta does this but delta will introduce lag in constantly moving user objects.
    The serialize is what I want to avoid, lots of pipe make lots of leaks.
    So here is a wish for networking:
    non reliable state synchronization of transform have to offer option to filter out S, R or T.