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

#1 2009-02-09 13:38:29

Mitch101
Scratcher
Registered: 2009-01-19
Posts: 15

How do you make a scrolling game?

i've looked at the blocks but cant figure it out please help

Offline

 

#2 2009-02-09 14:02:41

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: How do you make a scrolling game?

http://scratch.mit.edu/forums/viewtopic.php?id=2440 Look At Other Topics Before You Post Another.

Offline

 

#3 2009-02-09 14:16:38

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

Re: How do you make a scrolling game?

look @ my scrolling tutorial, not only does it explain how its done, but the teory behind how it works, and a not a well known techniqe for getting a infinite scrolling effect!

Offline

 

#4 2009-02-09 19:45:33

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: How do you make a scrolling game?

u can look at the scrolling project tutorial that i made. type in bosoxtutorial in the search bar then click on bosoxtutorials stuff  then scroll down and click on the one that says: how to scroll

Last edited by bosox397 (2009-02-09 19:46:47)


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#5 2009-02-09 20:36:54

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: How do you make a scrolling game?

The question's been answered, but here's a quick guide.

You need to make a bunch of terrain sprites for the scrolling background. (you can name them terrain1, terrain2, etc. so it's easy to tell them apart.) So basically, because sprites can only be 480x360 unless you use a glitch, you need to chop up the scrolling screen into sprites and just continue from one sprite to the other.

Then, make a variable called scroll x (or scroll y if it goes up/down).
After that, put this script into each terrain sprite:
<when green flag clicked>
<forever>
<set x to( (( <{ scroll x }> <*> [# of the terrain sprite here] ))
<end>
[/blocks]
Then, in your character sprite, put in this script:
<when green flag clicked>
<forever>
<if><key[ right arrow ]pressed?>
  <change{ scroll x }by( [how fast you want the background to go]
<end>
<if><key[ left arrow ]pressed?>
  <change{ scroll x }by( [how fast you want the background to go, but negative]
<end>
<end>[/blocks]

Last edited by hmnwilson (2009-02-09 20:37:41)


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#6 2009-02-10 16:38:13

47fg74
Scratcher
Registered: 2007-10-30
Posts: 100+

Re: How do you make a scrolling game?

http://scratch.mit.edu/projects/47fg74/412000/

Check this out and download. it might help


What emo means....
E is for emontional ruins everbodies day
M is for misrable people
O is for on the dark side... cause we have some fresh cookies

Offline

 

Board footer