Discuss Scratch
- Discussion Forums
- » Suggestions
- » Best block idea! Organise code [CODE SECTIONS]
- theonlygusti
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
You're right, you workaround:could do that, but it's not collapsible, comments don't stay where you put them (if they're attached) and it just looks ugly and unorganised.if <[1] = [1]> then // gameplay
repeat until <gameover>
i don't want to write all that in Scratchblocks :: motion
problem? :: variables
end
end
The whole point of my idea is to make it more organised and less hectic.
- Tropic
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
Well, that might work if you make it like this: workaround:if <[1] = [1]> then // gameplay
repeat until <gameover>
i don't want to write all that in Scratchblocks :: motion
problem? :: variables
end
end
if <[gameplay] = [gameplay]> thenHowever, I still think that this should be implemented since the workarounds aren't that good. It still might be hard to find all if statements and you might confuse them with other scripts.
put scripts here :: grey
end
- Tropic
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
But you can't “collapse” the scripts using if statements workaround:if <[1] = [1]> then // gameplay
repeat until <gameover>
i don't want to write all that in Scratchblocks :: motion
problem? :: variables
end
end

EDIT: I was going to put this in the other post I wrote but I thought it got deleted first so I wrote it in another post instead. However, it seems that my first post never got deleted.
EDIT 2: @theonlygusti also wrote about this apparently

Last edited by Tropic (Oct. 7, 2014 20:07:14)
- peppermintpatty5
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
Oh my gosh yes! SUPPORT 

- OmnipotentPotato
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
The real question is how that Evil Kumquat thing got in there. :OAh, okWhen you post only a quote of someone it means they said exactly what you want to say. Basically, it means you completely agree and no other text is necessary.Why are you quoting the posts?I'd prefer inline, multiline comments (like the old comment block) that could wrap around scripts, instead of a dedicated section block.Yes, but current Scratch comments are the ugliest things. This block would make everything neater. Even just a comment block would make everything neater. Can't you just use comments to label the sections?
- Tropic
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
The real question is how that Evil Kumquat thing got in there. :OAh, okWhen you post only a quote of someone it means they said exactly what you want to say. Basically, it means you completely agree and no other text is necessary.Why are you quoting the posts?I'd prefer inline, multiline comments (like the old comment block) that could wrap around scripts, instead of a dedicated section block.Yes, but current Scratch comments are the ugliest things. This block would make everything neater. Even just a comment block would make everything neater. Can't you just use comments to label the sections?
- RPFluffy
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
You mean kinda like a class in programming, if so YEAH I support!!
But the comment thing why not this?
But the comment thing why not this?
define comment (text)
//does nothing..
Last edited by RPFluffy (Oct. 10, 2014 22:17:54)
- theonlygusti
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
Why is it like a class? You mean kinda like a class in programming, if so YEAH I support!!
But the comment thing why not this?define comment (text)
//does nothing..
It's just meant to better organise the scripts area.
- mitopolis
-
100+ posts
Best block idea! Organise code [CODE SECTIONS]
sssssssssssssssssssssssssssssuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuupppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp-ppppppppppppppppppppppppppppppppppppppppppppppppppppppooooooooooooooooooooooooooooooooooooooooooooooooooooorrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
- Tropic
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
Not the classes in programming, but the organising You mean kinda like a class in programming, if so YEAH I support!!
But the comment thing why not this?define comment (text)
//does nothing..

Last edited by Tropic (Oct. 11, 2014 10:31:14)
- RED-drag0n
-
79 posts
Best block idea! Organise code [CODE SECTIONS]
I would love to have the ability to sanction my code into different sections. This would make it so much easierto use, edit and debug my projects, and I'm sure others will feel the same way.
It would be brilliant if we could see a c-block that allows us to add this function, my concept looks like:[name-of-section] ▼:: grey
[name-of-section] ▲ :: grey cstart
The arrows let your code become collapsible chunks, so that extremely large scripts can suddenly become much easier to manage. You can use the text area to name your section whatever you want.
It would make projects so much nicer and easier to organise, which in turn makes projects easier to learn from.
Learning from other projects is one of the key concepts of Scratch!
This block will make that easier to accomplish.
You could turn a mess of stuff into something nice to view and debug,when green flag clicked
[setup] ▲ :: grey cstart
set [xv v] to [0]
set [yv v] to [0]
goto x: (0) y: (-100) ::motion
show
end
[gameplay] ▼:: grey
[gameover] ▲ :: grey cstart
play sound [deathnoise v] until done
end
As they contain collapsible sections, the above, by clicking on the arrow, could become:when green flag clicked
[setup] ▲ :: grey cstart
set [xv v] to [0]
set [yv v] to [0]
goto x: (0) y: (-100) ::motion
show
end
[gameplay] ▲ :: grey cstart
repeat until <gameover ::operators boolean>
if <key [a v] pressed?> then
change [xv v] by [-1]
end
if <key [d v] pressed?> then
change [xv v] by [1]
end
if <key [w v] pressed?> then
change [yv v] by [1]
end
end
end
[gameover] ▼:: grey
Please let me know what you think of my idea. If you want to include the custom blocks in your post then, using scratch blocks plugin, it looks like[comment] ▼ :: grey[comment] ▼ :: grey
and[comment] ▲ :: grey cstart[comment] ▲ :: grey cstart
So the blocks don't really do anything, they just make it easier to debug?
- RED-drag0n
-
79 posts
Best block idea! Organise code [CODE SECTIONS]
The real question is how that Evil Kumquat thing got in there. :OAh, okWhen you post only a quote of someone it means they said exactly what you want to say. Basically, it means you completely agree and no other text is necessary.Why are you quoting the posts?I'd prefer inline, multiline comments (like the old comment block) that could wrap around scripts, instead of a dedicated section block.Yes, but current Scratch comments are the ugliest things. This block would make everything neater. Even just a comment block would make everything neater. Can't you just use comments to label the sections?
:0
- Tropic
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
Kind of, they make it easier to organise the scriptsI would love to have the ability to sanction my code into different sections. This would make it so much easierto use, edit and debug my projects, and I'm sure others will feel the same way.
It would be brilliant if we could see a c-block that allows us to add this function, my concept looks like:[name-of-section] ▼:: grey
[name-of-section] ▲ :: grey cstart
The arrows let your code become collapsible chunks, so that extremely large scripts can suddenly become much easier to manage. You can use the text area to name your section whatever you want.
It would make projects so much nicer and easier to organise, which in turn makes projects easier to learn from.
Learning from other projects is one of the key concepts of Scratch!
This block will make that easier to accomplish.
You could turn a mess of stuff into something nice to view and debug,when green flag clicked
[setup] ▲ :: grey cstart
set [xv v] to [0]
set [yv v] to [0]
goto x: (0) y: (-100) ::motion
show
end
[gameplay] ▼:: grey
[gameover] ▲ :: grey cstart
play sound [deathnoise v] until done
end
As they contain collapsible sections, the above, by clicking on the arrow, could become:when green flag clicked
[setup] ▲ :: grey cstart
set [xv v] to [0]
set [yv v] to [0]
goto x: (0) y: (-100) ::motion
show
end
[gameplay] ▲ :: grey cstart
repeat until <gameover ::operators boolean>
if <key [a v] pressed?> then
change [xv v] by [-1]
end
if <key [d v] pressed?> then
change [xv v] by [1]
end
if <key [w v] pressed?> then
change [yv v] by [1]
end
end
end
[gameover] ▼:: grey
Please let me know what you think of my idea. If you want to include the custom blocks in your post then, using scratch blocks plugin, it looks like[comment] ▼ :: grey[comment] ▼ :: grey
and[comment] ▲ :: grey cstart[comment] ▲ :: grey cstart
So the blocks don't really do anything, they just make it easier to debug?

- OmnipotentPotato
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
Don't quote the entire OP please.
- Cyoce
-
500+ posts
Best block idea! Organise code [CODE SECTIONS]
support :: operators stack
- theonlygusti
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
Don't quote the entire OP please.
- hppavilion
-
100+ posts
Best block idea! Organise code [CODE SECTIONS]
So like a revamped version of the old comment block…
I like it.
Support.
I like it.
Support.
- theonlygusti
-
1000+ posts
Best block idea! Organise code [CODE SECTIONS]
Not really. This allows you to organize your code and separate sections, the old comment block didn't. Also, this one will be a right-click option, to avoid the ambiguity associated with the comment block (“Does it do anything?”) So like a revamped version of the old comment block…
I like it.
Support.
- Discussion Forums
- » Suggestions
-
» Best block idea! Organise code [CODE SECTIONS]