Discuss Scratch

DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

Example: http://beta.scratch.mit.edu/projects/10042142/

When the car starts driving, music will start to play, but you will hear that it heavily stutters. You can see that the amount of stuttering varies with the FPS. Fixed!

If you press any key while the player has focus, the project will still run at the same speed but the display will freeze, even permanently in some cases. No scripts are active that take input.

Last edited by DCPU-16 (April 1, 2013 23:09:56)

DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

bump, I'm using Chrome 24 if that helps anything (just saw the stickied topic)
Sonickyle
Scratcher
1000+ posts

Input freezes project when framerate is less than 30

DCPU-16 wrote:

Example: http://beta.scratch.mit.edu/projects/10042142/

When the car starts driving, music will start to play, but you will hear that it heavily stutters. You can see that the amount of stuttering varies with the FPS.

If you press any key while the player has focus, the project will still run at the same speed but the display will freeze, even permanently in some cases. No scripts are active that take input.
The game in my Signature does this as well in a certain area, especially when you have the game in fullscreen. I'm guessing they made the music/sounds stutter so they won't lose their sync like they did in 1.0-1.4. I don't think there is a work-around to this. See if you can optimise your scripts and see what that does.

Last edited by Sonickyle (Feb. 11, 2013 07:31:51)


No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

Sonickyle wrote:

DCPU-16 wrote:

Example: http://beta.scratch.mit.edu/projects/10042142/

When the car starts driving, music will start to play, but you will hear that it heavily stutters. You can see that the amount of stuttering varies with the FPS.

If you press any key while the player has focus, the project will still run at the same speed but the display will freeze, even permanently in some cases. No scripts are active that take input.
The game in my Signature does this as well in a certain area, especially when you have the game in fullscreen. I'm guessing they made the music/sounds stutter so they won't lose their sync like they did in 1.0-1.4. I don't think there is a work-around to this. See if you can optimise your scripts and see what that does.
It's more likely that the projects they test wouldn't tend to go under full speed, since you really need to do a lot to cause a slowdown, so they never expected an issue like this. I'm guessing Scratch processes 1/30th of a second of sound every frame instead of asynchronously processing 1/30th of a second of sound every 1/30th of a second regardless of frames. I'm not sure anyone would deliberately want stuttering like this, so I don't think it's by design.

The input freezing definitely shouldn't be there though, there's no way that's by design.

(also there's no way i can optimise that )

Last edited by DCPU-16 (Feb. 11, 2013 18:11:21)

Sonickyle
Scratcher
1000+ posts

Input freezes project when framerate is less than 30

DCPU-16 wrote:

Example: http://beta.scratch.mit.edu/projects/10042142/
The input freezing definitely shouldn't be there though, there's no way that's by design.)

Agreed.

DCPU-16 wrote:

(also there's no way i can optimise that )
Course. I can't understand the scripts when I use See Inside. D:

Last edited by Sonickyle (Feb. 14, 2013 07:43:41)


No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
botcrusher
Scratcher
500+ posts

Input freezes project when framerate is less than 30

i think this is mostly due to flash's limitations and extreme power hogging although i noticed that it barly touched my powerful computers ressources so ithink its definatly flash's limitations i will be glad when scratch moves to html5

Pondering what to work on.
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

botcrusher wrote:

i think this is mostly due to flash's limitations and extreme power hogging although i noticed that it barly touched my powerful computers ressources so ithink its definatly flash's limitations i will be glad when scratch moves to html5
Scratch is single threaded, so while it looks like it's using only 16% of your cpu it's actually using one full thread out of 8. Nothing is done asynchronously so the 7 other threads can't be used!

I've seen quite a few non scratch demos push flash to the limit and still have working input and music, so it's probably more of an implementation thing.
superscripts
Scratcher
24 posts

Input freezes project when framerate is less than 30

I think they've fixed the problem by “doubling the sound buffer” (whatever that means) ;-)

The music in your sample plays perfectly on my machine in Firefox and Chrome. I'm excited to try some new music based stuff.
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

superscripts wrote:

I think they've fixed the problem by “doubling the sound buffer” (whatever that means) ;-)

The music in your sample plays perfectly on my machine in Firefox and Chrome. I'm excited to try some new music based stuff.
Fantastic- sounds great! Input still freezes the project though.
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

Here's a more direct test for this. When the target framerate is less than or equal to 30 and you press any key the cat stops rotating until you release it, at which point the output jumps to where it should be.

http://beta.scratch.mit.edu/projects/10078616/
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

Bump - have any devs had a look at this?
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

I get this issue on MrLog's game too:
http://beta.scratch.mit.edu/projects/10085324/

He says that it works a lot better on Firefox, but I can't test that right now.
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

Looks like the problem is directly related to key repeats when you hold a key down. When you increase the delay before key repeats in the Keyboard Settings you can hold keys for longer before the project freezes up, and apparently this only happens in chrome. Sorry for the quintuple post!
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

http://beta.scratch.mit.edu/projects/10042142/
Check the comments thread with s_federici, the bug might be also related to the scratch website outside the main applet.
Sonickyle
Scratcher
1000+ posts

Input freezes project when framerate is less than 30

This is very noticeable with PepperFlash on Chrome. Pressing any button for half a second on my Main Project freezes the project completely on the spot, making it unplayable. It's still frozen for a short amount of time AFTER I let go of the button. This should not happen AT ALL.
This also means I cannot test my Project with Chrome, which is a great browser.

And before you say “Use the downloadable Shockwave Flash for Chrome”, I can't. Ever since the latest update of Flash and Chrome, the mouse is offset on ‘most’ Flash Games. This is noticeable on Facebook games, like Bejeweled Blitz.

No I don't make projects anymore. I left some time ago.
I only check the forums every now and then, but other than that consider me retired.
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

I'm still getting this with version 313 on chrome.
DadOfMrLog
Scratcher
1000+ posts

Input freezes project when framerate is less than 30

Might as well throw the lag test project into this topic, now that it's bumped so I remembered about it again…

http://scratch.mit.edu/projects/10125047/

Hope the ST find it helpful to get to the bottom of the problem!


Alternate account: TheLogFather –– HowTos and useful custom blocks (see studio). Examples below…


- String manipulation - - - X to power of Y - - - Clone point to clone - Detect New Scratcher - Speed tests studio -

DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

DadOfMrLog wrote:

Might as well throw the lag test project into this topic, now that it's bumped so I remembered about it again…

http://scratch.mit.edu/projects/10125047/

Hope the ST find it helpful to get to the bottom of the problem!
I noticed a comment on the project:
“Google Chrome , as soon as I put my mouse on the screenit lags”
I'm getting this too, if you hover over the project it jitters like when pressing a button. If you move it over and off constantly you get the same effect as holding a key. Same goes for constantly clicking.
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

Bump. Haven't really figured anything else out
DCPU-16
Scratcher
100+ posts

Input freezes project when framerate is less than 30

I'm still getting this, has anyone else looked into it?

Powered by DjangoBB