Added the PyGame tick to make the timing more accurate