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

#1 2012-06-30 13:10:11

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Efficient Solution to Rendering?

Hi!

If you have seen my Pattern Renderer, you may know that the rendering is quite slow.

I am planning on making that dynamic, and using your mouse as an input.  big_smile

BUT I have a problem...

I cannot repeat a script 172800 times without using a repeat block! The rendering must be instant, like in my Infinite Scrolling Random Cave Generator.

I've already tried the whole broadcast thing, but as you can see, that didn't work.

Anybody got a nice way to do this?

Last edited by SciTecCf (2012-06-30 13:14:37)


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#2 2012-06-30 13:20:48

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Efficient Solution to Rendering?

There isn't really a way to make it go faster other than turbo mode  hmm , at least not without lowering the quality

Last edited by zammer990 (2012-06-30 13:21:19)


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#3 2012-06-30 13:29:19

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Efficient Solution to Rendering?

zammer990 wrote:

There isn't really a way to make it go faster other than turbo mode  hmm , at least not without lowering the quality

It becomes instant when you use

go to x: (-240) y: (180)
forever
 stamp
 change x by (1)
 stamp
 change x by (1)
 stamp
 change x by (1)
 stamp
 change x by (1)
 stamp
 change x by (1)
 stamp
 change x by (1)
 ...
 stamp
 change y by (-1)
 set x to (-240)
 stamp
 change x by (1)
 ...
end
because it only updates at the end of the loop. BUT I do not want 172800+ blocks stacked up because it will crash me.


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#4 2012-06-30 13:37:29

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Efficient Solution to Rendering?

What you have is this

repeat (172800)
do stuff
end
This will make it faster
repeat (86400)
do stuff
do stuff
end
This will make it even faster.
repeat (10800)
do stuff //this "do stuff" is here 16 times
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
end


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#5 2012-06-30 13:39:55

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Efficient Solution to Rendering?

Wes64 wrote:

What you have is this

repeat (172800)
do stuff
end
This will make it faster
repeat (86400)
do stuff
do stuff
end
This will make it even faster.
repeat (10800)
do stuff //this "do stuff" is here 16 times
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
end

Wes, that is not what I have.

I know what you mean, but I don't want to stack 172800 stuff on top of each other. I want a more efficient solution to instant rendering. Check out the project I linked to in the first post.  wink


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#6 2012-06-30 13:47:40

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Efficient Solution to Rendering?

SciTecCf wrote:

Wes64 wrote:

What you have is this

repeat (172800)
do stuff
end
This will make it faster
repeat (86400)
do stuff
do stuff
end
This will make it even faster.
repeat (10800)
do stuff //this "do stuff" is here 16 times
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
end

Wes, that is not what I have.

I know what you mean, but I don't want to stack 172800 stuff on top of each other. I want a more efficient solution to instant rendering. Check out the project I linked to in the first post.  wink

There is no instant rendering, there is just fast rendering and faster rendering. There really isn't a feasible way to render so many things instantly.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#7 2012-06-30 14:13:41

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Efficient Solution to Rendering?

Wes64 wrote:

SciTecCf wrote:

Wes64 wrote:

What you have is this

repeat (172800)
do stuff
end
This will make it faster
repeat (86400)
do stuff
do stuff
end
This will make it even faster.
repeat (10800)
do stuff //this "do stuff" is here 16 times
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
do stuff
end

Wes, that is not what I have.

I know what you mean, but I don't want to stack 172800 stuff on top of each other. I want a more efficient solution to instant rendering. Check out the project I linked to in the first post.  wink

There is no instant rendering, there is just fast rendering and faster rendering. There really isn't a feasible way to render so many things instantly.

So there aren't any workarounds?  hmm

I know instant rendering is possible, but on this scale? You need a workaround.


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

#8 2012-06-30 17:46:06

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Efficient Solution to Rendering?

Im not familiar with any workarounds, except this.

You have one sprite that renders the whole screen all by itself. But if you had many sprites work together to render the screen, its faster because they are paralell processing.

Example.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#9 2012-06-30 18:14:24

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Efficient Solution to Rendering?

^ What he said, and no, there isn't just a work around, even doing it with thousands of duplicated code would take a small amount of time, due to the computer's processing and squeak's processing. Using maybe 36 sprites with each repeating 48 times 100 stacked blocks of code would do it quickly


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#10 2012-07-01 02:52:59

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Efficient Solution to Rendering?

zammer990 wrote:

^ What he said, and no, there isn't just a work around, even doing it with thousands of duplicated code would take a small amount of time, due to the computer's processing and squeak's processing. Using maybe 36 sprites with each repeating 48 times 100 stacked blocks of code would do it quickly

Okay, I'll try the multiple sprite thing, thanks for your help!  big_smile


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&display=small

Offline

 

Board footer