Workshop › Lunar Lander › Step 8 of 31
A game loop moves the lander by its velocity and redraws the picture, about 60 times a second.
```js
function update() {
lander.x += lander.vx
lander.y += lander.vy
}
function loop() {
update()
draw()
requestAnimationFrame(loop)
}
reset()
requestAnimationFrame(loop)
```update adds the velocity to the position every frame.loop updates, draws, and asks the browser to run it again before the next screen refresh.update just above function drawLander() {, with an empty line between.draw() with the loop function and requestAnimationFrame(loop) as shown.Skills: The game loop