updated so that the game timing works and sprites move smoothly.
no need for constant update rate now, so update just before frame is drawn.