Workshop › Flappy-style Bird › Step 15 of 30
The bird never really flies forward: the world slides backwards past it. Every frame of play, each pipe moves
PIPE_SPEED pixels to the left.
```js
const PIPE_SPEED = 2
for (const pipe of pipes) {
pipe.x -= PIPE_SPEED
}
```pipe.x -= PIPE_SPEED subtracts 2 from each pipe's x: it moves left.pipe.x changes the object inside the array, so draw shows it in its new place.GAP, write const PIPE_SPEED = 2.update, under bird.y += bird.vy, leave an empty line and write the loop.Skills: The game loop, Loops
← Draw the pipes A new pipe at a random height →