Allow sprite positions that are not whole numbers
id: 751024
category: Suggestions
posts: 6
Mar 29, 2024 18:49:03
Allow sprite positions that are not whole numbers
view on scratch
view on legacy ocular
alexandretherrien
loading
If you set at sprite position to x = 10, as expected the sprite will move to x = 10. If you then set the position to 10.4, you would expect the sprite to move a little bit to the right.
In reality, the sprite's ‘'x position’' variable will change to 10.4, but the sprite will not move at all on the screen. That is because, on the stage, sprites can only go to positions that are whole numbers. The problem with this is that it makes every movement more choppy and less precise.
Turbowarp's ‘'high quality pen’' setting fixes the problem by allowing positions that are not whole numbers. So, to show how this issue affects projects, here's the same scratch project, but the first link is how the project looks on scratch the second one is how the scratch project would look if decimal positions were allowed (high quality pen enabled).
1. https://scratch.mit.edu/projects/891057830/fullscreen/
2. https://turbowarp.org/891057830/fullscreen?hqpen
Noticed how, with the second link, the movement of the background is way smoother than with the first link where the background movement is not smooth at all. Unfortunately, right now, this problem can not be fixed on scratch and will be noticed even in the most well made projects.
So could the Scratch Team allow sprite positions that are not whole numbers?
In reality, the sprite's ‘'x position’' variable will change to 10.4, but the sprite will not move at all on the screen. That is because, on the stage, sprites can only go to positions that are whole numbers. The problem with this is that it makes every movement more choppy and less precise.
Turbowarp's ‘'high quality pen’' setting fixes the problem by allowing positions that are not whole numbers. So, to show how this issue affects projects, here's the same scratch project, but the first link is how the project looks on scratch the second one is how the scratch project would look if decimal positions were allowed (high quality pen enabled).
1. https://scratch.mit.edu/projects/891057830/fullscreen/
2. https://turbowarp.org/891057830/fullscreen?hqpen
Noticed how, with the second link, the movement of the background is way smoother than with the first link where the background movement is not smooth at all. Unfortunately, right now, this problem can not be fixed on scratch and will be noticed even in the most well made projects.
So could the Scratch Team allow sprite positions that are not whole numbers?
Mar 30, 2024 07:45:09
Allow sprite positions that are not whole numbers
view on scratch
view on legacy ocular
LionCoder10
loading
yay you're active
Support, the choppy movement gets really annoying to see, especially when I see it chop up one pixel lol
Support, the choppy movement gets really annoying to see, especially when I see it chop up one pixel lol
Mar 30, 2024 08:23:02
Allow sprite positions that are not whole numbers
view on scratch
view on legacy ocular
LP372
loading
Support, smoother movement would be easier.
Mar 30, 2024 12:50:10
Allow sprite positions that are not whole numbers
view on scratch
view on legacy ocular
SpyCoderX
loading
Support. This would allow for smoother and more precise animated… anything.
This might be able to have a block that allows you to toggle having decimals in the position value.
This might be able to have a block that allows you to toggle having decimals in the position value.
set position style [decimals v] ::motion
set position style [no decimals v] ::motion
(position style ::motion)
Mar 30, 2024 13:15:22
Allow sprite positions that are not whole numbers
view on scratch
view on legacy ocular
-stxllxr
loading
I see no reason not to add this, it's a minimal change with massive uses that can't really confuse new Scratchers, as they would have to enable it and the x position could stay shown rounded in the sprite editor area where you can manually set position, direction, etc.
This allows for more advanced use of the screen, as many have said I often see the changing one pixel at a time, which isn't very smooth but with this it can be smooth.
Furthermore, Scratch already allows decimal x and y values, the displayed position is just rounded but if you use this script:
In addition, like the OP stated this allots for more precise pen movement, and pen is a substantial corner piece of many projects, which this would improve.
Lastly, this won't cause problems in projects, because if it was like how post #4 stated, it would be an style or option on integer only values, which would not affect any past projects as other updates have.
This allows for more advanced use of the screen, as many have said I often see the changing one pixel at a time, which isn't very smooth but with this it can be smooth.
Furthermore, Scratch already allows decimal x and y values, the displayed position is just rounded but if you use this script:
repeat (4)the sprite will move 1 pixel to the right.
change x by (0.3)
In addition, like the OP stated this allots for more precise pen movement, and pen is a substantial corner piece of many projects, which this would improve.
Lastly, this won't cause problems in projects, because if it was like how post #4 stated, it would be an style or option on integer only values, which would not affect any past projects as other updates have.