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
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.
Offline