|
|
|
 |
Attention |
Topic was automatically imported from the old Question2Answer platform. |
 |
Asked By |
Mora |
Hello
I’m what for my game an online hour because if I use the OS one the could change the time of the computer or phone.
Someone knows how to do it.
Thanks
|
|
|
 |
Reply From: |
wyattb |
One way to do it is get the time from online NTP servers. Example pool.ntp.org: the internet cluster of ntp servers
Another way could be to use a timer node. At the start of your code capture the ticks and then use timer to keep track of a counter. Compare the sum to the current ticks. If the sum hasn’t drifted by much just reset the start ticks to current ticks otherwise produce error.
https://gdscript.com/solutions/godot-timing-tutorial/