playMaker

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

LordHorusNL

  • Junior Playmaker
  • **
  • Posts: 78
    • View Profile
Photon Network Get Time/Timestamps[SOLVED]
« on: October 24, 2017, 11:43:04 AM »
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, 01:26:20 AM by jeanfabre »

jeanfabre

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

 I'll work on this. Should be available tomorow

 Bye,

 Jean

LordHorusNL

  • Junior Playmaker
  • **
  • Posts: 78
    • View Profile
Re: Photon Network Get Time/Timestamps
« Reply #2 on: October 25, 2017, 05: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: 12351
  • Official Playmaker Support
    • View Profile
Re: Photon Network Get Time/Timestamps
« Reply #3 on: October 26, 2017, 12: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: 12351
  • Official Playmaker Support
    • View Profile
Re: Photon Network Get Time/Timestamps
« Reply #4 on: October 26, 2017, 01:26:06 AM »
Hi,

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

Let me know how it goes.

 Bye,

 Jean

LordHorusNL

  • Junior Playmaker
  • **
  • Posts: 78
    • View Profile
Re: Photon Network Get Time/Timestamps[SOLVED]
« Reply #5 on: October 26, 2017, 10:52:12 AM »
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, 10:55:08 AM by LordHorusNL »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Photon Network Get Time/Timestamps[SOLVED]
« Reply #6 on: October 26, 2017, 10:43:12 PM »
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