Discuss Scratch
- Discussion Forums
- » Suggestions
- » Allow sprite positions that are not whole numbers
- alexandretherrien
- Scratcher
500+ posts
Allow sprite positions that are not whole numbers
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?
- LionCoder10
- Scratcher
500+ posts
Allow sprite positions that are not whole numbers
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
I MAY BE WRONG IN THE FORUMS!
Highlight this signature, then hold Shift+Down to see the rest of my signature!
ABOUT ME
- Quality>Quantity Game Developer
- I love racing games, non-generic platformers, and puzzle games!
- Forumer with 484 posts. I got a topic stickied!
- Check out my profile!
- Look at my brothers profiles (feisytiger23 and ducklucky14), or my friends (Ecrew4 and RobotSteve2014)!
- The Speed Trials
- Supersonic-A Mobile Friendly (Non-Generic) Platformer
- Prime Number Checker/List
- Slime Smash-Minimation
POST MILESTONES: 1st, 5th, 10th, 25th, 50th, 100th, 250th!
Thanks for reading all of my signature :) Comment “curiosity” on my profile if you did
- LP372
- Scratcher
1000+ posts
Allow sprite positions that are not whole numbers
Support, smoother movement would be easier.
- SpyCoderX
- Scratcher
500+ posts
Allow sprite positions that are not whole numbers
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)
New game! (link)
Have a good day/night!
\(-_-) ::#00AAAA //This is crypto. He protects my signature from the evil kumquats!Programming is a very powerful skill. As are critical thinking and hard work.
- SpyCoderX
- -stxllxr
- New to Scratch
100+ posts
Allow sprite positions that are not whole numbers
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.
- Discussion Forums
- » Suggestions
- » Allow sprite positions that are not whole numbers