- Home /
Use MasterClient as Authoritative server (Latency Issue)
I'm trying to use masterclient as authoritative server as I need to simulate ball physics in gameplay. I'm just receiving inputs for other clients and perform simulations on masterclient and then photonview component syncs all positions and rotations.
Issue: I'm facing a latency on clients this is due to may be RTT(Round Trip Time),i.e, latency of my inputs from client and the resultant photonview syncing latency add up. Is there any way to resolve it.
Answer by Captain_Pineapple · Jan 22, 2020 at 08:18 AM
Hey there,
in short: as far as i know not while using photon...
Since photon messages (I'm gonna assume here that you are using PUN or PUN2) are going client->cloud->master->cloud->client you basically will always have something like double the trip time you could possible have.
my solution to the problem you have was to change from photon to a different networking solution which actually supports authorative servers. There is quite a list of them. i chose darkrift2.
how did you solve the issue in photon that everyone is sending to everyone else? did you also use a tricky system of groups?
Answer by KashiPashoria · Jan 22, 2020 at 07:09 PM
I permit only my master client to instantiate the network object hence only master client sends others.
I can't switch from photon to other networking at this point. Is there a way photon has dedicated server
as i said in my post: i am assu$$anonymous$$g you use PUN or PUN2. Those 2 only support peer to peer networking.
as far as i know photon has other solutions where there might be one that has server support. but those are not free i think.
3 weeks ago i migrated my complete project of 1.5 years to darkrift co$$anonymous$$g from photon. Took some days but works perfectly fine now. If you realise you need a "real" server then switch rather earlier than later. should have realised that way earlier.