Global time resp. timesteps

While breaking down our game logic into GLOs I found the need for an universal time which is the same on all slices. Many operations are based on time and it needs to be ensured that the time on all slices is the same to make those calculations possible. If the time on different slices are not synchonized calculations using time would be dependent on which slice they are performed and some strange situations might occur where the time seems to go backwards. A simple solution to this would be a precise global time which you could access through the SimTask object instead of requesting the system time of a slice.

Ragosch

I would not count on having VERY precise synchronized time. Some general level of synchronization, sure, but a guarantee that one server will see the later time then the server which have just comitted the transaction… I don’t think so. In truly distributed systems such things are solved by logical clocks.

Now, said that, we may think about requesting some kind of Lamport/vector clock in SGS provided on low level. What would you use it for ?

Synchronization at the level of ntp is certain yl doable.

In fact, if youa re using Solaris as your OS you can just run and NTP client and then use the exisiting Java time functions.

The biggest issue is synchronizing the client clocks. In the past Ive garbebd open source versions of SNTP and modified them to give me a “sntpCurrentTimeMillis” call in my code base…

Calculation of the physics basically, there a precise timer and a uniform time across all slices is vital.

Ragosch

IME NTP is remarkably precise, especially if you are running a local NTP time server that everyone is synching to.

Good idea, Jeff, thank you, I already found a german company which has ready-to-run hardware for this.

For your information here the link to this site: NTP-Hardware

Ragosch