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

#1 2008-11-14 11:13:08

tharvoil
Scratcher
Registered: 2008-10-24
Posts: 24

Looking for Some Help with scrolling backgrounds

I know the code for scrolling backgrounds, but I happen to have one problem, I am a horrible artist, and cound not draw a constant background for my life  sad 

Anyways, I'm hoping somebody with some experience with scrolling backgrounds can help me in the actual painting of the background, I can provide a basic layout, but can never get the edges to line up ect. If anyone is avaible to help with this, and would not mind helping please leave me a comment on the project it's kind of based on

http://scratch.mit.edu/projects/tharvoil/311526


Thanks!

Offline

 

#2 2008-11-14 12:25:12

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Looking for Some Help with scrolling backgrounds

The best way to do this is to take the first bit of terrian and copy it. Then edit the copied costume, select the whole costume in the paint editor, and move it to the left so only a bit of the costume is visible, which is the end of the costume. Then work from there. That's how I do mine.

Or you could simply use a single bit of terrian, but that wouldn't look very good.

Good Luck  big_smile


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#3 2008-11-14 14:01:28

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

Re: Looking for Some Help with scrolling backgrounds

Or, you can use terrain that is generated dynamically - no need to draw a background, and no worries about getting it to match up  big_smile

http://scratch.mit.edu/projects/Mayhem/97039


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

 

#4 2008-11-15 17:48:17

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

Re: Looking for Some Help with scrolling backgrounds

shadow_7283 wrote:

Well, if you wanted to forget the coding and do it the easier way, you could always draw the picture as one. In Scratch, there is a glitch to make a sprite bigger than the screen. Do this by right clicking on the background and select "grab screen region for new sprite" Drag the select tool over the whole window and let go. You should have a new sprite. Click on it and edit it in the paint editor. Select the box tool and select the color white. Drag it over the whole thing and begin drawing. For coding now, all you have to do is put
<when[ right ]key pressed><change x by(10
and
<when[ left ]key pressed><change x by( -10
Hope I helped!

If you would prefer to do it the way you know I could help with less-complex-art.

I Hope I solved your problem!

You can only make it so big though. I think it would be better to have smaller sprites.


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 2008-11-15 23:00:36

tharvoil
Scratcher
Registered: 2008-10-24
Posts: 24

Re: Looking for Some Help with scrolling backgrounds

Ill make this quick as ive been busy all day(WotLKs out finally!!! yay=]) and i have a massive headache.....

Terrain c reated dymanically? Currently that means nothing to me though my mind may just be lost, and I like the sound of the 1 big sprite for the terrain, but will that work if I wanted link to mvoe between points B and C and the spire to mvoe between A-B and C-D (see mini picture below)

Stage:
(left end of stage)A_____B_____C____D(right end of stage)

Just want to make sure that it should heopfully work b4 I draw up a big sprite, as my artistry is horrible anyways.

Offline

 

#6 2008-11-16 03:07:52

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: Looking for Some Help with scrolling backgrounds

A big sprite will probably only work offline, the web Player seems to shrink them down to the size of the screen.


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#7 2008-11-16 05:23:48

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Looking for Some Help with scrolling backgrounds

JSO wrote:

A big sprite will probably only work offline, the web Player seems to shrink them down to the size of the screen.

Yea, which has happened to me many times. If you upload a sprite that is bigger than the screen, say by changing the size to 200%, then when you play it online, the sprite will shrink to 100% to fit on the screen.


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#8 2008-11-16 09:24:17

tharvoil
Scratcher
Registered: 2008-10-24
Posts: 24

Re: Looking for Some Help with scrolling backgrounds

Well, there goes that idea, I guess I'll have to just make smaller ones that line up, to line them up I suppose dragging them on the screen to where I want them should work, don't mknow why I never thought of that before.

Offline

 

#9 2008-11-16 13:38:43

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: Looking for Some Help with scrolling backgrounds

tharvoil wrote:

Well, there goes that idea, I guess I'll have to just make smaller ones that line up, to line them up I suppose dragging them on the screen to where I want them should work, don't mknow why I never thought of that before.

Maybe they changed it in 1.3? When I tested the bigger-than-screen bug online it worked for me, but I was in 1.2. I'm going to check on this right now.

Oh, I see. Sorry about that!'

Offline

 

Board footer