Discuss Scratch

andre_rifaut
Scratcher
100+ posts

Help: painting by filling areas for young child

Hello,

This is a game similar to the sprite editor, but much simpler.

There are flash painting games for young child.
You have a drawing made with black lines on a white background.
Then the chil can select colors and fill it by clicking on the white areas.

Do you know how to do that in Scratch or is there scratch projects that are similar.
If not possible how to change a little the game so that is it easier to do it in scratch.

Thanks.
drmcw
Scratcher
1000+ posts

Help: painting by filling areas for young child

You'd need a flood fill algorithm which is typically recursive. not something scratch can do very well but would be interesting to try.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
mwiedmann
Scratcher
100+ posts

Help: painting by filling areas for young child


Here is one way you can do it:

Simple Face Coloring

This requires that you create the picture ahead of time and create a costume for each color, but it is actually simple to do. Just create the first costume and then use the duplicate feature and fill in the next color. I created this in just a few minutes. You could actually create some more detailed pictures in no time at all.

Take a look!
andre_rifaut
Scratcher
100+ posts

Help: painting by filling areas for young child

mwiedmann wrote:

Here is one way you can do it:

Simple Face Coloring

This requires that you create the picture ahead of time and create a costume for each color, but it is actually simple to do. Just create the first costume and then use the duplicate feature and fill in the next color. I created this in just a few minutes. You could actually create some more detailed pictures in no time at all.

Take a look!

This seems a simple and interesting solution. Is it possible to change the color with the block “color effect” ? I mean is it possible to get always the same color with the same number given to “color effect” ?
andre_rifaut
Scratcher
100+ posts

Help: painting by filling areas for young child

drmcw wrote:

You'd need a flood fill algorithm which is typically recursive. not something scratch can do very well but would be interesting to try.

Effectively, seems a generic solution, but usually when you fill-in something, you cange just the color of the initial pixel that was changed like in the scratch editor. However, there is no means to know the color of a pixel … ?
mwiedmann
Scratcher
100+ posts

Help: painting by filling areas for young child

andre_rifaut wrote:

mwiedmann wrote:

Here is one way you can do it:

Simple Face Coloring

This requires that you create the picture ahead of time and create a costume for each color, but it is actually simple to do. Just create the first costume and then use the duplicate feature and fill in the next color. I created this in just a few minutes. You could actually create some more detailed pictures in no time at all.

Take a look!

This seems a simple and interesting solution. Is it possible to change the color with the block “color effect” ? I mean is it possible to get always the same color with the same number given to “color effect” ?

You can change the color using the “color effect” but it doesn't give you access to all of the colors. The original color seems to have some affect on the range of colors you can get with the “color effect”. It's not entirely clear to me how that block works, but I did try it and you get some colors but not all (unless I'm doing something wrong).

Powered by DjangoBB