Authorative Understanding

Options
RxMarcus
RxMarcus
edited September 2015 in Photon Bolt
I'm working on the basics of converting my multiplayer game from local only multiplayer to support online. I've gone through the getting started tutorial before and am now looking at the Advanced tutorial for examples and ideas of how to spawn my characters and move them over the network.

I'm having trouble following the advanced tutorial however. I'm noticing that while using SimulateOwner(), my server runs this code whether it is the Server created player, or its a client that joined the server.

I guess I don't fully understand what it means for a game to be Authorative. Does that mean that my server SHOULD be in control of all players and the client side is only sending input from the keyboard and mouse to the server?

My game is a 2D arena shooter, I assume I'd want to make my game Authorative?

At the moment I'm able to have the server spawn a player when the game starts, and a second player is spawned when a client joins. I'm able to move the player on the server side and it replicates the transform movement on the client side, but it won't work the other way around.

Thanks in advance

Comments

  • Wizzard
    Wizzard
    edited September 2015
    Options
    You only need to be authoritative if you plan on being persistent.
    For local coop games or games where nothing persists, it can be okay to not be non-authoritative.
    It is a lot easier to code a non-authoritative game in Bolt in my opinion.
    As for the Advanced Tutorial, you must use the sample and not your own project.
    Also, you cannot send commands from server to client - only vice versa!
    The server must move all clients as a result of the commands sent to the server.
  • RxMarcus
    Options
    Thanks for the insight guys.
    So to make sure I'm understanding correctly....

    Authoratative would most likely be used for a dedicated server setup where all players send commands to the server and the server ONLY handles player actions. (I assume this could also be done on P2P where one player is acting as the server)

    Non-Authoratative the clients handle player actions and let the server know when significant actions have happened and to let the other clients know?
  • Wizzard
    Options
    You have it exactly right - you make the choice which is easier but acceptable for your game