update game to limit framerate to 40 fps