Discuss Scratch

colorgram
Scratcher
27 posts

Costume bugs, brightness bugs, graphical glitches, etc

1.) This block
switch costume to [ (Some Number) ]
Causes switch to the costume number OR costume name if the name is that number. Depending on the sprite and even between identical sprites, one path is preferred is preferred over the other, seemingly randomly. That's the bug.

2.) Graphics blurring in the online client. This happens only to some sprites, I have no idea why. Converting bitmap <-> vector doesn't fix the problem, only makes it a different kind of blur.
Screenshot: http://i61.tinypic.com/2ezjt3r.png

3.) Set brightness to (some positive number) is ignored in the online client
Screenshot: http://i61.tinypic.com/2n9cmme.png
I've tried rearranging this script and setting brightness to other values between 1-100, nada. All the other blocks trigger fine, only set brightness (positive number) doesn't work.

FYI: Latest scratch client v430, latest flash plugin v16

Last edited by colorgram (Dec. 24, 2014 21:07:06)

TheLogFather
Scratcher
1000+ posts

Costume bugs, brightness bugs, graphical glitches, etc

colorgram wrote:

1.) This block
switch costume to [ (Some Number) ]
Causes switch to the costume number OR costume name if the name is that number. Depending on the sprite and even between identical sprites, one path is preferred is preferred over the other, seemingly randomly. That's the bug.
It's not random, but to do with how Scratch is treating whatever variable/expression you've dropped into there. If Scratch is treating it as a number then it will take the costume with that number. If Scratch is treating it as text, then it will look for a costume with that name.

For example, create a sprite with first costume called “2” and second costume called “1”. Now try this:
switch to costume ( (1)+(0) ) // switches to first costume, number one
switch to costume (letter (1) of [1]) // switches to costume with name "1" (i.e. second costume)
Scratch tries hard to hide the distinction between things as text and things as numerical values, but there are times when it just can't, and has to make its best guess…

What I'd recommend, to be on the safe side, is that if you are going to have costumes that have numerical names, then you make sure they match with their costume numbers (i.e. first costume has name “1”, second has name “2”, etc.) That way there can be no confusion. Otherwise, you have to do the work of ensuring that you make your variables/expressions in switch costume statements into exactly the right type of thing that you want Scratch to use (i.e. text or numerical).


colorgram wrote:

2.) Graphics blurring in the online client. This happens only to some sprites, I have no idea why. Converting bitmap <-> vector doesn't fix the problem, only makes it a different kind of blur.
Screenshot: http://i61.tinypic.com/2ezjt3r.png
This is because of the difference between the original Flash player and the new Stage3D player. The second of those only gets used if your project has effects in it (except ghost), because it uses a special technique to do effects very quickly (Stage3D, hence the name). Unfortunately, it also has some other side-effects - and the blurriness in the graphics (esp. with effects applied) is, sadly, one of those…

You can flip between player types (even while a project is running) by hitting ctrl-M (or Cmd-shift-M on a Mac). If you are using the original player, then you'll see that the blurriness goes away. You'll also see that effects become *much* slower…

If your project has no effects in it (except ghost) then it will use the original player, so that will also avoid the blurriness.

colorgram wrote:

3.) Set brightness to (some positive number) is ignored in the online client
Screenshot: http://i61.tinypic.com/2n9cmme.png
I've tried rearranging this script and setting brightness to other values between 1-100, nada. All the other blocks trigger fine, only set brightness (positive number) doesn't work.
This is a bug with the Stage3D brightness effect. See here for more details…
(Again, if you hit ctrl-M/cmd-shift-M then you'll switch to the original player, and this problem will go away…)

There's a bug report here: https://github.com/LLK/scratch-flash/issues/570

Last edited by TheLogFather (Dec. 25, 2014 21:54:48)


Siggy the Kumquat slayer:
Main account: DadOfMrLog –– Frameworks for basic pen-rendered 3D in scratch (see studio). Examples:

- - - - 3D Text - - - - - - Simple shapes - - - Controllable structures - - - On the ground - - - - - - In space - - - -

colorgram
Scratcher
27 posts

Costume bugs, brightness bugs, graphical glitches, etc

2 & 3 were the ones really giving me trouble, thanks for the info mate

Powered by DjangoBB