Jump to content

Image of the Day

#QuestOfDungeons is an old-fashioned dungeon crawler. #ScreenshotSaturday  #PS4share

https://t.co/1mztLegxeN https://t.co/DpYimg3MZb
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

How to synchronise game time with varying frame rates.

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Angus Hollands   Members   

858
Like
0Likes
Like

Posted 28 June 2012 - 10:27 AM

Hello everyone!
So, I'm working on multiplayer (just another day!) and I've gotten a system which I believe works quite well. However, I understand that when I implement this into a real game, I can't expect everyone to play at 60 frames per second.
Thus, I am a little stuck with how to proceed:
I can no longer get away with using game ticks as a base measure of elapsed time, because if the tick rate changes, so does the duration of time that a "tick" represents. Therefore i cannot treat a server tick as a client tick.
However, if I were to use purely time based approaches, it would be unlikely that I would be able to compare events processed on ever so slightly differing timings (i can compare gamestates at tick X, but not at time X because time X is very unlikely to be indentical, thus i'd have to interpolate or something).
How do commercial games circumvent such issues?

#2 SimonForsman   Members   

7621
Like
0Likes
Like

Posted 28 June 2012 - 11:04 AM

use a fixed timestep.

http://gafferongames.com/game-physics/fix-your-timestep/

Edited by SimonForsman, 28 June 2012 - 11:07 AM.

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.