DemoProductions / shmup

3 stars 2 forks source link

Parallax scrolling #32

Closed ghost closed 8 years ago

ghost commented 8 years ago

A good start I think. Most code straight from the pixelnest tutorial and we'll edit to our needs. No enemy spawn yet.

Player and the main camera move. The background also moves and resets once it is not in view. Currently has two backgrounds side by side.

http://pixelnest.io/tutorials/2d-game-unity/parallax-scrolling/

flip40 commented 8 years ago

Any reason we have two scroll scripts on background? Other than that seems fine. We need to improve how the looping works of course, but it DOES loop, and scroll, so definitely a good start. Perhaps this was not updated, but reading your comment the solution to scrolling seems to be a second background that replaces the first (i.e. to the right) and then when the first is out of view, this causes the loop, while the second background is covering for the first one until the loop occurs.

ghost commented 8 years ago

There should not be two scroll scripts on background, I must have forgot to save the scene before checking this in. And yeah there are two background images that scroll, one replaces the other once it starts to get out of view.