Discuss Scratch

TheMatrixKid
Scratcher
100+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

So that's why ghost and colour effects lag my programming so much…there goes a day/night cycle that was trialled!
By the way, BYOB runs on JavaScript, so why can't Scratch? It can't be that hard!
WacksPoop
Scratcher
5 posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Lightnin wrote:

A lot of progress is being made on reworking the Scratch player to overcome the lag glitch caused by Adobe pulling hardware support from their Pixel Bender library. It is a major graphics reworking, so it will need testing after it's ready. The estimate is to launch in two or three weeks. I realize that's a long wait, but we think it will be worth the wait, as it looks like it's also going to really speed up cloning.

Stay tuned!
-Amos

p.s. If you'd like to share your thoughts about Adobe's choice to severely degrade the performance of a crucial library without any advance warning, here's the bug report on Adobe's website: https://bugbase.adobe.com/index.cfm?event=bug&id=3591185
Sounds awesome, can't wait for the bug fix!
Failord
Scratcher
1000+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Good news! It seems to have sped up a lot. IT still lags to an unacceptable point, but nearly three two 1.5? -times as fast as it used to be! but not Oh, yeah, and the smaller the screen, the less it lags- fewer pixels to render.

More work must still be done, however. Keep it up, Scratch Team! You guys are awesome!

Last edited by Failord (Sept. 17, 2013 00:39:34)

cubby208
Scratcher
99 posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Lightnin wrote:

A lot of progress is being made on reworking the Scratch player to overcome the lag glitch caused by Adobe pulling hardware support from their Pixel Bender library. It is a major graphics reworking, so it will need testing after it's ready. The estimate is to launch in two or three weeks. I realize that's a long wait, but we think it will be worth the wait, as it looks like it's also going to really speed up cloning.

Stay tuned!
-Amos

p.s. If you'd like to share your thoughts about Adobe's choice to severely degrade the performance of a crucial library without any advance warning, here's the bug report on Adobe's website: https://bugbase.adobe.com/index.cfm?event=bug&id=3591185
hey i was wondering howz it coming? into testing yet? Im holding a release of something untill the new version so it would be great to know when i might be able to release it!
DadOfMrLog
Scratcher
1000+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

@Lightnin:

Lightnin wrote:

A lot of progress is being made on reworking the Scratch player to overcome the lag glitch caused by Adobe pulling hardware support from their Pixel Bender library…
Should've posted a while back about this…

However, I was thinking that there is something else you could do, even without working around the new Flash issue directly (though not saying you shouldn't do that, of course).

This suggestion shouldn't be too hard to implement, and it will bypass much of the problem for a great many projects, including a number that still struggle even when using older Flash (see my own example of such a project).


Many Scratch projects make use of constructs something like this:
forever
if <some-condition> then
set [color v] effect to (somevalue)
else
set [color v] effect to (somethingelse)
If “some-condition” remains the same most of the time, only changing occasionally (a common example: <touching mouse-pointer?>), this means it is continually setting the colour effect unnecessarily.
Unfortunately, the way Scratch works at the moment means that it goes through all the calculations to reset the on-screen bitmap for this ‘new’ colour effect value - even though it's already got that value, so the bitmap doesn't actually need to change.

The same goes for all of the effects, and also for things like size changes and direction changes, plus costume changes.


I'd suggest that you really should only go through the bitmap recalculations if the new effect/size/direction/costume value is actually (significantly) different to what it already is set to.

i.e. it's as if something like the following:
define set colour effect to (value)
if <([abs v] of ((value)-(currentColourEffectValue)))>(0.1)> then // dunno what 'resolution' of the effects is? Maybe only 1%?
set [color v] effect to (value)
set [currentColourEffectValue v] to (value)
end

forever
if <some-condition> then
set colour effect to (somevalue)
else
set colour effect to (somethingelse)
Of course, there are similar such workarounds for this problem when changing costume/size/direction (for Scratchers reading this and wondering how, or what it's all about, see my recent project: Kill that lag!, for example). But expecting Scratchers to have to use such things, or something like above, to deal with the issues caused by repeated unecessary setting of effects/size/direction/costume seems to me to be too much to expect at this stage in programming experience - better to have Scratch catch it and deal with it internally, I think.

Also, as that project shows (as well as severalotherforumposts), this is still a potential problem even if you don't suffer from the latest Flash version! (i.e. even after you fix that issue…) So I think this would be a more general help to Scratchers over all.

Hope that makes sense!

Last edited by DadOfMrLog (Sept. 17, 2013 19:51:53)

RafinhaLazinho
Scratcher
1 post

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Meu Nome É Lázaro Rafael Martins Barboza
MinecraftParty77
Scratcher
100+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Lightnin. I remeber from, oh, like THIS MORNING, that when you went to click a message like a comment on one of your projects, it would take you to that part of the page. Its not doing that anymore. Also its showing the Comments IN the Message Page. Can you fix both of these problems? Please? It takes forever to find a comment if it was old and just got “reply”ed to!
scimonster
Scratcher
1000+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

@DOML: That sounds like a good solution. Optimization is always good.
CANSLP
Scratcher
100+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

THANK GOD!! The effects have made such a lag I can't play unfamiliar games because there might be effects, which make my computer crash
Failord
Scratcher
1000+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Suddenly, scripts are running a lot faster! It's strange. It speeds up the lag a little, but the whole project zooms by.

Last edited by Failord (Sept. 17, 2013 22:08:28)

lisafireball
Scratcher
100+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

MinecraftParty77 wrote:

Lightnin. I remeber from, oh, like THIS MORNING, that when you went to click a message like a comment on one of your projects, it would take you to that part of the page. Its not doing that anymore. Also its showing the Comments IN the Message Page. Can you fix both of these problems? Please? It takes forever to find a comment if it was old and just got “reply”ed to!
Its an update.
s_federici
Scratcher
500+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

DadOfMrLog wrote:

I'd suggest that you really should only go through the bitmap recalculations if the new effect/size/direction/costume value is actually (significantly) different to what it already is set to

Hope that makes sense!

Yes. It does a lot. If very simple scripts like the ones you are showing cause a dramatic slow down of Scratch I guess this should be handled internally as young Scratcher could use them and could maybe abandon Scratch too soon thinking that it is not very effecient. But that would be a real shame as I have seen Scratch doing incredibly complex things.
MrMario5467
Scratcher
100+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Guess what I've noticed! On any project (And I mean ANY project) if you click the green flag, no matter where you are or what's happening in the project, it will ALWAYS have a random amount of lag in it! Holy crud nuggets! And I have some really cool projects planned!

Last edited by MrMario5467 (Sept. 19, 2013 12:34:04)

G-ForceGames
Scratcher
19 posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

MrMario5467 wrote:

And I have some really cool projects planned!
Me too!
Jackpot727
Scratcher
15 posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Nice!
Jackpot727
Scratcher
15 posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Yay!
Jackpot727
Scratcher
15 posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

Oops. I commented to many times. I didn't even notice!
newbie_coder
Scratcher
6 posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

HTML5 can be useful. Also i can make websites so i might show everyone how useful it can be.
OrcaCat
Scratcher
1000+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

newbie_coder wrote:

HTML5 can be useful. Also i can make websites so i might show everyone how useful it can be.
Exactly.
SuperNicky
Scratcher
100+ posts

8/30/13: Update on lag caused by Adobe Flash pulling support for pixel-bender.

T

TheMatrixKid wrote:

So that's why ghost and colour effects lag my programming so much…there goes a day/night cycle that was trialled!
By the way, BYOB runs on JavaScript, so why can't Scratch? It can't be that hard!
he thingy about microsoft and apple are funny but change jobs to wozniak and did bill gates make his first server with microsoft? Yes.



I don't have it

Powered by DjangoBB