Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Special Backdrop scrolling
- DMCodemaker
-
12 posts
Special Backdrop scrolling
I'm working on a project that uses pen-based tiles that can be dragged in an infinite 2D scrolling game, and I am trying to add a checker pattern to the backdrop that scrolls with it. The Backdrop acts as a sprite would but it would cover the pen lines as a sprite, and if the tiles were clone-based, there would be a clone limit to deal with. And my problem is that the backdrop is either moving at the wrong speed or in the wrong direction relative to the camera as it moves. I know the camera x and y works because I've worked with those variables many times before, but the backdrop is not working as it should. Each checker square is supposed to be at the same x and y as the tile above it when the project starts. Here's the project:
https://scratch.mit.edu/projects/566872667/editor/
(the scripts that aren't working are in the backdrop) I need help with this, does anyone know how to fix it?
https://scratch.mit.edu/projects/566872667/editor/
(the scripts that aren't working are in the backdrop) I need help with this, does anyone know how to fix it?
- geek62
-
100+ posts
Special Backdrop scrolling
Did you share that project? It won't load for me.
- DMCodemaker
-
12 posts
Special Backdrop scrolling
OK, I will do that. Also, if you've played the google snake infinity mode, you will see what is supposed to happen with the background
- DMCodemaker
-
12 posts
Special Backdrop scrolling
I think I figured out how to make the backdrop move at the correct speed, but I can't get it to go in the right direction. Since the backdrop names use only positive numbers, the number must be the distance from a lower value to a higher value. So for camera x, it would be either camera x minus floor of camera x or ceiling of camera x minus camera x. Aside from going in the wrong direction, it almost perfectly runs using the distance from the floor of the variable to the variable, but it doesn't work using the variable to the ceiling of it. The variables are being rounded to the nearest 30, and move 6 at a time.
Did you share that project? It won't load for me.
- DMCodemaker
-
12 posts
Special Backdrop scrolling
I figured out how to solve my problem. It’s in the forum thread “Pen layering over sprites” which is in the requests. I wanted a block in scratch that would help fix it, but I found a workaround for it.

- Discussion Forums
- » Help with Scripts
-
» Special Backdrop scrolling