Size measurement should be the same in Scratch 3.0 and 2.0 to ensure backward compatibility. In 2.0 size is defined as float while in 3.0 the property is rounded to integer.
Size differs between versions making some edge cases result in Scratch 2.0 projects not being compatible with 3.0.
Run and compare this identical project in Scratch 2.0 vs Scratch 3.0:
Observe that the second example will stuck because Intro sprite never reaches 100%
Original issue: https://github.com/LLK/scratch-gui/issues/211
Linux and Google Chrome 56.0.2924.87 (64-bit)
Reopening since #522 made set size act like Scratch 2.0, but the size reporter still needs work.
Specifically, the Scratch 2.0 size reporter returns an integer even when the internal size value might have a fractional component. See also: https://github.com/LLK/scratch-flash/blob/develop/src/primitives/LooksPrims.as#L244
@tmickel shared this example on #522:
But the reporter block in scripts does seem to round, e.g., in Scratch 2.0:
causes the sprite to say hello.
Ah I see, I'll see if I can fix that right away.
Now the above example is working at least, let me know if you find any more places that needs to change.
Between #522 and #528 I believe this is now fixed.
@rschamp @paulkaplan: In the long term I'd like to consider other possible solutions to this, such as removing the rounding from the reporter in favor of rounding in the GUI combined with adding a tolerance to the = operator. We'd have to control that sort of change with a compatibility flag, though, since it would change project behavior in some cases.