Is this possible: Per Layer Unbounded Scrolling

0 favourites
  • 4 posts
From the Asset Store
All popular touch mechanics - scrolling, zooming, swiping
  • 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. <img src="smileys/smiley31.gif" border="0" align="middle" />

    Kind Regards.

    Savvy001

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

  • 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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)