Search Unity

[ANSWERED] "Authoritative Server"; how impassable are impassable objects?

Discussion in 'Multiplayer' started by rob_vld, Jun 25, 2015.

  1. rob_vld

    rob_vld

    Joined:
    Jul 9, 2013
    Posts:
    191
    HLAPI, C#,

    Assume the server map has an impassable object, the client has not.
    With the client i am able to cross this area, where the server player bravely follows...
    Using a sync character controller

    SERVER - CLIENT


    SERVER - CLIENT



    Is this supposed to be?
     
  2. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    in that example, the client is authoritative over it's position, so the server moves to the same position.

    There are plans to added server-side validation of the movement of authoritative clients to the NetworkTransform.
     
  3. rob_vld

    rob_vld

    Joined:
    Jul 9, 2013
    Posts:
    191
    That is great news!

    These plans, are they short-term(bug-patch-fixes) or long-term(phase 3)?

    Also, Sync Transform/CharacterController, will this get latency compensation, interpolation/extrapolation + question above?
     
  4. MartinLyne

    MartinLyne

    Joined:
    Apr 25, 2013
    Posts:
    30
    More info on NetworkTransform would be great too (couldn't make LAN movement non-jerky by changing the obvious settings?)
     
  5. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
  6. rob_vld

    rob_vld

    Joined:
    Jul 9, 2013
    Posts:
    191
    Thank you for your reply.

    As far as i know you do not have access to the internal handling of sync transform/character controller; doing it manually will loose you the automatic latency compensation(albeit unconfirmed that it is actually in) handled by UNET...

    So please enlighten me on how to set up the server to become fully authoritative over the clients...
     
    Last edited: Jun 26, 2015
  7. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    To be honest, I haven't used UNET yet. I can only provide general information.

    Basically, you send requests to the host/server (i.e. move forward, shoot, stop shooting, etc.), the server executes the requests, then sends you the updated game state.
     
  8. rob_vld

    rob_vld

    Joined:
    Jul 9, 2013
    Posts:
    191
    I appreciate your input, and linking me to gafferongames, but yeah, thats not how HLAPI UNET works... I am sure you can achieve this all by using the LLAPI...


    Nitpicking, but did you mean just clients?
    (If not, i wonder how that works...having an authoritative client and server )
     
    Last edited: Jun 26, 2015
  9. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    Might want to rephrase your question if you're interested in using an authoritative server :p.
     
  10. rob_vld

    rob_vld

    Joined:
    Jul 9, 2013
    Posts:
    191
    if you read that quoted sentence, it is not possible yet
     
  11. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    The "authoritative" client sends movement information to the server, where a callback function is invoked that allows that movement request to be accepted, rejected, or modified.

    Other clients are sent the movement of the object from the server, after this validation has been applied.

    So clients can move themselves to invalid positions (by cheating), but other players on other clients will not see the cheating player in the bad positions.
     
  12. rob_vld

    rob_vld

    Joined:
    Jul 9, 2013
    Posts:
    191

    In the unite 2015 UNET talk Democratizing Multiplayer Development with Erik Juhl

    At time index 42:10 he mentions that it is already possible to have a complete authoritative server setup if you wanted for your game code...
    I take it he is referring to the LLAPI stuff then?

     
    Last edited: Jul 2, 2015
  13. Necromantic

    Necromantic

    Joined:
    Feb 11, 2013
    Posts:
    116
    All of the new API is server authoritative if you set it up that way, no matter if high level or low level.

    What I do is send Inputs to the server, propagate them over the network and have local simulations while the server gets the final say on things like collision etc.