Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » Position of sprites not updating right since approximately Friday Feb. 21st
- -Jie-
-
13 posts
Position of sprites not updating right since approximately Friday Feb. 21st
I think I found a bug that started around last Friday (plus or minus one day, I'm in Japan, I live in the future).
I was playing with some simple code, bug following a colored path thanks to a colored marker ( very much like these projects, http://scratch.mit.edu/projects/391731/ and http://scratch.mit.edu/projects/1522852/ ) which stopped working from one day to the next with no apparent reason. (the two projects just mentioned are not working they were supposed to at this time either).
Another project, the most viewed this month, a car parker, ( http://scratch.mit.edu/projects/11704649/ ) also works with a color touching color kind of algorithm and since 5 days ago, dozen of commenters suddenly started complaining that the car crashes for no reason. That leads me to believe I'm not the only one with the issue.
I simplified my code to the max and came up with this
With the following setup.

The fushia ball turns around the cross, the image above is what is expected, but when I click on the same code again I got

which is wrong. Note that the speech bubble is still where the fushia ball used to be.
If I click on stop and start from the opposite direction I get

which is correct and if I launch the code again I get

which is wrong.
Was there an small update on Scratch's code or something?
Sorry for being so long, I tried to be detailed.
I'm on Mac OS 10.7.5, I tried Safari and Chrome and saw the same thing.
I was playing with some simple code, bug following a colored path thanks to a colored marker ( very much like these projects, http://scratch.mit.edu/projects/391731/ and http://scratch.mit.edu/projects/1522852/ ) which stopped working from one day to the next with no apparent reason. (the two projects just mentioned are not working they were supposed to at this time either).
Another project, the most viewed this month, a car parker, ( http://scratch.mit.edu/projects/11704649/ ) also works with a color touching color kind of algorithm and since 5 days ago, dozen of commenters suddenly started complaining that the car crashes for no reason. That leads me to believe I'm not the only one with the issue.
I simplified my code to the max and came up with this
turn right (180) degrees
if <color [#00f] is touching [#f0f]?> then
say [Touching]
else
say [Not touching]
end
With the following setup.

The fushia ball turns around the cross, the image above is what is expected, but when I click on the same code again I got

which is wrong. Note that the speech bubble is still where the fushia ball used to be.
If I click on stop and start from the opposite direction I get

which is correct and if I launch the code again I get

which is wrong.
Was there an small update on Scratch's code or something?
Sorry for being so long, I tried to be detailed.
I'm on Mac OS 10.7.5, I tried Safari and Chrome and saw the same thing.
- speakvisually
-
500+ posts
Position of sprites not updating right since approximately Friday Feb. 21st
Hi,
Can you send over the example project? From the code you've provided, I do not see an error. You need to place the “If / Then Else” block in a Forever loop to constantly be updating the “If / Then Else” statement.
Can you send over the example project? From the code you've provided, I do not see an error. You need to place the “If / Then Else” block in a Forever loop to constantly be updating the “If / Then Else” statement.
forever
if <color [#00f] is touching [#f0f]?> then
say [Touching]
else
say [Not touching]
end
Last edited by speakvisually (Feb. 25, 2014 14:49:06)
- -Jie-
-
13 posts
Position of sprites not updating right since approximately Friday Feb. 21st
I guess it wasn't very clear. Apologies.
Here is the project: http://scratch.mit.edu/projects/18397922/
Basically for me, when I run it, it keeps saying ‘touching’ even though it's clearly not.
Here is the project: http://scratch.mit.edu/projects/18397922/
Basically for me, when I run it, it keeps saying ‘touching’ even though it's clearly not.
- DadOfMrLog
-
1000+ posts
Position of sprites not updating right since approximately Friday Feb. 21st
Hmmm, interesting.
It even fails if you just ask "if touching color [blue]“.
But if you put a ”show" into the loop then it works as it should (including the speech bubble moving to the expected place)…
Could well be a (new?) bug.
Edit: also makes it work correctly by changing an effect in the loop (e.g. ghost, brightness, etc.) or changing the size (even by zero, so it does nothing).
It even fails if you just ask "if touching color [blue]“.
But if you put a ”show" into the loop then it works as it should (including the speech bubble moving to the expected place)…

Could well be a (new?) bug.
Edit: also makes it work correctly by changing an effect in the loop (e.g. ghost, brightness, etc.) or changing the size (even by zero, so it does nothing).
Last edited by DadOfMrLog (Feb. 25, 2014 20:03:01)
- procd
-
100+ posts
Position of sprites not updating right since approximately Friday Feb. 21st
Interesting for me too. I compiled the project using a compiler I ‘ve written and it works as you’d expect. The one area where the performance of the compiled version is lacking is the touching colour and colour touching colour blocks. I've been thinking of ways to improve the performance and this bug is possibly a clue that Scratch uses the optimisation I was considering. To perform the touching function the way the compiled version does it is to render the whole scene but without the sprite/clone which is running the touching script. It then creates a transform to map the sprite to the rendered stage and “walks” through each sprite's pixel and the corresponding rendered stage pixel to see if a sprite pixel is touching a rendered stage pixel of the correct colour. The optimisation I was thinking was that the rendered stage is unlikely to change between touching blocks in the same script and so you don't need to re-render the scene each time. Looks like Scratch is not re-orienting the sprite when I does the test, maybe due to caching that too?
- speakvisually
-
500+ posts
Position of sprites not updating right since approximately Friday Feb. 21st
It appears another Scratcher is encountering this issue. I'll submit this bug to the Scratch development team. Thanks again for telling us about this :]
- Discussion Forums
- » Bugs and Glitches
- » Position of sprites not updating right since approximately Friday Feb. 21st