time synchronization on server & client

Started by
1 comment, last by MichaeldeJong 12 years, 4 months ago
Hello there.
I've got a float variable that increments every frame on the server. How do I synchronize this value with the timer on the client side since
the client needs this?

Thanks.
Advertisement
Not know your specify problem.

If your app is real time, carry that time in every net response. In real time app you of course continuously communicate with the server.
If you app is not real time, sync the time in every reasonable period. 1 second, 5 seconds. 1 minute, whatever. You client needs to remember the time and use local clock to increase the time until next sync.

https://www.kbasm.com -- My personal website

https://github.com/wqking/eventpp  eventpp -- C++ library for event dispatcher and callback list

https://github.com/cpgf/cpgf  cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.

Thanks. I got it working now.

This topic is closed to new replies.

Advertisement