Discuss Scratch

mwiedmann
Scratcher
100+ posts

Improved Scrolling Background How To - The ultimate scrolling background solution. New version.

I posted this in the Help with Scripts forum but also wanted to share it here. This is an update version of a scrolling background how to I did recently.

Many of you have seen and used the scrolling background how to I posted recently. It works great but I've made a major improvement so I will be removing it soon. It has been replaced by…

Improved Scrolling Background How To

The concept and most of the code is basically the same, but the way clones are used to show the background images has been dramatically improved. I've also included some AI controlled sprites in this version so you can see how they work with the scrolling background.

The problem with most scrolling solutions you see is that they use 1 sprite for each image. If you have a large map this is just not feasible. My solution uses only 1 sprite. You just have to add your images. The trick is that the sprite creates clones of itself to display the background images. The new version reduces the number of clones required down to just a handful. It's now super efficient.

Let me know if you find any bugs or have any questions.

Powered by DjangoBB