There are no 'wait's and no synchronisation between left and right - smooth scrolling with this scheme relies on the loops all running as fast as possible. I would suggest a master controller loop that waits between frames, and sends broadcasts to the left and right tile display blocks so that they update as close in time to each other as possible.
Its just like a normal scrolling script but instead of setting the location to 480 * the number of where it appears, it sets it to 480 * terrain num, and terrain num is a number that keeps up with wherever you are.
But its only about 4 small scripts with no complex math. In the grand scope of things its not complicated, but for someone who has no programming experience I understand the confusion.
4 way scrolling? If you mean X and Y then you need to set your terrain sprites to >set X to ScrollX+480*(whatever) and >set Y to ScrollY+480*(whatever):)
Wow finally this is what I am looking, i have some question...
how do you make a sprite move through the backround with the backround moving, like (example) mario classic games and others and platforms for the sprite stand on and to jump on? I am pretty new to this so plz help me out.
Very nice! Smooth and simple. All you really need is two sprites since that's all that could be in view at one time. I came up with a similar solution independently for a two-dimensional scrolling game (horizontal and vertical).
Sorry, should have mentioned that you can delete the flickering version any time you want, I took a copy. I had a couple of theories but nothing has proven out yet; still thinking. Not sure why I'm interested, the velocity version is fine, but I would like to know why it's doing what it's doing. Very annoying.
This is awesome! This would have saved me a bunch of thinking if I had seen it before I did my little scroller project recently. I love this technique. I do believe that the Forum tutorial topic that references this has an error in the movement script. The end of the second If is in the wrong spot.
The problem was that the sprites would flicker if you didn't use a movement script that involved velocity. If you tried to change scrollX simply by adding to or taking away from the variable the screen flickers. Unfortunately, I don't quite understand how the solution you mentioned would fix this, can you explain your solution in greater detail?
Um... Archmage little problem here, I made a platform scroller using this scrolling technique (it's not posted yet), but the platform costumes change suddenly. I think this is because of the 'switch costume to (terrainnum).' Could you please tell me how to fix this?! :D Please answer on one of my projects.
Here's another way to do the same thing except in 2 dimensions: (link to project) I prefer the mod command because I don't really like using the round command.
Um arch... I used this and it didn't work, well it works just not very well, there are large gaps inbetween the terains, here I was hopeing you could help. (link to project)
Comments
You need to be logged in to post comments
Add a Comment
erm...cool!
COOL!
I can use this is a project, right?
when I do it it switches costume too early
change the scrollx speed to a lower one, preferably to the same as the character movement
(view all replies)cool scrollx
I can't make a four way scroller... Anyone wanna help?
(link to project)
There are no 'wait's and no synchronisation between left and right - smooth scrolling with this scheme relies on the loops all running as fast as possible. I would suggest a master controller loop that waits between frames, and sends broadcasts to the left and right tile display blocks so that they update as close in time to each other as possible.
36. :(
Ack!!!This is almost impossible!!!
Its just like a normal scrolling script but instead of setting the location to 480 * the number of where it appears, it sets it to 480 * terrain num, and terrain num is a number that keeps up with wherever you are.
(view all replies)But its only about 4 small scripts with no complex math. In the grand scope of things its not complicated, but for someone who has no programming experience I understand the confusion.
How so?
(view all replies)you stink mrmunchkin dont make a mario one
NOOOO! It was working, then I saved and it all fell apart...
Thankew so much.
can you do this with scrollx and scrolly
Wow--the scripts look so complicated, yet there's only 2 :D
Not to mention that they are short
may i possibly use this and adapt it to make a mario scroller? Thanks.
wait don't worry. far too complicated for me.
Thanks! I'll use that in my 3-D project, what you think of that, Archmage?
try using my programs from my engine: (link to project)
It may be hard to adapt this to what you want to do. But good luck, and if you need help ask in the forums.
(view all replies)I seriously need help i have tried all the tutorials i can find but can't do 4-way scrolling. Would you point me in the right direction please?
4 way scrolling? If you mean X and Y then you need to set your terrain sprites to >set X to ScrollX+480*(whatever) and >set Y to ScrollY+480*(whatever):)
(view all replies)can you make a tutorial on scrolling like this but up and down instead?
Just replace x with y and 480 with 360. Do this for every time you see it and it will go up and down.
(view all replies)this is too complicated plz make a less complicated script to copy! to complicated
that shouldnt crash your computer, how many gigs of ram? anyway this is as simple as it gets, if you cant use this than u cant make good scrollers
4 scripts is too complex? Then try the scrolling demo that scratch comes with.
(view all replies)Wow finally this is what I am looking, i have some question... how do you make a sprite move through the backround with the backround moving, like (example) mario classic games and others and platforms for the sprite stand on and to jump on? I am pretty new to this so plz help me out.
Try looking up the game "chop shop" for a simple example.
(view all replies)cool, chck out mine
Is there a way to make it go up and down? I'll try...
Replace x with y and replace 480 with 360
i cant get the terrain the way i want it to be.
I'm making a scrolling game with the download i took from this. but how do you pitfalls and floating platforms?
Ask in the forums
Cool! You won The Scratch Cup 2009 from The_Scratch_Cup!
Yeah I know
(view all replies)nice but i cant download it, it just says cannot read message not understood??? plz help
Did you have the latest version of scratch?
Nice, I plan on starting a scrolling game and this should help a lot.
i,m gonna try putting this in a game :)
Very nice! Smooth and simple. All you really need is two sprites since that's all that could be in view at one time. I came up with a similar solution independently for a two-dimensional scrolling game (horizontal and vertical).
Sorry, should have mentioned that you can delete the flickering version any time you want, I took a copy. I had a couple of theories but nothing has proven out yet; still thinking. Not sure why I'm interested, the velocity version is fine, but I would like to know why it's doing what it's doing. Very annoying.
This is awesome! This would have saved me a bunch of thinking if I had seen it before I did my little scroller project recently. I love this technique. I do believe that the Forum tutorial topic that references this has an error in the movement script. The end of the second If is in the wrong spot.
Ohhh, I see what you mean. I thought you were referring to the scripts in this project. Thanks for letting me know about my typo. I'll fix it now.
You can see the bug I mentioned in the following project (link to project)
(view all replies)The problem was that the sprites would flicker if you didn't use a movement script that involved velocity. If you tried to change scrollX simply by adding to or taking away from the variable the screen flickers. Unfortunately, I don't quite understand how the solution you mentioned would fix this, can you explain your solution in greater detail?
Both terrain sprites must have the same costumes in the same order.
It also happens on (link to project)
Um... Archmage little problem here, I made a platform scroller using this scrolling technique (it's not posted yet), but the platform costumes change suddenly. I think this is because of the 'switch costume to (terrainnum).' Could you please tell me how to fix this?! :D Please answer on one of my projects.
well really all you need for 4-way scrolling is 4 round sprites im coming out with a 4 way scrolling engine.
No.
Instead of using multiple sprites?
Is there any way to use the scrolling strategy for a multidirectional scrolling with 4 sprites?
I've just posted a project that does this and allows unlimited map sizes in both dimensions. Check it out [url=(link to project)]here[/url].
wait ummm nevermind...
!!!! i have NEVER seen scrolling like this before!! how do you do it!?!?
Lol not even.
I said this on your other scrolling project but.... your a genius=D
I've got a large game in the works and I'm looking for a 2 directional scrolling method. This will be perfect. Thanks!
ok i tried to do this but it wont stop flickering. Help! please post a helpful comment on any one of my games!
Here's another way to do the same thing except in 2 dimensions: (link to project) I prefer the mod command because I don't really like using the round command.
I cthink I can use this one now.
Um arch... I used this and it didn't work, well it works just not very well, there are large gaps inbetween the terains, here I was hopeing you could help. (link to project)
No problem :3
i could use this scrolling type in jumper and my donkey kong game. thanks archmage ^3^
thx archmage
lol!
cool im going to use it
wow
good
Yeah, you could put them at any y position. I don't know why you would want to though.
I mean any y postion
hey archmage, can the scrolling boxs be at any X postions and still scroll
EXACTLY WHAT I NEEDED!!!!!! THANK U!!!!
Thanks :)
wow this is cool... i think its too advanced for me lol! but "wow" All of your games are really good though!