Discuss Scratch
- Discussion Forums
- » Suggestions
- » Changing Width and Height Separately
- Wubba4900
-
Scratcher
2 posts
Changing Width and Height Separately
Ok but then the shader would be kinda complicated as first you would have to scale horizontally to one which means knowing the width. But I don't know if GLSL has AABB detectionThat's what vertex shaders are for.
Yes, doing this with a fragment shader would be next to impossible unless you already knew the width and height of the sprite, and there was only one sprite on the stage. Vertex shaders exist solely to move vertices (in this case, the mathematical points describing the triangles that that make up a sprite) so stretching isn't hard for them.
How do you go past 600 pixels in height
https://scratch.mit.edu/projects/1149612585 Seven-Sez-Two is too tall, is there things to help me
- 10goto10
-
Scratcher
1000+ posts
Changing Width and Height Separately
This topic is getting a little hard to follow since it’s been combined with two related but slight different suggestions and because topics tend to go off topic over time.
You can’t tell it from the original post but the “stretch” topics that were merged into this single topic were :
No one seems to know why it was removed from the editor palette prior to Scratch 1.0. I saw one note (which I can’t find now) saying that the early Scratch testers thought that the stretch block and the size block were the same thing (since they both only used one argument) and didn’t waste time on seeing what the stretch block actually did.
The legacy stretch block is partially implemented in Scratch 3.0. In a legacy project it will show up in the scripts it just does not do anything. Perhaps it would take less developer time to fully implement.
The main reason to add it as an effect (even if it was just for one dimension) is to avoid adding another block to the palette. Also beginners tend to experiment with different effects without worrying if they first understand what one does.
Scaling both the X and Y dimensions gives the best function but also looks like it creates the most demand for addition blocks in order to report the values and change them independently.
Many people have pointed out that the stretch function is unnecessary because we can all become graphic artists and create the dozens of costumes that are needed to simulate this programmable function. I’ve tried it. It’s not fun. People who say ‘no support’ because of this is should try making costumes for a project (and please share the project and your experience).
People also point to a way to make a distorted stretch effect using the fisheye. I’ve used it. It’s not a low-floor type of option that you’d expect beginners to be able to do.
I believe beginners would enjoy using a stretch programmable feature and would find ways to use it creatively.
I would post links to my Snap projects where I’ve had fun using it but this post is already much too long. (And my thanks to anyone who as read this far.)
You can’t tell it from the original post but the “stretch” topics that were merged into this single topic were :
- Add a new block that allows people to independently change the x and y scaling of a costume.
- Add a stretch effect to the effect block (so that would mean not adding any new blocks to the editor palette).
- Restore the legacy stretch blocks which worked in Scratch 1.4 — even if it was not in the palette — and which only stretched a costume in the Y direction.
No one seems to know why it was removed from the editor palette prior to Scratch 1.0. I saw one note (which I can’t find now) saying that the early Scratch testers thought that the stretch block and the size block were the same thing (since they both only used one argument) and didn’t waste time on seeing what the stretch block actually did.
The legacy stretch block is partially implemented in Scratch 3.0. In a legacy project it will show up in the scripts it just does not do anything. Perhaps it would take less developer time to fully implement.
The main reason to add it as an effect (even if it was just for one dimension) is to avoid adding another block to the palette. Also beginners tend to experiment with different effects without worrying if they first understand what one does.
Scaling both the X and Y dimensions gives the best function but also looks like it creates the most demand for addition blocks in order to report the values and change them independently.
Many people have pointed out that the stretch function is unnecessary because we can all become graphic artists and create the dozens of costumes that are needed to simulate this programmable function. I’ve tried it. It’s not fun. People who say ‘no support’ because of this is should try making costumes for a project (and please share the project and your experience).
People also point to a way to make a distorted stretch effect using the fisheye. I’ve used it. It’s not a low-floor type of option that you’d expect beginners to be able to do.
I believe beginners would enjoy using a stretch programmable feature and would find ways to use it creatively.
I would post links to my Snap projects where I’ve had fun using it but this post is already much too long. (And my thanks to anyone who as read this far.)
- davidtheplatform
-
Scratcher
500+ posts
Changing Width and Height Separately
One way to add it as an effect is to make positive values stretch horizontally, and have negative values stretch vertically, all while keeping the area of the sprite the same.
Demo: https://scratch.mit.edu/projects/1169972149/
Advantages:
* Keeping it as an effect means less clutter in the block palette
* Horizontal and vertical stretch are both possible
* Keeping the area of the sprite constant makes the transition between vertical and horizontal stretching smoother and more intuitive
* Using the size block isn't required, and is completely independent of the stretch effect
Demo: https://scratch.mit.edu/projects/1169972149/
Advantages:
* Keeping it as an effect means less clutter in the block palette
* Horizontal and vertical stretch are both possible
* Keeping the area of the sprite constant makes the transition between vertical and horizontal stretching smoother and more intuitive
* Using the size block isn't required, and is completely independent of the stretch effect
- 10goto10
-
Scratcher
1000+ posts
Changing Width and Height Separately
I recently saw where someone had made a new topic about adding a stretch effect. Of course someone pointed out that it was a duplicate suggestion but it’s good to know that people are still asking for some kind of programmable, beginner friendly, stretch feature.
Perhaps if we provided examples of how beginners might use this feature it would help to convince the Scratch Team to implement this suggestion.
I have a couple of examples each with a Scratch implementation and a Snap version. They are all very short.
Example one
Example two
Perhaps if we provided examples of how beginners might use this feature it would help to convince the Scratch Team to implement this suggestion.
I have a couple of examples each with a Scratch implementation and a Snap version. They are all very short.
Example one
- Scratch version (no stretch) https://scratch.mit.edu/projects/621529919/
- Snap version (with stretch) https://snap.berkeley.edu/project?username=10goto10&projectname=Adventure%20with%20Stretch%20%2d%20Part%20One
Example two
- Scratch version (no stretch) https://scratch.mit.edu/projects/622930329/
- Snap version (with stretch) https://snap.berkeley.edu/project?username=10goto10&projectname=Adventure%20with%20Stretch%20Part%20two
- aaliyaan0110
-
Scratcher
500+ posts
Changing Width and Height Separately
Ever since about 6th grade, I've been using Scratch. Now in college, I use Scratch a fair amount less than I used too, but there is one feature that I wish would be implemented, which is sprite stretching. The applications of this are fairly broad, ranging from animation made with greater ease to routine graphical effects that exist in other languages, like Python, where you can import libraries like Pillow that allow you to manipulate images. Examples of the blocks I have in mind are below:change [horizontal stretch v] effect by (25) ::looks
change [vertical stretch v] effect by (25) ::looks
set [horizontal stretch v] effect to (25)% ::looks
set [vertical stretch v] effect to (25)% ::looks
set stretch to x (240) y (-180) ::looks
(Vertical Stretch ::sensing)
(Horizontal Stretch ::sensing)
These blocks and the concepts behind them seem to be fairly intuitive, easy to understand, and readily accessible for a younger demographic who may not want or desire to put in the time commitment of researching work arounds that tend to be time consuming.
As I understand it, this is not the first time by far stretching has been suggested for Scratch. This current topic is currently a merged topic between u/epicanna27 - created on November 17, 2014 - and mine - created on February 15, 2015. Other topics on this suggestion can be found here, here, and here. There was even at one point a “Change Stretch by ()” block considered for scratch at one time, as seen here (also linked above), and in u/Paddle2See's post in this forum:In the 1.4 version of Scratch, if you search through the source code (which is in a language called Squeek), you will find traces of an experimental “stretch” block! However, it was never in any of the officially released versions that I have used. I can only assume that it was decided that it was too confusing - or not useful enough - to earn a permanent place in the block pallet. Which is too bad as it would be very helpful for certain kinds of visual effects.
Part of what makes Scratch so easy to learn and such a great first language is it's simplicity. Every new block that is added makes it a bit more complex - so new blocks are added only after long consideration.
Alas, that is all that I have for this suggestion. I hope I have swayed some minds, and, above all else, I hope to see amazing feedback from all who come to this topic. The current iteration of this suggestion was made possible by the users u/The_Scratch_Squad, u/Skelepound, and u/ihgfedcba and any future suggestions only serve to make this suggestion stronger. Thanks for your time. Below is a list of all supporters I've tallied as of October 12, 2020:that whole stretch block is from a mod
- ninjacat28_
-
Scratcher
100+ posts
Changing Width and Height Separately
We already have a block that will change the size of a sprite:change size by (1)But is this alone what we need?
I'm proposing we switch “size” to a drop-down box that says “size, width, height” instead.
This way we could choose to change the width and height separately, or just use size to change them both.
These three blocks below are what I'm picturing.change [size v] by (1) :: looksOf course, we'd need to make two new variables:
change [width v] by (1) :: looks
change [height v] by (1) :: looks(size)
(width :: looks)
(height :: looks)
And unlike my previous “Online and Offline Blocks” idea, I put thought into this. I even came up with it while I was watching an animation that clearly needs the “width” block! It showed a sprite becoming wider and wider. The current only way to do this is to make a bunch of costumes, and unless you spend an unnecessary amount of time animating it, it'll be pretty chunky. That's what happened in the animation. But because it's easy to create something that appears smooth with the existing size block, if we made it work for width and height, we could make lots more things smooth.
You could use fisheye and an invisible rectangle on the top of the sprite, (for more reference watch the griffpatch tutorial on stretchy sprites)
- Batni
-
Scratcher
5 posts
Changing Width and Height Separately
PLEASE I NEED STRETCH BLOCKS FOR MY GAMES HOMER BOUNCING ANIMATION AND MORE GIVE ME THAT DELIGHTFUL BLOCK NOW OH GOD PLEASE IM BEGGING YOU
- iboyjax
-
Scratcher
1 post
Changing Width and Height Separately
Support! I've been wanting this for forever, I was trying to make a universal scroll line that could be remixed and set to have length of scroll and position and then it would just work, but I can't make it because this doesn't exist. I've also been making a health bar but because this doesn't exist I can't. Scratch NEEDS this.
- Discussion Forums
- » Suggestions
-
» Changing Width and Height Separately






