Search Unity

Unity multiplayer: revert time on server to verify client

Discussion in 'Multiplayer' started by androgles1994, May 23, 2021.

  1. androgles1994

    androgles1994

    Joined:
    May 12, 2020
    Posts:
    1
    I'm building a multiplayer game like Fortnite in 2d for fun as a hobby project.

    Right now I have the clients sending a command to the server then they want to shoot, but that makes it feel laggy on the client, as the shots are delayed a bit.

    I would like to give the client authority over the shots and let them tell if they hit something. But I still wanna verify in the server that the client actually hit the target that the client stated. How would I do that? I know I could send the timestamp and check if it was correct, but how ?
     
  2. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    168