Discuss Scratch

Yanderan
Scratcher
100+ posts

"Almost"


Here is my newest (for now) idea:
<almost touching color [#758606] ?::sensing>
I would like a reply saying
Nice idea! Support!

Last edited by Yanderan (Aug. 20, 2016 13:38:00)

DownsGameClub
Scratcher
1000+ posts

"Almost"

“Almost” seems too ambiguous to me. Sorry, but I won't support. There are over millions of definitions of the term, almost, and especially since programming should be exact, you should probably use this workaround.

<<[x] < [y]> or <[x] < [z]>>
alexphan
Scratcher
1000+ posts

"Almost"

Define “almost”.
MasterJPixel
Scratcher
500+ posts

"Almost"

alexphan wrote:

Define “almost”.
I have the same question. No support until further notice.
pinkieofthepies
Scratcher
500+ posts

"Almost"

define almost, how far would it be from it. like if it was
if <almost ((6) - (1))::operators> then
say [...]
end

would it just respond to 5 6 and 7, or would it also go for 8,4 ECT?

Last edited by pinkieofthepies (Aug. 19, 2016 20:45:21)

Yanderan
Scratcher
100+ posts

"Almost"

MasterJPixel wrote:

alexphan wrote:

Define “almost”.
I have the same question. No support until further notice.
OK. Here's a really good example:
when gf clicked
forever
if <almost <touching color [#b7db01] ?>::operators> then
end
end

Last edited by Yanderan (Aug. 19, 2016 21:08:45)

Sigton
Scratcher
1000+ posts

"Almost"

Why does it have a Boolean input; Booleans only have 2 possible values so one cannot be “almost” the other.

Sigton
Ziggy741
Scratcher
1000+ posts

"Almost"

Wait, what would it exactly do? Would it report true for this?
almost <((1) + (0.9)) = [2]> :: boolean operators
alexphan
Scratcher
1000+ posts

"Almost"

Yanderan wrote:

*sniff* No one likes me. If you think I'm horrible, just quote this and either put Y (you hate me) or N (you like me)
Why in the world do you think we hate you? We don't hate you, we just need more details on your idea.

Now, let's look at the example you provided:
when gf clicked
forever
if <almost <touching color [#b7db01] ?>::operators> then
end
end
This means it's close to touching the color, right?

But how “close” does the sprite have to be? 10 pixels? 20 pixels? 1 pixel? The word “almost” just seems ambiguous.
Paddle2See
Scratch Team
1000+ posts

"Almost"

Some off-topic posts removed. Please make sure your posts remain focused on the suggestion.
Yanderan
Scratcher
100+ posts

"Almost"

Paddle2See wrote:

Some off-topic posts removed. Please make sure your posts remain focused on the suggestion.
Thanks for balancing this out, Paddle2See
Yanderan
Scratcher
100+ posts

"Almost"

alexphan wrote:

Yanderan wrote:

*sniff* No one likes me. If you think I'm horrible, just quote this and either put Y (you hate me) or N (you like me)
Why in the world do you think we hate you? We don't hate you, we just need more details on your idea.

Now, let's look at the example you provided:
when gf clicked
forever
if <almost <touching color [#b7db01] ?>::operators> then
end
end
This means it's close to touching the color, right?

But how “close” does the sprite have to be? 10 pixels? 20 pixels? 1 pixel? The word “almost” just seems ambiguous.
It has to be at least within 8 pixels of the color
Sigton
Scratcher
1000+ posts

"Almost"

Yanderan wrote:

It has to be at least within 8 pixels of the color
Would it's distance from that color or how close the color it is touching is to that color?

Sigton
Alberknyis
Scratcher
1000+ posts

"Almost"

“Almost” is waaaaay too ambiguous. Everyone has a different idea of almost. If what you want is this:

<within () pixels of color [#395f4a]::sensing>

Then that's what you need to suggest.

But I wouldn't support either . I wouldn't find this block useful at all.
Sheep_maker
Scratcher
1000+ posts

"Almost"

<almost<key [space v] pressed>::operators>
<almost<mouse down>::operators>
<almost<not<>>::operators>
what would those report, assuming my finger is 1 cm above the space bar and another finger is 2 cm above the primary mouse button?
Alberknyis
Scratcher
1000+ posts

"Almost"

Sheep_maker wrote:

<almost<key [space v] pressed>::operators>
<almost<mouse down>::operators>
<almost<not<>>::operators>
what would those report, assuming my finger is 1 cm above the space bar and another finger is 2 cm above the primary mouse button?

First, Scratch would have to officially define “Almost” for every occasion this block can be used in. Let's say for key presses, your finger has to be touching the key, but not pressing it. Same for mouse. This would definitely work and not fail. And for the last boolean, if the statement in the “Almost” block is false, but very close to true (true within 1 degree of truthfulness), then it would report true.
pinkieofthepies
Scratcher
500+ posts

"Almost"

Paddle2See wrote:

Some off-topic posts removed. Please make sure your posts remain focused on the suggestion.
why was my post removed? it was focused on the suggestion DX

anyways, im starting to get this, but there are some things that seem “broken”

<almost <not <key [v v] pressed?>>::operators>

thats just one example.

how would this work?
Alberknyis
Scratcher
1000+ posts

"Almost"

pinkieofthepies wrote:

<almost <not <key [v v] pressed?>>::operators>


thats just one example.

how would this work?

*sigh* If you're pressing the key, but you're almost not pressing it, then it returns true. Is it really that hard?

Last edited by Alberknyis (Aug. 20, 2016 07:33:29)

Jonathan50
Scratcher
1000+ posts

"Almost"

Alberknyis wrote:

*sigh* If you're pressing the key, but you're almost not pressing it, then it returns true. Is it really that hard?
Most PCs can't detect that sort of thing.
mrbobbygreathead
Scratcher
1000+ posts

"Almost"

The problem is that you would have to manually make an algorithm for each block it's applied to. It's unnecessary, abstract and workarounds can be made.

Powered by DjangoBB