moving background image horizontally

60 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 answers

0
delCano 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).