Endless scroller

I have what is probably a stupid question here. In the scroller examples you have multiple canvases lined up in a row vertically. How within the level director do you do that? I’m not seeing it. Remove them, add them, etc…and is there a limit as to how many you can have and how they can be arranged?

Which scroller example are you referring to as I don’t recall a vertical scrolling one?

In the potty bird example, the level spans across multiple screens but it wraps the objects to give the illusion that it is endless.

If you open the .ldf file in level director you will see how it is done.

On the level it has the ParallaxInfinite enabled and then on the individual layers it has ParallaxRepeat set.

Note: if you want to wrap objects then the layer must be at least two screens widths wide so it can wrap the objects onto the offscreen portion.

If you want to do it manually then the AssetTest example shows how you can do it by translating the grass objects when they go off screen.

Let me know if you need anymore info.

My bad yes horizontal… :unsure:

I think I understand how the scrolling works and know that you need more than 1 screen width. That’s the question. When you first fire up level director or add new file there is 1 screen there. How do you add more screens off to the side? I’m sure it’s something simple I just don’t see it. Thanks

EDIT:

DOH…just increase the canvas width. Sorry for bugging you.

I have a question related to this. Will the game only scroll the length of the canvass? 

I’m trying to do something fairly simple. I’m creating an orange and I just want it to fall…forever haha Besides creating a ridiculously loooong canvass, does LD support tracking a falling object on screen as long as I want it to?

Right now I have 3x the original canvass stretching downwards. i can change the parallax speed to make my background scroll tons of times but at the bottom of the canvass it stops. Do I need to code around this?

Sorry for asking the same question 3 different ways, just wanna make sure you understand what I’m asking.

Thanks!

No problem, it is a little tricky to get setup but well done for finding the canvas size.

If you don’t want LD to stop at then end of your level then you can disable the camerabounds by calling this;

myLevel:setCameraBounds(nil)

When you scroll/move the level it will no longer check the boundaries and thus keep falling.

In the next release I have changed it so it no longer sets the camera bounds when using the ParallaxInfinite mode, this was an oversight ;o)

Also note, the nice thing with LD when using Infinite mode is that your layers can be different lengths/heights.

For example you background layer e.g. sky could occupy 2 screens (and repeat), whereas your foreground layer could occupy 20 screens.

Which scroller example are you referring to as I don’t recall a vertical scrolling one?

In the potty bird example, the level spans across multiple screens but it wraps the objects to give the illusion that it is endless.

If you open the .ldf file in level director you will see how it is done.

On the level it has the ParallaxInfinite enabled and then on the individual layers it has ParallaxRepeat set.

Note: if you want to wrap objects then the layer must be at least two screens widths wide so it can wrap the objects onto the offscreen portion.

If you want to do it manually then the AssetTest example shows how you can do it by translating the grass objects when they go off screen.

Let me know if you need anymore info.

My bad yes horizontal… :unsure:

I think I understand how the scrolling works and know that you need more than 1 screen width. That’s the question. When you first fire up level director or add new file there is 1 screen there. How do you add more screens off to the side? I’m sure it’s something simple I just don’t see it. Thanks

EDIT:

DOH…just increase the canvas width. Sorry for bugging you.

I have a question related to this. Will the game only scroll the length of the canvass? 

I’m trying to do something fairly simple. I’m creating an orange and I just want it to fall…forever haha Besides creating a ridiculously loooong canvass, does LD support tracking a falling object on screen as long as I want it to?

Right now I have 3x the original canvass stretching downwards. i can change the parallax speed to make my background scroll tons of times but at the bottom of the canvass it stops. Do I need to code around this?

Sorry for asking the same question 3 different ways, just wanna make sure you understand what I’m asking.

Thanks!

No problem, it is a little tricky to get setup but well done for finding the canvas size.

If you don’t want LD to stop at then end of your level then you can disable the camerabounds by calling this;

myLevel:setCameraBounds(nil)

When you scroll/move the level it will no longer check the boundaries and thus keep falling.

In the next release I have changed it so it no longer sets the camera bounds when using the ParallaxInfinite mode, this was an oversight ;o)

Also note, the nice thing with LD when using Infinite mode is that your layers can be different lengths/heights.

For example you background layer e.g. sky could occupy 2 screens (and repeat), whereas your foreground layer could occupy 20 screens.