Updated the game loops such that dt can variate between a minimum and maximum value