Set Size not in Percent

A feature I’d like to see in Hopscotch is: Set Size in Points

I’d use it for this type of project: 🗿

Here are some examples of Hopscotch code that could be improved if we had this: Projects where you have to tap something and make it grow, but percents kinda disproportionate it and may make it <adjective here>

Here is an example design I’ve made: Set Size in Points 1337

I’ve seen something similar in another programming languages, it looks like this: well the same but not in percents mostly everywhere I think

  • Yay
  • or (tap here if dunno)
  • Nay

0 voters

4 Likes

Interesting suggestion. I’m not familiar with how the “Set Points” method works in other languages. Is the unit based on the X and Y grid on the project canvas?

3 Likes

Like you know, imagine the Set Width and Height block but now link these 2 values with each other, so they share the same value

6 Likes

Technically you can do that with variables

4 Likes

Yes, but wouldn’t it be more convenient to have it as one block? At least until we get functions with arguments

4 Likes

Oh, I see what you mean now. Thanks for explaining!

3 Likes

Always welcome :smiley:

3 Likes

My take is that there should be more flexibility in general with parameters.

Like what about “set x position” or “set y position” separately? Anyways, I think what you have is pretty good but it would have to be implemented differently than “size points”

7 Likes

Understandable

5 Likes

You can set the width and height to the same variable

1 Like

Yes, but adding this block to hopscotch would make it simpler….?
See, percents divide an object to 100 pieces
And therefore, increasing it would do this:
If you increase it while it is smaller, it will increase the size by smaller bits
But, if you increase it while it is bigger, it will increase by bigger bits
I think the addition of this block would eliminate this problem, if it has bothered anyone and yeah ^^

2 Likes

Yeah this has actually been confusing for people before — e.g. if you do this, the object will not keep returning to the same size:

Repeat Forever 
    Grow by 25%
    Shrink by 25%

Explanation: This is because the new size is 125% of the original size, after you grow by 25%.
Then when you shrink by 25%, this is 25% of the new size 125%.

125\% - (25\% * 125\%) = 125\% - 31.25\% = 93.75\%

If you wanted it to return to the original size, you’d have to do this:

Repeat Forever 
    Grow by 25%
    Shrink by 20% 

Explanation: When you grow by 25%, the object’s new size is 125% of the original size.

Then when you shrink by 20%, that is 20% of the new size, 125%. The object’s size is now this:

125\% - (20\% * 125\%) = 125\% - 25\% = 100\%

I made a project about it, near when I first started Hopscotching (finally found it, though now I think the explanation is not as clear either )

Getting back to the main point, I do think the percentage can be confusing^^

2 Likes

You can? (hiiii)