Ok, this has REALLY been bugging me, but the scrolling script I've been using leaves spaces between the terrains. When it scrolls onto the next terrain, the terrain repeatedly shudders back and forth.
Here's the basic script used I for the player:
[blocks]<when green flag clicked><forever><if><key[right arrow]pressed?><change{ scroll x }by( -1<if><key[right arrow]pressed?><change{ scroll x }by( 1
Terrain script:<when green flag clicked><forever><go to x scroll x + 480 * (terrain number) )y 0
Please help!
Offline
henley wrote:
This shouldn’t happen online or in presentation mode.
Try uploading a test and deleting it later.
The test did the same thing.
Offline
Could you provide your project so we could download and analyze it that way?
Offline
Some scratchers put a black border on their scrollers to hide the "gaps". I don't like giving up any screen space, so I use a couple of tricks:
Make terrains that overlap slightly (the edges from one to the next need to match).
Move the terrains "all at once" by using a broadcast. In this project the "ship" does calculations based on velocity and thrust, then broadcasts "UpdateWorld" and then moves. The other sprites move when they get this broadcast, keeping everything synchronized.
Another approach (for some game ideas) is to use islands to show the movement. These can be hidden when they go off-screen, and shown when they get "on screen" again.
Offline
as for the border thing, Scratch automatically stops a sprite from moving off the screen while it is still showing 18 pixels worth of the image. The border shrinks the screen size but only by 18 pixels wide per side. With it, you can have sprites that disappear easily when scrolling off the screen. And it doesn't have to be black, you can make it decorative and/or use it to display player data without worrying about sprites moving into/through the nfo.
A cool technique is to make an 'invisible' (transparent) border around the sprite so you don't need the big screen border but you will have to do this in an outside graphics editor.
Offline