Preserve game state, added some logic in the Render thread to avoid a
potential bug caused by double buffering