Discuss Scratch

Rendangbike2
Scratcher
1000+ posts

Better Custom Blocks

-OctoSquid- wrote:

when green flag clicked
set [support v] to [95%]
Why do you support?




elps8507
Scratcher
10 posts

Better Custom Blocks

gosoccerboy5 wrote:

elps8507 wrote:

I just cant really think of a reason apart from factorials where you would need anything besides the define and return block. also what stops people from snapping in other blocks that aren't temp variables or loops. just seems overly complex to add a section for code, and temp variables, and a system of keeping the other blocks out. maybe a new connector type? but that still seems a little shaky when you think or needing to implement loops and other control blocks into that system.

not saying that sometimes adding code could be nice but it seems very un-scratch to me to have such a clanky system that is hard to pickup and learn.
Well, Scratch doesn't have many specialized functions, so you could for example build a reporter that finds the distance between two points, or if you're making a game using WASD/arrow keys, you could make a boolean that detects if W or the up arrow key is pressed, saving you a bunch of
<<> or <>>
blocks.

Also, it might feel a little un-Scratch but these systems are prevalent in many text-based programming languages. And a few things in Scratch are hard to learn already, like the sin operator. Scratch has done a very good job of accomodating new programmers but many more advanced programmers (not saying that's me) would like to see more advanced things to do with Scratch, and this is a great building point.

oh only thing I was saying in that post was that it might be hard to implement all these new blocks in ways where they wouldn't conflict with existing systems and confuse people. I am not against custom reporters in the slightest (came to this forum to support their inclusion) and have even proposed a way around this sort of problem. read my post #1527 for that.
gosoccerboy5
Scratcher
1000+ posts

Better Custom Blocks

elps8507 wrote:

To add more detail to my solution from my other post: I think that there should be a 4th section within each sprite (like code, costumes, and sound) called “blocks”. Each block you make would have its own code editor that only contains the blocks you can us inside that type of function. code functions would have almost everything you can use in the code editor besides the round top events while bools/round custom blocks would have access to only diagnostic, operator, and special function blocks like return.
I think that this is the best way to implement these new systems without them interacting with old ones in strange ways.
any critique is welcome as long as your not being rude about it.
Interesting. I feel like if users were properly educated in the use of these blocks they wouldn't try to do silly stuff like a return statement in the middle of a normal script or calling a temporary variable outside of the area it's supposed to be in. Possibly, when one is making a project and they create a custom reporter/boolean or use a temporary variable, there should be a non-intrusive popup that links to somewhere that tells you how to use them.

I like having the define blocks in the same area as the rest of the code, too, it makes things more convenient.

And ideally, these new systems should be designed in a way that creates minimal project crashing. For example if you use a return function out of place, it should ignore the return function instead of creating a syntax error and crashing the project.

elps8507
Scratcher
10 posts

Better Custom Blocks

Rendangbike2 wrote:

elps8507 wrote:

Rendangbike2 wrote:

elps8507 wrote:

I just cant really think of a reason apart from factorials where you would need anything besides the define and return block. also what stops people from snapping in other blocks that aren't temp variables or loops. just seems overly complex to add a section for code, and temp variables, and a system of keeping the other blocks out. maybe a new connector type? but that still seems a little shaky when you think or needing to implement loops and other control blocks into that system.

not saying that sometimes adding code could be nice but it seems very un-scratch to me to have such a clanky system that is hard to pickup and learn.
How hard is it? I think it's pretty explanatory but if they don't know what the block does, they just ignore it.

-schnip schnip-
Well in that case, they should remove the math reporter block which I don't even know how to use them
If you want a debate then great but don't make a bad faith argument to me it goes nowhere and helps no one
elps8507
Scratcher
10 posts

Better Custom Blocks

gosoccerboy5 wrote:

elps8507 wrote:

To add more detail to my solution from my other post: I think that there should be a 4th section within each sprite (like code, costumes, and sound) called “blocks”. Each block you make would have its own code editor that only contains the blocks you can us inside that type of function. code functions would have almost everything you can use in the code editor besides the round top events while bools/round custom blocks would have access to only diagnostic, operator, and special function blocks like return.
I think that this is the best way to implement these new systems without them interacting with old ones in strange ways.
any critique is welcome as long as your not being rude about it.
Interesting. I feel like if users were properly educated in the use of these blocks they wouldn't try to do silly stuff like a return statement in the middle of a normal script or calling a temporary variable outside of the area it's supposed to be in. Possibly, when one is making a project and they create a custom reporter/boolean or use a temporary variable, there should be a non-intrusive popup that links to somewhere that tells you how to use them.

I like having the define blocks in the same area as the rest of the code, too, it makes things more convenient.

And ideally, these new systems should be designed in a way that creates minimal project crashing. For example if you use a return function out of place, it should ignore the return function instead of creating a syntax error and crashing the project.

That's what I'm kind of worried about. yes, if properly educated people would be fine but the beauty of scratch and its block code is that you just cant screw up and get a syntax error/code that doesn't work. having the ability to put a return statement inside a script or god forbid a move statement inside a bool that either chucks out an error or just doesn't work really deviates from the whole point of block coding.
gosoccerboy5
Scratcher
1000+ posts

Better Custom Blocks

Well, if you want to explore the forest, you gotta be ready to get a few cuts and bruises. And I think applying that to Scratch would mean the possibility to mess up your code a bit, but it's going over some fundamental concepts that are great for both learning and game development.
Besides, if designed correctly, we can minimize the effects of such syntax errors. For example, a return statement can be ignored if it's in the middle of a script, and I see nothing wrong with having a motion block in a custom boolean

elps8507
Scratcher
10 posts

Better Custom Blocks

cries in reporter blocks that run code
thatwasdeadsimple
Scratcher
100+ posts

Better Custom Blocks

good idea

“….the right man in the wrong place can make all the difference in the world.” - the G-Man
Check out my CS:GO map!
secretagent123
Scratcher
1000+ posts

Better Custom Blocks

gosoccerboy5 wrote:

ForumHelperNanoPiex wrote:

Maximouse wrote:

Hearst10 wrote:

so, would
 return value [] :: custom-arg cap 
be good?
That would be good.
Very good. But what about
Report []
No, because first of all report might make you think it reports a player, and also it should be a cap block, and it shouldn't be red.
But that's exactly what it does. Reports something.

I don't really use this account any more.
gosoccerboy5
Scratcher
1000+ posts

Better Custom Blocks

elps8507 wrote:

cries in reporter blocks that run code
Ha ha. @TheLogFather actually could have used that in this project btw

secretagent123 wrote:

gosoccerboy5 wrote:

No, because first of all report might make you think it reports a player, and also it should be a cap block, and it shouldn't be red.
But that's exactly what it does. Reports something.
I think we settled on return, because that's how it's called in other languages, and it won't make people think it reports a user to the ST

ImAnPopularYoutuber1
Scratcher
100+ posts

Better Custom Blocks

support bc i had an idea about it




PS: would you like to give me an Internet? Then click on the blue text! also please click this: CLICK ME
gosoccerboy5
Scratcher
1000+ posts

Better Custom Blocks

The link is here btw

PATSATDAT
Scratcher
1000+ posts

Better Custom Blocks


sathvikrias wrote:

AHypnoman wrote:

My support has changed slightly over the last few months. I think it would be best for everyone if we just have 4 new blocks. Those being:
define (Thing)

define <Thing>

define meant to be a loop:: custom loop


return [] :: custom-arg cap // I edited these so its in the right category and a string input
and these?????????????????????????????????????????????????????????????????????????????????????????????????????????????????
use temporary variables (. . .) @addInput{
} :: variables
use temporary lists (. . .) @addInput{
} :: list
I prefer
Create variable (...) @addInput ::variables
Create list (...) @addInput ::list
And as someone said before it would be like let
Rendangbike2
Scratcher
1000+ posts

Better Custom Blocks

PATSATDAT wrote:

sathvikrias wrote:

AHypnoman wrote:

My support has changed slightly over the last few months. I think it would be best for everyone if we just have 4 new blocks. Those being:
define (Thing)

define <Thing>

define meant to be a loop:: custom loop


return [] :: custom-arg cap // I edited these so its in the right category and a string input
and these?????????????????????????????????????????????????????????????????????????????????????????????????????????????????
use temporary variables (. . .) @addInput{
} :: variables
use temporary lists (. . .) @addInput{
} :: list
I prefer
Create variable (...) @addInput ::variables
Create list (...) @addInput ::list
And as someone said before it would be like let
please don't put offtopic things




lapisi
Scratcher
1000+ posts

Better Custom Blocks

PATSATDAT wrote:

sathvikrias wrote:

AHypnoman wrote:

My support has changed slightly over the last few months. I think it would be best for everyone if we just have 4 new blocks. Those being:
define (Thing)

define <Thing>

define meant to be a loop:: custom loop


return [] :: custom-arg cap // I edited these so its in the right category and a string input
and these?????????????????????????????????????????????????????????????????????????????????????????????????????????????????
use temporary variables (. . .) @addInput{
} :: variables
use temporary lists (. . .) @addInput{
} :: list
I prefer
Create variable (...) @addInput ::variables
Create list (...) @addInput ::list
And as someone said before it would be like let
but then someone could do this:
forever
Create variable (...) @addInput ::variables
end
to make scratch crash

don't forget

by the way MagicCoder330 is hosting a social experiment, I'm curious to see where it goes, please comment on it I want to see what the next phase is

uh… I just reported a project for including a swear word but in typing the report I accidentally reported it as the wrong swear word… well excrement
AHypnoman
Scratcher
1000+ posts

Better Custom Blocks

Maybe a 200000 limit then?

~ AHypnoman (Use Shift+Down Arrow to see the rest of my signature)







I am an evil kumquat, and your siggy looks tasty…
Hello there, I'm AHypnoman, If you write my name remember to capitalize the “H”. “When you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.” I write though as tho.
According to the Chrome Console, my viewbox attribute is “Garbage”. Very nice, Chrome.
#TrendyHashtag
Gib internneeet

Play Retorquebit!


gosoccerboy5
Scratcher
1000+ posts

Better Custom Blocks

How about a 20 temporary variable limit?
(That is, per script)

Last edited by gosoccerboy5 (Jan. 12, 2021 17:23:44)


AHypnoman
Scratcher
1000+ posts

Better Custom Blocks

gosoccerboy5 wrote:

How about a 20 temporary variable limit?
(That is, per script)
1000? Because it's probably best to give much more than enough.

I originally said 200000 because then it aligns with lists.

~ AHypnoman (Use Shift+Down Arrow to see the rest of my signature)







I am an evil kumquat, and your siggy looks tasty…
Hello there, I'm AHypnoman, If you write my name remember to capitalize the “H”. “When you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.” I write though as tho.
According to the Chrome Console, my viewbox attribute is “Garbage”. Very nice, Chrome.
#TrendyHashtag
Gib internneeet

Play Retorquebit!


gosoccerboy5
Scratcher
1000+ posts

Better Custom Blocks

I mean, who uses 1000 anyways
Why not 100, 200, 500 max
I guess it is better to provide more than less, you're right. But who uses more than 500 temporary variables?
I suppose in the end it's arbitrary once you go above 50

Last edited by gosoccerboy5 (Jan. 12, 2021 17:49:54)


Hearst10
Scratcher
100+ posts

Better Custom Blocks

AHypnoman wrote:

-snip-
define meant to be a loop:: custom loop
-snip-
that block should never be added. It would look like this:
define while <bool> (action :: stack) :: loop
repeat until <not <bool>>
action :: custom-arg
end
so, you can make a reporter or predicate c-loop.
for example:
define (duration of {action :: custom-arg} :: sensing)
script variables variables ((old timer) :: grey) @addInput :: grey
set [old timer v] to (timer)
action :: custom-arg
return ((timer) - (old timer)) :: custom-arg cap
is that not clear?

Moving from Scratch? Don't learn C or Java, try Snap!

Powered by DjangoBB