preparations for saving/restoring game state