Skip to content

Instantly share code, notes, and snippets.

@TheMonsterFromTheDeep
Created November 27, 2016 06:52
Show Gist options
  • Save TheMonsterFromTheDeep/3e5f642551d735a11a5fa618021989da to your computer and use it in GitHub Desktop.
Save TheMonsterFromTheDeep/3e5f642551d735a11a5fa618021989da to your computer and use it in GitHub Desktop.
There are quite a few improvements I have noticed that could be made to custom blocks.
Please read entire post, especially if you are skeptical about it.:)
*NOTICE: Some of these are in other topics, but I feel I should mention them here as well.
IDEAS 1 & 2: (Can you guess what they are? :P)
[img]http://i824.photobucket.com/albums/zz167/junkforwebsites/MockUpArt_zps6f55a962.png[/img]
#1: [b][u]CUSTOM REPORTER BLOCKS[/u][/b]
Custom reporters. If you don't know what a reporter is, [url=wiki.scratch.mit.edu/wiki/Reporter_Block]here[/url] is a helpful wiki article. Basically, these would work similar to how they work in other programming languages. In other languages, it would look something like this:
[code=Java]
int getWaffles()
{
if (waffles == tasty)
{
return 20; //This tells you what "getWaffles()" is equal to. So if I were to say x = getWaffles(); x would either be equal to 20 or 0.
}
else
{
return 0;
}
}
[/code]
So obviously there would need to be some way to return a value.
That is where the "report" block comes in. This is based slightly off of BYOB, which uses the same statement. The reason for this is that report might be easier to understand then return, but it is possible to make it return as well. The bottom report block could be dragged and placed elsewhere in the block. (Thanks @TimothyLawyer for suggesting that!)
So how this would work is that when a custom reporter was used in a block, it would run the code and find the return / report value. If there was none, it would report the value at the bottom.
#2: [b][u]CUSTOM BOOLEAN BLOCKS[/u][/b]
These are obviously the same as custom reporter blocks, but are booleans. A function this could be used for is making a "is a multiple of" block or something similar. They could be used to say "string contains other string" and other functions that are too simple to be made into a full-fledged block, but good enough to make custom.
#3: [b][u]LOCAL VARIABLES[/u][/b]
These would be variables that were completely local to the block. No other part of the program could use them. How would these work?
There are 2 ideas:
[img]http://i824.photobucket.com/albums/zz167/junkforwebsites/createvarmockup_zpsaaeaa69f.png[/img]
This is the first one. But how would this work? Somewhere there would have to be something like a "create local variable" button. Obviously, a "create variable" block wouldn't work so well, because that would make it possible to lag out scratch. However, the idea of getting the set, change, etc. blocks by right clicking and pushing "get block..." is plausible.
[img]http://i824.photobucket.com/albums/zz167/junkforwebsites/CompleteUsingBlcok_zps16a8d566.png[/img]
I think this is the better solution. How it would work is similar to custom blocks. Only the blocks inside of the C-Block could use the variables. The weird looking variables and lists that look like "+" are just a quick sketch of how the using block could create more than one variable. However, I think it should only be able to hold either variables or lists.
The inspiration for this idea came from a language I use called C#, in which you can say this:
[code=C#]
void doStuff()
{
using (int x)
{
do stuff that uses int x
}
do stuff that doesn't use int x
}
[/code]
I think that maybe these should also have different colors, and they should use the right-click functions to get the other blocks.
NOW: [b][u]THE ISSUES[/u][/b]
There are a few problems with implementing these features.
a) New Scratchers might find them difficult - this is true. When I started doing real line-by-line coding, I found it hard to understand WHY a return value was needed. This was because I was calling the things as functions and not as values - so maybe it would make more sense here.
b) Hard to implement - this is the worst problem. Because they would be hard to use for new scratchers, it is not on the scratch team's list. Also, for custom variables, there would probably have to be a block editor. Otherwise, when would the variables you needed show? When you clicked on the script you were editing? Who knows?
c) Most of these features are already in BYOB, so you can just use that.
[b][u]THE ADVANTAGES[/u][/b]
a) This would allow people to make much more organized projects, make blocks that other scratchers could use to perform well-made functions, and make scripts much easier.
b) This would be a good way to learn about more advanced programming topics.
c) Even if they are in BYOB, it is much more advanced than Scratch, so this would make it easier for more people to learn about this kind of thing.
[b]UPDATE:[/b] I am currently working on an extension that emulates these features. You can find the forum thread [url=https://scratch.mit.edu/discuss/topic/143276/]here[/url], and you can try out the most recent version [url=http://scratchx.org/?url=http://themonsterfromthedeep.github.io/scratch-extensions/custom-reporters/script.js#scratch]here[/url]. It doesn't work perfectly but I may begin working on it again soon.
[quote]
(If I don't add you immediately don't panic)
**The colors in the list are only meant to make it more organized**
**If you only say "support", I am assuming that means all**
SUPPORTERS [[]270.75] (Individual: 1:[[]269.75], 2:[[]262.75], 3:[[]246.25])
[list]
[*] AonymousGuy [color=green]ALL[/color]
[*] Firedrake969 [color=green]ALL[/color]
[*] jontmy00 [color=green]ALL[/color]
[*] DotDash [color=green]ALL[/color]
[*] Mrcomputer1 [color=green]ALL[/color]
[*] k9lego [color=green]ALL[/color]
[*] v9lego [color=green]ALL[/color]
[*] LeadToGold [color=orange]1 & 2[/color]
[*] mathfreak231 [color=green]ALL[/color]
[*] TheGuyWithTheHat2 [color=green]ALL[/color]
[*] TimothyLawyer [color=orange]1 & 3[/color]
[*] Photoguy77 [color=green]ALL[/color]
[*] billabobscratch [color=green]ALL[/color]
[*] gregory9 [color=green]ALL[/color]
[*] jaboyc [color=green]ALL[/color]
[*] meowflash [color=green]ALL[/color]
[*] CodeLegend [color=green]ALL[/color]
[*] FarAwayGames [color=green]ALL[/color]
[*] ninja_star [color=green]ALL[/color]
[*] Mozzi64 [color=green]ALL[/color]
[*] LordAzrael [color=green]ALL[/color]
[*] cool_dude_2 [color=green]ALL[/color]
[*] coler706 [color=green]ALL[/color]
[*] CJA4625 [color=green]ALL[/color]
[*] cobraguy [color=orange]1[/color]
[*] King_Cat [color=green]ALL[/color]
[*] cwrivera99 [color=green]ALL[/color]
[*] mariobros406 [color=orange]1 & 2[/color]
[*] 1234abccdcba4321 [color=orange]1 & 3[/color]
[*] xlk [color=green]ALL[/color]
[*] TheGameBuilder [color=green]ALL[/color]
[*] Smiley100P [color=green]ALL[/color]
[*] cwrivera99 [color=green]ALL[/color]
[*] rifj190 [color=green]ALL[/color]
[*] Rumanti [color=green]ALL[/color]
[*] TheSupremeOverLord [color=green]ALL[/color]
[*] A-no-meep [color=green]ALL[/color]
[*] nickthemacman [color=green]ALL[/color]
[*] SohCahToa314 [color=green]ALL[/color]
[*] frodewin [color=green]ALL[/color]
[*] PH-Zero [color=green]ALL[/color]
[*] BSH1 [color=green]ALL[/color]
[*] gamemaker1123 [color=green]ALL[/color]
[*] sccar3 [color=orange]1 & 3[/color]
[*] bookworm7214 [color=orange]1 & 2[/color]
[*] davidkt [color=green]ALL[/color]
[*] scratchisthebest [color=green]ALL[/color]
[*] Zambonifofex [color=orange]ALL, semi @ 2[/color]
[*] Blaze349 [color=green]ALL[/color]
[*] MasterCard786 [color=green]ALL[/color]
[*] HD123 [color=green]ALL[/color]
[*] MCAnimator3D [color=green]ALL[/color]
[*] DerAxeEffekt [color=green]ALL[/color]
[*] ssss [color=green]ALL[/color]
[*] FarAwayGames [color=orange]1 & 2[/color]
[*] ev3commander [color=orange]3[/color]
[*] JudasR [color=orange]1, 2, Maybe 3[/color]
[*] Yoda3D [color=green]ALL[/color]
[*] darkness3560 [color=green]ALL[/color]
[*] savaka [color=orange]1, 2, Maybe 3[/color]
[*] 9kiwi9 [color=green]ALL[/color]
[*] super202 [color=green]ALL[/color]
[*] ExtremeLogic [color=green]ALL[/color]
[*] derpmeup [color=green]ALL[/color]
[*] spgame05 [color=orange]1 & 2[/color]
[*] rolledpie41 [color=green]ALL[/color]
[*] scimonster [color=orange]1 & 2[/color]
[*] twins_paradox [color=orange]1 & 3[/color]
[*] stickfiregames [color=green]ALL[/color]
[*] amgames [color=green]ALL[/color]
[*] Braeden5454 [color=green]ALL[/color]
[*] Iditaroid [color=green]ALL[/color]
[*] Oui1024 [color=green]ALL[/color]
[*] epicsandwich123 [color=green]ALL[/color]
[*] Diamond_Projects [color=green]ALL[/color]
[*] Chibi-Matoran [color=green]ALL[/color]
[*] Realtheawesome67 [color=green]ALL[/color]
[*] Sandro318 [color=green]ALL[/color]
[*] fezzinate [color=green]ALL[/color]
[*] Blueinkproductions [color=green]ALL[/color]
[*] theonlygusti [color=green]ALL[/color]
[*] lalala3 [color=green]ALL[/color]
[*] ilikelegos [color=green]ALL[/color]
[*] 20btheilmanngohr [color=green]ALL[/color]
[*] MushroomMan99 [color=green]ALL[/color]
[*] PrincessPanda_test_ [color=green]ALL[/color]
[*] alexphan [color=green]ALL[/color]
[*] GrannyCookies [color=green]ALL[/color]
[*] GRA0007 [color=orange]1 & 2[/color]
[*] jaboyc [color=green]ALL[/color]
[*] danielhal [color=green]ALL[/color]
[*] jasperjay [color=green]ALL[/color]
[*] HOWING [color=green]ALL[/color]
[*] samanyolu [color=green]ALL[/color]
[*] amoorestl [color=green]ALL[/color]
[*] Cyoce [color=green]ALL[/color]
[*] nimrocco [color=green]ALL[/color]
[*] ShadowFlareX [color=green]ALL[/color]
[*] Syno [color=green]ALL[/color]
[*] Music-Maker [color=orange]1 & 3[/color]
[*] RPFluffy [color=green]ALL[/color]
[*] Think_Quest [color=green]ALL[/color]
[*] gregory9 [color=green]ALL[/color]
[*] RDoc [color=green]ALL[/color]
[*] alexwick [color=green]ALL[/color]
[*] Rex208 [color=green]ALL[/color]
[*] Teanaway [color=green]ALL[/color]
[*] JamesOuO [color=green]ALL[/color]
[*] 19f8361 [color=green]ALL[/color]
[*] ChocolatePi [color=green]ALL[/color]
[*] 0bitasy0 [color=green]ALL[/color]
[*] Alberkynis [color=green]ALL[/color]
[*] Bueno2 [color=orange]1 & 2[/color]
[*] SuperDoom [color=green]ALL[/color]
[*] Zappy1333 [color=green]ALL[/color]
[*] DrKat123 [color=green]ALL[/color]
[*] MrSherlockHolmes [color=green]ALL[/color]
[*] peppermintpatty5 [color=green]ALL[/color]
[*] StickyPup [color=green]ALL[/color]
[*] PaganoLeo10 [color=orange]1 & 2[/color]
[*] ealgase [color=green]ALL[/color]
[*] andymwat [color=green]ALL[/color]
[*] super_crazy [color=green]ALL[/color]
[*] Zro716 [color=green]ALL[/color]
[*] Prinseskat [color=orange]ALL, semi @ 3[/color]
[*] mac_54 [color=green]ALL[/color]
[*] SuperSonicmario [color=green]ALL[/color]
[*] scratchrainbow [color=green]ALL[/color]
[*] MathlyCat [color=green]ALL[/color]
[*] comp09 [color=green]ALL[/color]
[*] infinitytec [color=green]ALL[/color]
[*] lin_kyle [color=green]ALL[/color]
[*] matey1234 [color=green]ALL[/color]
[*] Yeahyay [color=green]ALL[/color]
[*] dude341 [color=green]ALL[/color]
[*] Scratcher1002 [color=green]ALL[/color]
[*] masio3 [color=green]ALL[/color]
[*] sometechyguy01 [color=green]ALL[/color]
[*] yaya3156 [color=green]ALL[/color]
[*] liam48D [color=green]ALL[/color]
[*] davidovski [color=green]ALL[/color]
[*] Charmind [color=green]ALL[/color]
[*] rdococ [color=green]ALL[/color]
[*] pi_mat [color=green]ALL[/color]
[*] cwkethan1508 [color=orange]1 & 2[/color]
[*] rollercoasterfan [color=orange]1 & 2[/color]
[*] rainierroitayam [color=green]ALL[/color]
[*] tim556688 [color=green]ALL[/color]
[*] kalnat [color=green]ALL[/color]
[*] TheHockeyist [color=green]ALL[/color]
[*] themagicshopkins [color=green]ALL[/color]
[*] majesticstar [color=green]ALL[/color]
[*] Island [color=green]ALL[/color]
[*] Znapi [color=orange]1 & 2[/color]
[*] Dmith [color=green]ALL[/color]
[*] Blue-Monkey [color=green]ALL[/color]
[*] Seapats [color=orange]1[/color]
[*] speedycreeper18 [color=green]ALL[/color]
[*] TheUniversalWorld1 [color=green]ALL[/color]
[*] thelucariokid [color=green]ALL[/color]
[*] TechEpic [color=green]ALL[/color]
[*] PianoGuy42 [color=green]ALL[/color]
[*] Pot-of-Gold [color=orange]1 & 2[/color]
[*] IceBit [color=green]ALL[/color]
[*] JavaFernOS [color=green]ALL[/color]
[*] Tymewalk [color=green]ALL[/color]
[*] thelucariokid [color=green]ALL[/color]
[*] bobthemonkey0 [color=green]ALL[/color]
[*] duckboycool [color=green]ALL[/color]
[*] pack34 [color=green]ALL?[/color]
[*] weeb-woo [color=green]ALL[/color]
[*] Aaronhoffer [color=green]ALL[/color]
[*] Blank1234 [color=green]ALL[/color]
[*] -Io- [color=orange]ALL, semi @ 2[/color]
[*] novice27b [color=green]ALL[/color]
[*] Cosmicstars- [color=green]ALL[/color]
[*] BoyKetchup [color=green]ALL?[/color]
[*] picklehazard [color=green]ALL[/color]
[*] EmeraldSapphire41 [color=green]ALL[/color]
[*] ROLLOPOLLO [color=green]ALL[/color]
[*] Opisek [color=green]ALL[/color]
[*] Meese123 [color=orange]2[/color]
[*] JakeTheProgrammer [color=green]ALL[/color]
[*] Aboot4 [color=green]ALL[/color]
[*] navysmeagol_175 [color=green]ALL?[/color]
[*] theunknown756 [color=green]ALL[/color]
[*] majesticstar [color=green]ALL[/color]
[*] u8y7541 [color=orange]1 & 2[/color]
[*] Sobsz [color=green]ALL[/color]
[*] gracewebsite [color=green]ALL?[/color]
[*] purplebook163 [color=green]ALL[/color]
[*] Pattyman99 [color=green]ALL[/color]
[*] IronBit_Studios [color=green]ALL[/color]
[*] WO997 [color=green]ALL[/color]
[*] cheezboy18 [color=green]ALL[/color]
[*] Tropic [color=green]ALL[/color]
[*] adri326 [color=orange]1, 2, first half of 3[/color]
[*] SpectacularGames [color=green]ALL[/color]
[*] Hans5958 [color=orange]ALL, semi @ 3[/color]
[*] CGRises [color=green]ALL[/color]
[*] conwayslife [color=green]ALL[/color]
[*] WooHooBoy [color=green]ALL[/color]
[*] Furious- [color=green]ALL[/color]
[*] Pepperoni505 [color=green]ALL[/color]
[*] CodingGamerHD [color=green]ALL[/color]
[*] Zarlog [color=green]ALL[/color]
[*] julianandwill [color=green]ALL[/color]
[*] Jonathan50 [color=green]ALL?[/color]
[*] thebriculator [color=green]ALL[/color]
[*] DerpyEyed [color=green]ALL[/color]
[*] ilikelegos [color=green]ALL[/color]
[*] Crypha [color=green]ALL[/color]
[*] Botcho_Otkho [color=green]ALL[/color]
[*] CosmicHamster [color=green]ALL[/color]
[*] ZozaTech [color=green]ALL[/color]
[*] Rz2750 [color=orange]1 & 2[/color]
[*] JBGT [color=green]ALL[/color]
[*] Arisandra [color=green]ALL[/color]
[*] wizard192 [color=green]ALL[/color]
[*] Leadrien2366 [color=green]ALL[/color]
[*] SilverEye [color=green]ALL[/color]
[*] gamebeater187 [color=orange]ALL, 0.75%[/color]
[*] MrSwaggerMuffin [color=green]ALL[/color]
[*] Dy155 [color=orange]1 & 2[/color]
[*] NoMod-Programming [color=green]ALL[/color]
[*] Meep5010 [color=green]ALL[/color]
[*] Zekrom01 [color=green]ALL[/color]
[*] chrisddr77 [color=green]ALL[/color]
[*] The_Kitty_Eevee [color=green]ALL[/color]
[*] NDSDNS2 [color=green]ALL[/color]
[*] D_i_a_v_l_o [color=green]ALL[/color]
[*] MathlyCat [color=green]ALL[/color]
[*] Spooikypok_Dev [color=green]ALL[/color]
[*] XYZ-28 [color=green]ALL[/color]
[*] Opisek [color=orange]1 & 2[/color]
[*] Sheep_tester [color=green]ALL[/color]
[*] little_kitten [color=green]ALL[/color]
[*] A-KouZ1 [color=green]ALL?[/color]
[*] Eli827 [color=green]ALL[/color]
[*] fredfish10 [color=green]ALL[/color]
[*] gamebeater187 [color=green]ALL[/color]
[*] JonathanSchaffer [color=orange]1 & 2[/color]
[*] FrenchFries8854 [color=green]ALL[/color]
[*] KryptykProductions [color=orange]1 & 2[/color]
[*] Andrew_Rodebaugh [color=green]ALL[/color]
[*] Gaza101 [color=green]ALL[/color]
[*] zorket [color=orange]ALL, semi @ 3[/color]
[*] braxbroscratcher [color=orange]1 & 2[/color]
[*] johndeere47 [color=green]ALL[/color]
[*] Galleigo [color=green]ALL[/color]
[*] cs293450 [color=green]ALL[/color]
[*] Inreal49 [color=green]ALL[/color]
[*] Alpha_Hedge [color=green]ALL[/color]
[*] Gooballs [color=green]ALL[/color]
[*] AwesomePerson238243 [color=orange]ALL, semi @ 3[/color]
[*] Prscr [color=green]ALL[/color]
[*] miimiimii [color=green]ALL[/color]
[*] -Grin- [color=green]ALL[/color]
[*] GrumpyCat17 [color=green]ALL[/color]
[*] joefarebrother [color=green]ALL[/color]
[*] ad1406 [color=green]ALL[/color]
[*] _Comicfan_ [color=green]ALL[/color]
[*] Kepler32 [color=green]ALL[/color]
[*] customhacker [color=green]ALL[/color]
[*] kabobbob [color=green]ALL[/color]
[*] Lythium [color=green]ALL[/color]
[*] herohamp [color=green]ALL[/color]
[*] NanoRook [color=green]ALL[/color]
[*] finn55 [color=green]ALL[/color]
[*] zimoney [color=green]ALL[/color]
[*] jokebookservice1 [color=green]ALL[/color]
[*] 0xF3d04a [color=green]ALL?[/color]
[*] ivancr72 [color=orange]ALL, semi @ 3[/color]
[*] monday_rat [color=green]ALL[/color]
[*] edward789121 [color=green]ALL?[/color]
[/list]
[/quote]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment