[Solved] Infinite scrolling background vertical issue

Hi mates I’m creating another example template but I have this issue when the background must position to the top again for repeating the scroll sometimes is 1px gap other times 2 or 3 px gap why can this be happening.

The project if anyone want to test it
Project

I have experienced this with multiple engines. My theory is that, the instructions to move and set position is out of sync and so, regardless of order of execution, because of a few milliseconds delay between the two instruction to move and set position, you get this gap. The slower the device you are running it on the less likely you experience this, the more powerful the more likely.

So what I got used to do, instead of having 2 sprites and swap them, I usually use 1 tiled image or sprite and simply move it back and forth like this:

It is always works for me.

1 Like

Thanks it work like a charm.

If you use a tiled sprite you don’t need to move the sprite at all, you can just change the tiled image Y offset. That’s what I used for my scrolling.

1 Like