ScratchData LogoScratchData
Back to RobFarley74's profile

Block Scroller

RORobFarley74•Created November 10, 2020
Block Scroller
10
5
106 views
View on Scratch

Instructions

A few people have asked how I did scrolling in Badly drawn racers, here's a very cut down simplistic version of what I do. Press SPACE to show and hide the bars. So essentially we create a bunch of clones and move them no more than a block width around swapping out the costume based on the "map" in this case it's the blocks variable. As you can see, when we don't have the bars in place it looks quite bad! And you see the blocks smoothly move left before jumping back to their original position. When they jump back the costume is changed to the next one in the list. By pressing space and showing the bars you can see how the illusion of scrolling occurs. I have made them "Say" their block ID so you can see how they move, I know it looks like the left hand block is jumping to the right, it's not, they move left 64 pixels 1 pixel at a time, then jump right 64 pixels back to where they were. Ask any questions around this if I've not explained things well! Cheers, Rob

Project Details

Project ID447658801
CreatedNovember 10, 2020
Last ModifiedJanuary 25, 2021
SharedJanuary 25, 2021
Visibilityvisible
CommentsAllowed