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

#1 2010-06-17 19:56:15

flamegirl
Scratcher
Registered: 2009-01-24
Posts: 2

Help Making a Scrolling Game

I'm thinking about making a scrolling game, waht's the BEST way to create a scrolling game?  Any script better than thios?:

<when green flag clicked><forever if><key[ left ]pressed?><change{ SCrollX }by( 5

And:

<when green flag clicked><forever if><key[ up ]pressed?><change y by( 10

And:

<when green flag clicked><forever><if><<  <not><touching color[green   >><change y by( -5 ?

Offline

 

#2 2010-06-17 21:40:00

wei2912
Scratcher
Registered: 2010-05-09
Posts: 100+

Re: Help Making a Scrolling Game

I'm not sure by what you mean.


Waiting for Scratch 2.0...

Offline

 

#3 2010-06-18 00:53:45

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: Help Making a Scrolling Game

Depends on a lot of things.. are you making a side-scroller (doesn't scroll up, just sideways)? The old-school way in Scratch is called scrollx but it is usually used to scroll screens in all directions. Here are some of my scrolling projects...

simple scroller...
http://scratch.mit.edu/projects/Locomule/707613

random dungeon maker...
http://scratch.mit.edu/projects/Locomule/708768

an unfinished game with simulated vertical scrolling...
http://scratch.mit.edu/projects/Locomule/706643

Asteroids type sprite scrolling...
http://scratch.mit.edu/projects/Locomule/792220

a scrolling 4-screen-wide race course...
http://scratch.mit.edu/projects/Locomule/742929

another game...
http://scratch.mit.edu/projects/Locomule/798042

The method you have used is the most obvious one. It works fine for simple tasks. One of the great things about scrollx is that it uses 2 main variables, for x and y, that the sprite(s) always move by. So you can easily add things that influence that movement (dirt that slows, gravity, etc) by simply adding to or adjusting one of the 2 main variables. And you can also get nice, smooth motion in any direction instead of jerky looking movements in 4 or 8.


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

#4 2010-06-20 01:07:07

deepac
New Scratcher
Registered: 2010-06-20
Posts: 3

Re: Help Making a Scrolling Game

I believe scrollx is what I am looking for.  Thanks a bunch locomule!  smile

Offline

 

#5 2010-06-20 10:19:17

Locomule
Scratcher
Registered: 2009-08-24
Posts: 500+

Re: Help Making a Scrolling Game

glad to help  big_smile


aka Pain from DragonSpires, Delrith Online, BotBattle, Urban Dead etc etc lol

Offline

 

Board footer