Reproducible Behavior

Started by
3 comments, last by jbadams 16 years, 3 months ago
I've just been reading the article "Instant Replay : Building a Game Engine with Reproducible Behavior". In that article, the author wants to basically create a deterministic game state, and to do so, he basically locks the frame rate down. This is due to the fact that he wants to avoid integration inaccuracies that create minute differences in the game state. I can see that as a solution, but what if, instead of locking the frame rate, one simply recorded/propagated the state of an entity whenever it's input information changed? In the replay scenario he uses, interpolation and exponential smoothing can now be used to ensure the game state stays on track, and in a networked scenario, tracking important moves can insure that the client stays in sync with the server while still achieving lower bandwidth than just broadcasting the game state perpetually. At the cost of having to process slightly more data, the framerate (at least for the game state) can be unlocked. Is there some gaping hole here? Is this feasible? I think this is similar to what Glen Gaffer was writing about with his "important move system".
Advertisement
Why not just run your logic at fixed time-step, and update everything else asynchronously with interpolation as needed?

Also, read this. It may change your opinion on what "slightly more data" means. For example, 1500 archers and arrows, moving every step. Can you really send this much data, 20-60 times per second, when you could sent only mouse click coordinates 5 times a second?
Well, after reading that, it seems that a client-server architecture simplifies life a lot.
I do think that it would be better to just have a server running the simulation at a set timestep and the clients interpolating within that simulation. When you have one authoritative simulation, everything seems to get a lot simpler.
Okay, actually, I can see the point of the article, you want the game state to always be the same given the same inputs, so you lock the frame rate... of the game state.
The renderer can interpolate between frames, making life quite simple.
Quote:Original post by arew264
so you lock the frame rate... of the game state.
Exactly: Fix Your Timestep!

- Jason Astle-Adams

This topic is closed to new replies.

Advertisement