Using requestAnimationFrame to refresh game state