[Time] Getting the server-synced time?

wiseone
wiseone
edited March 2022 in JavaScript and TypeScript

Hi there,

How do I go about getting the actual time from the server? I cannot seem to find any timing references in the Photon Realtime's JavaScript API.

I need this to get the game room's start time to get the room's end time. And, also to synchronize object movements that have deterministic patterns, and the best way is to use time, to avoid having to broadcast it when we already have possible issues with suspending master actors.

I also need it for pinging, although this is optional since I can work around this. However, I cannot work around the time for when the game room will globally end, or for when setting the object's movement based on time.

I'm baffled, I cannot imagine making any network games without timing features, is this possible? Am I missing something?

Please let me know.

Thank you.

Best Answer

Answers