Discuss Scratch

Wetbikeboy2500
Scratcher
100+ posts

color outlined code for easier coding and finding of scripts

When you have too many scripts in one sprite it is hard to find them and get to them so why not color code them?

This may have been made in 2015, but I am still optimistic for my suggestion.

The old method, which can be viewed below, could be considered intrusive and unfriendly to new Scratchers, so why not make it more friendly?

The first step is hiding away the outline feature to prevent confusion for new Scratchers is hiding it in the right-click menu for code. This is already where a user can add a comment so why not an outline?



This prevents new users getting confused over these things and leaves something for the more advanced users to use. This can also be said for the comments. When I first started scratch, there is very little needs for comments since everything is so simple, but as projects expanded, comments become a pivotal part to remember what you code does.

When you add an outline, there could be some options for the color that the user can choose. This could be done by a color wheel or a pre-made color palette. This needs some discussion to figure this one out.

After you have chosen your color, an outline would appear for the code.



This outline is a little primitive but is complete possible with the current way scratch blocks are built.

This would add a new colored tab to the top of the code editor. By clicking the tab, it will bring you right to where you outlined the code.



Here is some of the discussion already made on this topic:

TheMonsterOfTheDeep wrote:

@Non-supporters - comments work terribly for this because they don't actually bookmark a script and you can't jump directly to scripts with certain comments. Comments are also incredibly hard to deal with and don't like the scripts they are attached to being moved anywhere.

Nambaseking01 wrote:

Putting comments in code is for knowing what happens in the code.

Color coding the outline of the code indicates where a specific code is.






Old Post wrote:

You could add an outline color of any type by clicking the color selector on the page.


When clicked it will bring up a color selector and a new tab with the multi color icon on it.


Then you click the color selector again once the desired color is found then it will switch the tab to that color then you click on the code to give it a outline of that color.


When you click the color tab it brings you to the script with that color


You could also turn this on or off due to it might confuse new scratchers and its main purpose is for the person creating the project to sort out the code for the colors could mean anything to other people and by default it would be off for not every feature has to be on 24/7

These images took me about 3 hours to do in paint sooo much fun

Last edited by Wetbikeboy2500 (May 27, 2020 17:29:04)

DaSpudLord
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

No support, the scripts' current color-coding works fine. This would just add an unnecessary layer of complexity. If you want to “Bookmark” scripts, you can do so by adding comments.
Cream_E_Cookie
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

HUGE support.
Wetbikeboy2500
Scratcher
100+ posts

color outlined code for easier coding and finding of scripts

DaSpudLord wrote:

No support, the scripts' current color-coding works fine. This would just add an unnecessary layer of complexity. If you want to “Bookmark” scripts, you can do so by adding comments.
it would just outline the scripts with a color and if you add comments the issue is you still have to look through those comments for they look the same and would take some examination to find what you are looking for
Nether_before
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

Support, could be quite useful.
powershack
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

Semi-support. Could confuse new scratchers as well.
Wetbikeboy2500
Scratcher
100+ posts

color outlined code for easier coding and finding of scripts

powershack wrote:

Semi-support. Could confuse new scratchers as well.
maybe it could be an option to turn on or off due to that this would more be for the person making the project then the ones trying to examine it due to that a color could mean anything and who ever is viewing it probably wouldn't care and/or understand what the color represents
DrKat123
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

DaSpudLord wrote:

No support, the scripts' current color-coding works fine. This would just add an unnecessary layer of complexity. If you want to “Bookmark” scripts, you can do so by adding comments.
no support too.
just add comments, or if you want to,
use cleanup button.
so the script is tidy and easier to find
julianandwill
Scratcher
500+ posts

color outlined code for easier coding and finding of scripts

No support. You can add comments or hold shift then click on “Edit” and there is an option called “Edit block colors”.
Zekrom01
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

Just add comments. This suggestion is like adding something twice.
stickfiregames
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

Semi-support, comments would probably be just as useful. If you don't like the existing sticky note style (I don't really, they always seems to snap to blocks I don't want them to), you can create a comment block easily:
define comment (comment)
with nothing under the define block :: grey


comment [you now have a comment block that you can drop into scripts!]


julianandwill wrote:

No support. You can add comments or hold shift then click on “Edit” and there is an option called “Edit block colors”.
That ins't a workaround, it just changes the colours of the block categories.
TheMonsterOfTheDeep
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

Support. This would definitely be useful in larger projects.

@Non-supporters - comments work terribly for this because they don't actually bookmark a script and you can't jump directly to scripts with certain comments. Comments are also incredibly hard to deal with and don't like the scripts they are attached to being moved anywhere.
Sonickyle
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

No support.
  • Just use comments
  • Outlines around large stacks of scripts cause lots of lag.
Mega987654
Scratcher
100 posts

color outlined code for easier coding and finding of scripts

powershack wrote:

Semi-support. Could confuse new scratchers as well.
^^^
Charles12310
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

Not supporting this. This could confuse many users and this just adds more complexity instead of organization. Besides, multiple colored scripts could lead to lag. Therefore, I recommend using comments.
Wetbikeboy2500
Scratcher
100+ posts

color outlined code for easier coding and finding of scripts

Charles12310 wrote:

Not supporting this. This could confuse many users and this just adds more complexity instead of organization. Besides, multiple colored scripts could lead to lag. Therefore, I recommend using comments.

If it confuses them then why would they use it? It isn't like it is going to break there code if they start to experiment with this new feature.




MathlyCat
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

Charles12310 wrote:

Not supporting this. This could confuse many users and this just adds more complexity instead of organization. Besides, multiple colored scripts could lead to lag. Therefore, I recommend using comments.
Comments lag my computer a lot already, don't see how that warrants it as a viable workaround.

I do believe you can use non-defined custom blocks as comments if you prefer, but I support because organization is always a good thing in programming.
DaEpikDude
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

I'd definitely like this. Having a convenient bookmark section for bits of code would be really useful (e.g. blue is movement scripts, green is animations etc.) and it'd help a lot with organisation.

For those saying “just use comments”:
1: For really big scripts you'd have to make a bunch of comments, otherwise you might miss it.
2: Comments are a really obscure feature: they're hidden under a right-click menu.
3: You can't search for a specific category of comment.
4: From my experience comments are WAY too easily detached.
TheUltimatum
Scratcher
1000+ posts

color outlined code for easier coding and finding of scripts

OK, just to add something to the conversation. Scratch 2 is pretty late in its development cycle so I'm pretty sure that this would end up getting added into Scratch 3 if it's added at all. Maybe your mockups could use the scratch 3 editor instead? So devs can get an idea of what it would look like in the new environment.
Wetbikeboy2500
Scratcher
100+ posts

color outlined code for easier coding and finding of scripts

TheUltimatum wrote:

OK, just to add something to the conversation. Scratch 2 is pretty late in its development cycle so I'm pretty sure that this would end up getting added into Scratch 3 if it's added at all. Maybe your mockups could use the scratch 3 editor instead? So devs can get an idea of what it would look like in the new environment.

Yeah, the pictures were made all the way back in 2015 so they could use some updating.



Last edited by Wetbikeboy2500 (Dec. 20, 2017 20:02:57)

Powered by DjangoBB