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

#1 2007-11-03 09:27:02

vgman20
Scratcher
Registered: 2007-11-03
Posts: 44

NEEEEEED SINPLE SIDESCROLLING SCRIPT! SIMPLE!!!!!

I've seen plenty of side-scrollers here on scratch, but most of them have tons of variables and complicated scripts There are 2 major problems with that:
1) I want something I can start quickly, something with a couple codes that allows me to create a good side scroller template in minutes.
2) My computer is extremely old and laggy, so anything above 1,000 kb usually can lag.
I need a simple, small, and easy script that will let me make a good, old-fashioned, side scroller. Any suggestions?


Ever stop to think...
and then forget to start again?

Offline

 

#2 2007-11-03 10:04:38

bigB
Scratcher
Registered: 2007-06-09
Posts: 100+

Re: NEEEEEED SINPLE SIDESCROLLING SCRIPT! SIMPLE!!!!!

im sure many topics in the forum have already covered this.

create some background sprites that are smaller than the screen. 
when key right arrow pressed
change X position by (-1)

when key left arrow pressed
change X position by (1)

the back ground sprites all need those two scripts and you should also find a way of making them all start spread out from each other.
goodluck


http://scratch.mit.edu/projects/bigB/260981 Draw to Text
http://scratch.mit.edu/projects/bigB/181829 3D Stunt Flyer

Offline

 

#3 2007-11-03 11:42:44

11alex
Scratcher
Registered: 2007-06-15
Posts: 100+

Re: NEEEEEED SINPLE SIDESCROLLING SCRIPT! SIMPLE!!!!!

Hey BigB, I know how to make scrolling! Excactly like you! Do you remember me?


www.flowbolt.com

Offline

 

#4 2007-11-03 12:26:23

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: NEEEEEED SINPLE SIDESCROLLING SCRIPT! SIMPLE!!!!!

The basic concept of scrolling in scratch is simple. The sprites cant move out the the boundaries right? So we make variables called scrollx (and for up and down scrolling scrolly) that tell them that their position is greater than the boundaries and we hide the sprites when they are as far so they can possibly be so they don't just linger on the screen. Also you must create a variable to set the sprites origin position with a variable like originx. Then you set all the sprites position for a side scrolling games to scrollx + originx. If this doesn't make any sense to you I am sorry I am not very good with explaining things.

You should check out this project, it is the most basic example of side-scrolling in scratch. http://scratch.mit.edu/projects/archmage/24624


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#5 2007-11-03 16:04:45

S65
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: NEEEEEED SINPLE SIDESCROLLING SCRIPT! SIMPLE!!!!!

http://scratch.mit.edu/forums/viewtopic.php?id=1978

This is a tutorial of creating a game using my platform game engine. The engine isn't simple. but making a level in it is (just making new costumes).

Offline

 

#6 2007-11-06 13:38:18

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: NEEEEEED SINPLE SIDESCROLLING SCRIPT! SIMPLE!!!!!

The absolutely simplest method of completing sidescrolling, if somewhat labour intensive:

Create a number of background images that when played in sequence, make the background appear to be moving.

When green flag clicked
Forever
Next Background
Wait 0.05

Simple code, but rather more labour intensive than the more common moving sprite methods.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#7 2007-11-06 14:17:12

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Re: NEEEEEED SINPLE SIDESCROLLING SCRIPT! SIMPLE!!!!!

Moving sprites also take up much less memory than having many backgrounds.  You'll hit the 10Mbyte upload limit in no time if you try to do a huge number of backgrounds.

Offline

 

Board footer