Hi fellow Scratchers! I have a problem with scripting of infinite scrolling. I very well aware of how to do regular scrolling, but I don't know how to minimize the amount of terrains for infinite scrolling. I want to utilize less sprites, so infinite scrolling forever uses those. Nevertheless, I don't know what kind of scripts I need. Please help! Diagrams of scripts will help, though. Teehee Thanks!
Don't worry, I'll give credit to those who have helped me.
Offline
Try looking at archmage's effcient scrolling demo:
http://scratch.mit.edu/projects/archmage/82995
It should help you get on your track
Last edited by samurai768 (2010-08-18 19:10:28)
Offline
Well, I have a project on my account that does do infinite scrolling, but it doesn't change costumes.
Offline
Something like this random dungeon generator?
Offline
Try replaying the same terrains over and over...
Offline
You need an equation something like this for your costume (it's probably not right, just a random guess, but if you want an actuall equation, look at Lucario621's Mario Kart):
switch to costume: round (scrollx/ 480) + ((round (scrolly/360)) x (however many costumes per row)) This should work, but I have no idea, so go look at Lucario621's project.
Offline
I'm working on a form of infinite scrolling right now in my newest experimental project
It uses only 1 Sprite, 1 Stage (several backgrounds), and 1 Script (which is sure to be huge because of the fact that I'm not using any variables, lists, OR even any broadcasts!) ... <insert duplicate code here and here and here ... lol>
It may have been done before, I don't know, but it's definitely not the usual way that I've seen people doing scrolling on Scratch
And it changes costumes to accomplish it ... is that good or bad?
I've got the base starter code complete, so I'm starting onto the main bulk of duplication and tweaking. Is everyone excited to see what I'll come up with?
I know I am! .... It'll be a few days at the very least before I get back to work on it though, so don't expect it any time soon. Maybe next week sometime.
Offline
MabonBaladevaKain wrote:
I'm working on a form of infinite scrolling right now in my newest experimental project
![]()
It uses only 1 Sprite, 1 Stage (several backgrounds), and 1 Script (which is sure to be huge because of the fact that I'm not using any variables, lists, OR even any broadcasts!) ... <insert duplicate code here and here and here ... lol>
It may have been done before, I don't know, but it's definitely not the usual way that I've seen people doing scrolling on Scratch![]()
And it changes costumes to accomplish it ... is that good or bad?
I've got the base starter code complete, so I'm starting onto the main bulk of duplication and tweaking. Is everyone excited to see what I'll come up with?
I know I am! .... It'll be a few days at the very least before I get back to work on it though, so don't expect it any time soon. Maybe next week sometime.
It's been done before, but good luck! I'd like to see how you do it as opposed to others.
Offline
I forgot to mention there's no stamping or pen tool used either :p ....
Has it been done before without those and without everything else I mentioned?
If so could ya post me the link! ... I'm getting confused with the positioning settings.
Offline
The least amount of sprites possible would be four, shouldn't be too hard. I'll try and get an example up.
Offline
Here is my simplest 4 way scroller. You can change the scroll speed and also toggle the background between the normal ground image or individual images for the 4 sprites that do the scrolling.. so you can see them in action.
Offline
AtomicBawm3 wrote:
The least amount of sprites possible would be four, shouldn't be too hard. I'll try and get an example up.
Are you serious?
Cause if so then I guess I just broke the record.
I'm tired of working on it but it's done, just a bit barebones.
It is limited in some minor ways, but most if not all of that can be remedied by simply using more than just the one sprite.
If you want a continuous ground without any gaps or holes in between, it can be done by adding stamping or another sprite, or even as is if you don't mind one half of the ground vanishing as you move to the next.
******************************* Infinite Scrolling! *********************************
I still want to see that example of yours though
Offline