Search Unity

Let's enable Authoritative Servers for Unity Networking

Discussion in 'Multiplayer' started by fastgamedev, Nov 25, 2014.

  1. fastgamedev

    fastgamedev

    Joined:
    Mar 27, 2014
    Posts:
    79
    Hi,

    Right now it is impossible to make an authoritative server because a hacked client can issue game-wide RPC, Network.Instantiate, Network.Destroy calls that will destroy the server and other clients. There are some workarounds to fix the RPC calls, but nothing to fix Instantiate and Destroy calls.

    I have submitted a feature request to fix this. If at all important to you, please vote for it:
    http://feedback.unity3d.com/suggestions/make-authoritative-server-possible


    ------- Feature request details:
    Please add Network.isAuthoritativeServer boolean. When true, the following happens:

    1. Client RPC calls go to server only. They are not propagated to other clients.
    2. All state syncs go from server to client only.
    3. Only server can call Network.Instantiate.
    4. Only server can call Network.Destroy.
    5. Only server can call Network.AllocateViewID.

    Thank you!
     
  2. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    456
  3. fastgamedev

    fastgamedev

    Joined:
    Mar 27, 2014
    Posts:
    79
    I sure hope Unity will make improvements to the existing networking. Quote from their blog:

    "For UNET, Phase 1 is what we call the Multiplayer Foundation – more on that in a bit. Phase 2 is where we build on Phase 1 to introduce server authoritative gaming with what we call the Simulation Server, we’ll blog about this later. Finally, Phase 3 is where we want to introduce the ability to coordinate multiple Simulation Servers through a Master Simulation Server. As usual, exact dates for this are not possible and of course things can change, especially after gathering feedback from our users. But we can say that Phase 1 will be part of the 5.x release cycle and Phase 2 is in R&D right now."

    So authoritative server is planned for UNET phase 2 which isn't planned for 5.x release cycle, Unity 6 then. Unity major release version are on two year cycles. So if I am reading this correctly, UNET authoritative server will be released in 2 years from now. That's a very distant timeline. The changes I suggested above seem trivial to make from the engineering perspective. Why not spend a few days of engineering time now and bring this important feature two years earlier?
     
  4. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    456
    It is likely because the existing 3rd party tools make it a non-issue. If you need an authoritative server setup there are people who have solved this issue already. It would not benefit Unity to make changes like this because it would add complexity, some have no need for those features and would just further complicate the process for them.

    I just can't imagine they'd make major changes like that when they're planning to soon overhaul it entirely.
     
  5. fastgamedev

    fastgamedev

    Joined:
    Mar 27, 2014
    Posts:
    79
    There are no 3rd party tools that offer a reasonable solution. uLink is too expensive, Photon / SmartFox don't have in-engine physics.

    Unity is actively supporting WebPlayer that is likely to be gone in a year replaced by WebGL. So what's the problem with making a tiny (in the overall scheme of things) effort to support existing networking? Games with authoritative servers are plenty.