Is this possible: Per Layer Unbounded Scrolling

Get help using Construct 2

Post » Sat Dec 22, 2012 9:19 pm

Hi All!

I am creating a twinkly star background.
Top Layer is set to 100,100 Paralax. (solar system)
Sub Layer is set to 10,10 Paralax.   (Stars)
Bottom layer is set to 5,5 paralax.   (Deepspace stars)

The stars are on the Sub and Bottom layer.
I have the Layout set to unbounded scrolling because i need to scroll the "solar system" freely unbounded.
Here is the problem.
I want the stars to move slightly to the left/right/up/down.
Thats where the paralax comes in.
The thing is that because of the unbounded scrolling is set for layout and not per layer, the stars eventualy move completely of screen.
Without unbounded scrolling, i get the effect i need.
But then i loose my scrolling "freedom" of the top layer.

So the ideal way for me would be.

Top Layer = Unbounded Scrolling with Paralax set to 100,100.
Sub Layer = Bounded Scrolling with Paralax set to 10,10.
Bottom Layer = Bounded Scrolling with Paralax set to 5,5.

(I think the functionality to do this has yet to be build in to construct2 @Ashley ?)

So for now i'l just event the stars manualy to move at a variable rate until a specific set max.

If however i am looking in the wrong direction here then please fill me in.

Kind Regards.
Savvy001
B
56
S
20
G
13
Posts: 778
Reputation: 13,204

Post » Sun Dec 23, 2012 2:51 am

As a thought. Couldn't you make the backgrounds a little large then manually stop the camera range. As I would understand you still don't want to scroll past your solar system later.

Another alternative is to break your backgrounds and then move them once one goes off screen to the otherside creating an unlimeted background.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Sun Dec 23, 2012 2:08 pm

Making the starry background bigger (tiling) sounds like a much easier solution than anything else. It's the same as you would do it with a platform ear or any other kind of game.
B
90
S
32
G
14
Posts: 935
Reputation: 14,540

Post » Sun Dec 23, 2012 8:29 pm

Thanx for the answers!

The problem with making it a bigger starry background is that my app uses inf space synced to time.
So then the starry background would also need a inf size.
That on its own is not preferable.
Bounding the stars would be best.
However, i came across a explanation of Yann.
He set up a code that enables a large amount of objects to stay bounded to a centered sprite using a offset logic when unbounded scrolling is enabled.

Im going to give that try and see how it works.

Thanx again!!
Kind Regards.
Savvy001
Savvy0012012-12-23 20:30:54
B
56
S
20
G
13
Posts: 778
Reputation: 13,204


Return to How do I....?

Who is online

Users browsing this forum: Renfd, supreme676, Yahoo [Bot] and 32 guests