Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Discussion How dangerous is client-side authority for multiplayer games?

Discussion in 'Multiplayer' started by Duck_With_Grape, Jan 11, 2024.

  1. Duck_With_Grape

    Duck_With_Grape

    Joined:
    Sep 6, 2021
    Posts:
    30
    I am building a game where you fly a plane with up to 4 of your friends and work with ~4-9 other groups of random people in their own planes to protect a blimp (or, at least that's the early idea). I have had a good enough experience with multiplayer programing, so I figured I would give a shot at trying to put a game on steam, but I was wondering how much I should trust my players. Can I get away with having the movement of my players and planes be handled on the client side since I am running a casual co-op game, or will my game likely get flooded with bots or other hackers before I have a chance to get a steady playerbase? I imagine that I probably need server-authoritative movement because of the random matchmaking but wanted to see what smarter people had to say about the issue.

    In other words, can client-side authority for certain game-impacting mechanics such as movement work in casual games with a steady player base?

    QUICK NOTE: By client-side movement, I mean that the client tells the server where the player is at, and the server just goes "ok" instead of where the client asks the server to move the player. Think this should be obvious but I don't want to waste anyone's time by having them have to ask for clarification.
     
    Last edited: Jan 11, 2024
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,079
    We usually recommend making a fun game first and foremost. Sure it can be attacked and hacked but that usually doesn't happen when there are no players around. Then again, it can be quite a bit of work to change authority should the game become a hit.
    As you target Steam, I would suggest to go with Host mode and put the authority on some user's machine. It should not be a lot of extra effort and especially on Standalone, it is a feasible option which reduces the attack options.
     
    Lurking-Ninja likes this.
  3. Punfish

    Punfish

    Joined:
    Dec 7, 2014
    Posts:
    411
    You would be surprised how many very popular games are client-authoritative. Most games don't have an issue with hackers until they are successful. So unless you're specifically targeting aggressive competition or cash prizes, I agree with tobiass - make your game fun and take the easy route to start.
     
    tobiass likes this.