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

#1 2008-09-10 23:15:39

greg_allprojects_
Scratcher
Registered: 2008-09-02
Posts: 18

Tips On Scrolling Projects

Hello All,

Here are some tips on how to make scrolling (moveing background/sprite) projects.

Before we start, if you have never heard of or made a scrolling project, go to my username
and view these projects

scroll test
scroll racer
super race (only works when downloaded)

Now to start.

The entire idea of scrolling projects are VARIABLES, the entire idea is based off of VARIABLES when you make a scrolling project, instead of using

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if><key[ left arrow ]pressed?>[/blocks]
[blocks]<change x by( 5)[/blocks]

Doing this is X and Y axis based.
Since I do not have much time left (i have to go to bed) i will not use the blocks i will just type out instructions for character movement.

1. make a variable called scrollx for everybody
2. put a [when green flag clicked] block in.
3. put a [forever if] block in under the [green flag] block.
4. put inside the [forever if] block a [key (right arrow) pressed]
5. under the [forever if (key right arrow pressed)] put a [change (scrollx) by {-5}]

This is how to do character right scroll movement. I will post more in the moring before school

From, greg_allprojects_


Scratch is the best VIEW MY PROJECTS

Offline

 

#2 2008-09-11 11:18:01

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Tips On Scrolling Projects

Cool tips  smile

For people who are intrested in making scrolling projects check this thread out
http://scratch.mit.edu/forums/viewtopic.php?id=2440

Also check out the scrolling demonstration project that I programmed that is included with scratch.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2008-09-11 17:51:32

deatheater
Scratcher
Registered: 2008-04-11
Posts: 1000+

Re: Tips On Scrolling Projects

Actually you don't need a variable u can make the sprite bigger then the screen like this http://scratch.mit.edu/projects/deatheater/212169

Offline

 

#4 2008-09-11 19:06:44

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Tips On Scrolling Projects

deatheater wrote:

Actually you don't need a variable u can make the sprite bigger then the screen like this http://scratch.mit.edu/projects/deatheater/212169

I don't really recommend using large sprite for scrolling unless you only need a single area that is 4 times longer than the screen. If you want efficient scrolling check out method 2 in the scrolling thread I posted above.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#5 2008-09-11 20:45:13

deatheater
Scratcher
Registered: 2008-04-11
Posts: 1000+

Re: Tips On Scrolling Projects

archmage wrote:

deatheater wrote:

Actually you don't need a variable u can make the sprite bigger then the screen like this http://scratch.mit.edu/projects/deatheater/212169

I don't really recommend using large sprite for scrolling unless you only need a single area that is 4 times longer than the screen. If you want efficient scrolling check out method 2 in the scrolling thread I posted above.

I agree totally that's by far more efficient but it gets harder when u want to rotate the screen and other stuff  smile , but yes that is more efficient

Offline

 

#6 2008-09-12 07:07:41

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Tips On Scrolling Projects

hey, i posted a torturial project on scrolling and infinte scrolling: http://scratch.mit.edu/projects/yambanshee/263478

Offline

 

#7 2008-09-12 17:32:04

deatheater
Scratcher
Registered: 2008-04-11
Posts: 1000+

Re: Tips On Scrolling Projects

If u want I've got a tutorial on 2p scrolling  smile

Offline

 

Board footer