properly animate, using requestanimationframe and use fps throttling to control snake speed