I wasn’t sure where to put this as it isn’t a Corona SDK question directly.
Dusk accepts a custom property in a layer of a Tiled map as the “rate” at which a layer will scroll.
xParallax and yParallax.
If the camera is locked to the player object it’s defacto rate is apparently the control of “1.0” regardless of how fast it’s actually moving.
So I stacked several image layers in my Tiled map and set the xParallax scrolling factor to various levels and it works great. Here’s the problem I’m facing.
I don’t see a procedure or “way to handle” the infinite scrolling background. The images will roll off screen as I travel across the X axis if I travel in a direction and roll back on screen if I travel in the opposite direction. It makes perfect sense.
In “conventional scrolling” that isn’t physics based from the examples I’ve seen, you stack two (or more) images side by side (or vertically) and when they are “off screen” in whatever opposite direction the player moves, they then get translated to the opposite side off screen and scroll in again.
I tried adding an additional image layer with an offset of the x axis equal to the width of the image and that image doesn’t draw at all. EDIT: The images are there but the Tiled internal layer property “Horizontal Offset” is not being looked at in Dusk, so it’s stacking all the image layers on top of each other.
It doesn’t seem practical to have an image layer with an image that’s the width of the level either.
Ideas or suggestions?