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

#1 2012-08-24 11:46:17

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Advanced Scrolling issue

I've been working on an engine for a game for a few days, and I have an issue. When you move forwards, the scrolling background grows larger like if you're moving forward. But when you reach where two backgrounds meet (one background, really; all of the terrain is one sprite) it looks sloppy, because when the terrains grow one grows over another and "eats" the other terrain.

Definetely look at the project and it's scripts (link above or here.)

Thanks!

Last edited by powerpoint56 (2012-08-24 11:46:26)


http://i48.tinypic.com/2072ctw.gif

Offline

 

#2 2012-08-24 12:17:31

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Advanced Scrolling issue

bump
b u m p


http://i48.tinypic.com/2072ctw.gif

Offline

 

#3 2012-08-24 15:53:12

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Advanced Scrolling issue

bump


http://i48.tinypic.com/2072ctw.gif

Offline

 

#4 2012-08-25 09:07:15

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Advanced Scrolling issue

Instead of

set x to (((scrollx) + (480)) + ((size) - (100)))
use

set x to ((scrollx) + ((480) * ((size) / (100))))
smile

You'll also want to put

if <([abs v] of (x position)) > [460]>
end
around your second stamp block.  smile

Last edited by BirdByte (2012-08-25 09:10:06)


http://i50.tinypic.com/312u714.jpg

Offline

 

#5 2012-08-25 10:25:43

powerpoint56
Scratcher
Registered: 2012-04-19
Posts: 500+

Re: Advanced Scrolling issue

BirdByte wrote:

Instead of

set x to (((scrollx) + (480)) + ((size) - (100)))
use

set x to ((scrollx) + ((480) * ((size) / (100))))
smile

You'll also want to put

if <([abs v] of (x position)) > [460]>
end
around your second stamp block.  smile

yikes

That's what I tried!!! Maybe I did it wrong.  tongue

Anyway, thanks!!!!!!!

Last edited by powerpoint56 (2012-08-25 10:28:53)


http://i48.tinypic.com/2072ctw.gif

Offline

 

Board footer