moving background image horizontally

93 Views Asked by At

My Game

I made a game and all the images included in it is moving vertically. I would like to know how to move it horizontally.

1

There are 1 best solutions below

0
On

The jsbin you linked does not work on my computer, so there might be other problems.

Anyway, to make the Background move horizontally in your game, you find the function function Background(), and change this.y asignations to this.x (for example, this.y += this.speed would become this.x += this.speed).