title: Achieving game engine determinism with threading
body: <p>I would like to achieve determinism in my game engine, in order to be able to save and replay input sequences and to make networking easier.</p>
  
  <p>My engine currently uses a variable timestep: every frame I calculate the time it took to update/draw the last one and pass it to my entities' update method. This makes 1000FPS games seem as fast ad 30FPS games, but introduces undeterministic behavior.</p>
  
  <p>A solution could be fixing the game to 60FPS, but it would make input more delayed and wouldn't get the benefits of higher framerates.</p>
  
  <p>So I've tried using a thread (which constantly calls update(1) then sleeps for 16ms) and draw as fast as possible in the game loop. It kind of works, but it crashes often and my games become unplayable.</p>
  
  <p>Is there a way to implement threading in my game loop to achieve determinism without having to rewrite all games that depend on the engine?</p>