playMaker

Author Topic: Photon position sync lag  (Read 314 times)

Carmichael

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Photon position sync lag
« on: June 23, 2017, 11:05:10 AM »
Hi guys, so everything seems to be working great with photon, however i've bumped into a small issue,i have my players shooting at each other over the network and it works great, but traditionally with multiplayer games, position synchronization always has a minor lag, so when my player moves forward while shooting he shoots him self over the network but not locally, any ideas on how to solve this problem ?


big thanks!!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Photon position sync lag
« Reply #1 on: July 04, 2017, 03:03:18 AM »
Hi,

Yep, for this, you need to do several things:

-- totally optimize data you are sending over the network, it has to be the strict minimum, to keep bandwidth low.
-- increase send rate ( careful with costs, you only have 500 msg/s/player after it will cost)
-- depending on gameplay, implement extrapolation for data being received, but that's tricky, so experiment first

then, you need an authoritative way to define who gets hit by what, you can't rely on each client to check out using triggers and positions, it has to be done by one client, likely the Master. so the master is responsible for saying "Player 1 got hit by Player 2" and similar gameplay decisions.

Bye,

 Jean

Carmichael

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Re: Photon position sync lag
« Reply #2 on: July 06, 2017, 04:02:56 AM »
hi Jean, thanks for the advise, the game is a fast paced space shooter game, but this lag is causing so much issues with health syncing, due to the fact that the movement is a bit behind over the network, the bullet hit's the other player and reduces his health over the network but not locally, so while you're playing at a fast pace you see enough health but yet you lose because your health is actually empty over the network.

i would really love your input and wouldn't mind sharing a video with you.

thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: Photon position sync lag
« Reply #3 on: July 21, 2017, 12:09:58 AM »
Hi,

Have you considered using Truesync? it's a new system from Exitgames with reliable synchronized Inputs across network with a special physics engine allows true reliable simulation across network. this is likely what you need:

https://www.photonengine.com/en-US/TrueSync


 Bye,

 Jean

Carmichael

  • Full Member
  • ***
  • Posts: 222
    • View Profile
Re: Photon position sync lag
« Reply #4 on: July 22, 2017, 02:20:19 PM »
thanks for this information, i found a temporary scrappy solution but this is most likely what i need.
thanks!