ScratchData LogoScratchData
Back to gor-dee's profile

Infinite Scrolling

GOgor-dee•Created January 20, 2014
Infinite Scrolling
129
110
6343 views
View on Scratch

Instructions

Arrow Keys to move. This is not a game. I was learning scrolling and just wanted to see if I could scroll infinitely in any direction and came up with this. I used it as a starting point for my zombie game http://scratch.mit.edu/projects/17633935/ I've made a more advanced version here http://scratch.mit.edu/projects/20952320/ which causes less lag on more complex games, although this version is probably easier to understand. If you are trying scrolling for the first time, @ErnieParke 's tutorial is an excellent place to start (see credits)

Description

The background consists of 9 screen sized sprites that move according to the variables ScrollX & ScrollY. In Scratch, when you try to position a sprite off screen, a small part will always remain visible at the edge of the screen. This is the purpose of the IF THEN ELSE block in each background sprite; it detects when it's sprite is being forced on screen by Scratch and pushes it behind the other background sprites. (Hope this makes sense! Try removing these blocks and see what happens) Thanks to @ErnieParke for his excellent scrolling tutorial http://scratch.mit.edu/projects/15171113/

Project Details

Project ID16844965
CreatedJanuary 20, 2014
Last ModifiedApril 29, 2014
SharedFebruary 13, 2014
Visibilityvisible
CommentsAllowed