This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-07-03 00:11:59

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Basic Scrolling Technique

Moderators, please sticky this so less-advanced Scratch members can find out about Scrolling.

So, you want to learn how to make scrolling games, huh? Well, let me take you step by step:

Step one: Make a variable that will stand for the scrolling process. Let's say we used ScrollX as our variable.

Step two: Make the moving sprite (or the stage) a script that says:
When green flag clicked

FOREVER:

-IF key left arrow pressed
--change ScrollX by 5

-IF key right arrow pressed
--change ScrollX by -5

Step three: Make three or four sprites that represent the terrain. You know, a little grass, hills, or mountains. Make sure that their width takes up the whole screen.

Step four: For the first terrain sprite, make a script like this:
[blocks]<when green flag clicked>
     <forever>
     <set x to( (( ScrollX <+> (( 480 <*> 0 )) ))[/blocks]

And for the second terrain sprite, replace that last zero with a one...
and for the third.. 2, and so on...

step 5: Make your movement techniqes and you have yourself a Scrolling game! I hope this has helped you! And... Scratch on!

Last edited by joeyman (2008-07-03 00:18:05)


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#2 2008-07-03 00:14:24

Bluestribute5
Scratcher
Registered: 2008-07-02
Posts: 9

Re: Basic Scrolling Technique

http://scratch.mit.edu/forums/viewtopic.php?id=2440 You mean that?

Offline

 

#3 2008-07-03 00:21:36

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: Basic Scrolling Technique

I know it doesn't make all of the sense... It's 12:23 in the morning where I am! goodnight!

Last edited by joeyman (2008-07-03 00:21:48)


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#4 2008-07-03 00:22:05

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Basic Scrolling Technique

joeyman wrote:

I know it doesn't make all of the sense... It's 12:23 in the morning where I am! goodnight!

Lol, 10 here


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#5 2008-07-03 00:24:09

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: Basic Scrolling Technique

haha I'm already in Thursday! LOL


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

Board footer