playMaker

Author Topic: Photon Network Get Time/Timestamps[SOLVED]  (Read 4980 times)

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Photon Network Get Time/Timestamps[SOLVED]
« on: October 24, 2017, 02:43:04 PM »
I need a action for the photon package to get the server time or more precisely the timestamps

Also would a action that gets the TimeSinceLastTick be possible.

Does something like this exist yet?
« Last Edit: October 26, 2017, 04:26:20 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Get Time/Timestamps
« Reply #1 on: October 25, 2017, 05:03:50 AM »
Hi,

 I'll work on this. Should be available tomorow

 Bye,

 Jean

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Re: Photon Network Get Time/Timestamps
« Reply #2 on: October 25, 2017, 08:32:10 AM »
Thanks jean very much appreciated!

Also would a "Switch Master" action be possible? So the current master can be switched to another client.

I believe photon supports this now.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Get Time/Timestamps
« Reply #3 on: October 26, 2017, 03:46:41 AM »
Hi,

 why would you want to switch master? Photon does that automatically. I don't recommend doing this at all to begin with, but maybe you have a use case?

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Get Time/Timestamps
« Reply #4 on: October 26, 2017, 04:26:06 AM »
Hi,

 ok, all available on the updated version on the Ecosystem,

Let me know how it goes.

 Bye,

 Jean

LordHorusNL

  • Beta Group
  • Full Member
  • *
  • Posts: 226
Re: Photon Network Get Time/Timestamps[SOLVED]
« Reply #5 on: October 26, 2017, 01:52:12 PM »
Thanks jean, the actions seem to be working fine.

As i inderstand it when host migration occurs photon does not pick the player with the least latency to migrate to, it just picks the next player in the queue.

So if a player with a weak connection is chosen to host, he can transfer those responsibilities to another client. (or in situation where the host expires after a certain amount of time)

I was also thinking it would be possible to make a vote system with this so players can choose to pick another master if the current client-host is cheating/abusive.

Atleast thats what i gathered from reading the photon docs.
« Last Edit: October 26, 2017, 01:55:08 PM by LordHorusNL »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Get Time/Timestamps[SOLVED]
« Reply #6 on: October 27, 2017, 01:43:12 AM »
Hi,

 Good answers :), however the major problem remains that for a given client, pings will be different from another, so to choose a host with the best connection means storing these value on a server and have the server do the math as to who is the best compromise to become the new masterClient.

bye,

 Jean