Authoritative "master" player suitable for PUN?

I've been reading up on networking and from what I understand you'll want to have a single authority: either the server to simulate player inputs (which doesn't seem possible with PUN since it doesn't know about Unity physics and so on) or a single player to simulate other player inputs, and then send periodic updates to players to correct their predicted positions.

However, is the host-client model suitable for PUN? From what I understand all the clients are connected to a server, so sending and receiving data (Client 1->Server->Client 2) will take longer than the standard Unity networking (Client 1->Client 2).

Also, a quick off-topic question: Is there any way to send an unreliable RPC?

Thanks in advance.

Comments

  • Quick answer first: RPCs are method calls and always reliable. You can send updates that happen often in an unreliable way, cause if something goes missing, it's quickly replaced. However, RPCs are for less frequently happening calls/events and should be reliable.

    A fully authoritative server with physics is most likely something you don't want to run for your customers. Despite removing two hops for the messages, it will suffer from lag, not automagically look good and ultimately, it's going to be expensive on the server side due to higher hardware demands.
    That said: You could run a Unity instance per level for a lot of users on the server side, if you wanted to. Photon can do the connection, do account work and pass simulation-related data to a headless Unity instance.
    This has been done before but it's not working out of the box. On the other hand, just running a Unity instance on the server does not run out of the box (for lots of users) either.

    In best case, you try to figure out with how few syncs and checks you can get away. If it looks ok and few people can cheat, then everything is ok. Usually, this does not require a fully authoritative server.