Scratch Programming - Scrolling Game
Scratch Programming - Scrolling Game
Edu696D
Fiore
Edu696D
Summative assessment:
Students will create a final scratch project to showcase what they have
learned
Teacher will use a rubric to assess the final project
Fiore
Edu696D
This is a method for infinite scrolling. So, in the example I provide as a video, the
two sprites labeled mario-background1 and mario-background2 just keep
repeating themselves infinitely along with the movement of the sprite until the
game ends.
The stage area for Scratch is 480 pixels wide by 360 pixels tall. So for the x-axis,
the maximum visible width of pixels is 480. The mario-background sprite is 480
pixels wide.
For the mario-background1 sprite, you are going to create a variable called
scrollX for all sprites. This will allow you to use the same variable for all sprites
and you will need this variable for the not only mario-background2 but also a
few others, too. So after creating the variable scrollX means to scroll on the xaxis, and in the code blocks as follows.
Fiore
Edu696D
Fiore
Edu696D
Fiore
Edu696D
This code set makes the background appear to move as the sprite is moving
taking advantage of the scrollX variable and moving along the x-axis.
Sources:
http://wiki.scratch.mit.edu/wiki/Scrolling_(sprites)
http://wiki.scratch.mit.edu/wiki/Scrolling_Platformer_Tutorial
http://wiki.scratch.mit.edu/wiki/Scroller