Discuss Scratch

FloweyTheFlower42
Scratcher
90 posts

Help with pen

I want to make a game with the pen tool, but, i cannot make it fill the shapes drawn with the pen! how do i do that? it's gotta be possible!

oh! and here is the custom block i use to render with pen!
defineDrawalineX1Y1X2Y2gotox:X1y:Y2pendowngotox:X2y:Y2penup

Last edited by FloweyTheFlower42 (Jan. 9, 2016 18:07:05)

JB150
Scratcher
100+ posts

Help with pen

Can you give a link to the project please…?
FloweyTheFlower42
Scratcher
90 posts

Help with pen

JB150 wrote:

Can you give a link to the project please…?
uhh… i didn't make it yet… but… i can try! it will be for example! okay? remix it and i will see! c'ya!
JB150
Scratcher
100+ posts

Help with pen

FloweyTheFlower42 wrote:

JB150 wrote:

Can you give a link to the project please…?
uhh… i didn't make it yet… but… i can try! it will be for example! okay? remix it and i will see! c'ya!
Oh sorry! I'm so used to having to say that to people who don't give links in their comment. I will write a comment in a few minutes about how you can do it. Once again, sorry!
JB150
Scratcher
100+ posts

Help with pen

Update: I'm afraid I can't think of a good solution to the problem. I think there was some sort of trick for doing it in Scratch 1.4, but for 2.0 I'm not sure. However, there are a few ways to get around the problem. See this project here created by Scratcher ‘Kimlot’. Sorry about that - but I hope the project in the link is useful! Also - use turbo mode when running the project in the link above!

JB150.
FloweyTheFlower42
Scratcher
90 posts

Help with pen

JB150 wrote:

Update: I'm afraid I can't think of a good solution to the problem. I think there was some sort of trick for doing it in Scratch 1.4, but for 2.0 I'm not sure. However, there are a few ways to get around the problem. See this project here created by Scratcher ‘Kimlot’. Sorry about that - but I hope the project in the link is useful! Also - use turbo mode when running the project in the link above!

JB150.
uhh… that does not help… i like that stuff with out variables… im gonna make a “draw a box script”! then you can mess with it!
JB150
Scratcher
100+ posts

Help with pen

FloweyTheFlower42 wrote:

JB150 wrote:

Update: I'm afraid I can't think of a good solution to the problem. I think there was some sort of trick for doing it in Scratch 1.4, but for 2.0 I'm not sure. However, there are a few ways to get around the problem. See this project here created by Scratcher ‘Kimlot’. Sorry about that - but I hope the project in the link is useful! Also - use turbo mode when running the project in the link above!

JB150.
uhh… that does not help… i like that stuff with out variables… im gonna make a “draw a box script”! then you can mess with it!
What's wrong with variables? They're useful.
FloweyTheFlower42
Scratcher
90 posts

Help with pen

JB150 wrote:

FloweyTheFlower42 wrote:

JB150 wrote:

Update: I'm afraid I can't think of a good solution to the problem. I think there was some sort of trick for doing it in Scratch 1.4, but for 2.0 I'm not sure. However, there are a few ways to get around the problem. See this project here created by Scratcher ‘Kimlot’. Sorry about that - but I hope the project in the link is useful! Also - use turbo mode when running the project in the link above!

JB150.
uhh… that does not help… i like that stuff with out variables… im gonna make a “draw a box script”! then you can mess with it!
What's wrong with variables? They're useful.
i finished it! Here! BTW variables ARE useful! i just dont like to use them in a bad way!
JB150
Scratcher
100+ posts

Help with pen

I hate to say, but I really can't work it out… I've tried creating pen loops where it fills the x coordinates of the box, and using boolean to make sure it only fills inside the shape, but the goal is almost impossible in Scratch. I'm very sorry about that - I've tried as much as possible including solutions designed for Scratch 1.4 I've also looked online, but I still can't find anything. It might be worth considering telling the Scratch team that the ability to fill pen shapes during the running of a Scratch application could be added in a future update. Sorry - I tried!

Good luck!
FloweyTheFlower42
Scratcher
90 posts

Help with pen

JB150 wrote:

I hate to say, but I really can't work it out… I've tried creating pen loops where it fills the x coordinates of the box, and using boolean to make sure it only fills inside the shape, but the goal is almost impossible in Scratch. I'm very sorry about that - I've tried as much as possible including solutions designed for Scratch 1.4 I've also looked online, but I still can't find anything. It might be worth considering telling the Scratch team that the ability to fill pen shapes during the running of a Scratch application could be added in a future update. Sorry - I tried!

Good luck!
oh come on! i've found some other games on scratch that DO have some cool pen fillings but i cant use those…
look at this for example! https://scratch.mit.edu/projects/54931060/
JB150
Scratcher
100+ posts

Help with pen

FloweyTheFlower42 wrote:

JB150 wrote:

I hate to say, but I really can't work it out… I've tried creating pen loops where it fills the x coordinates of the box, and using boolean to make sure it only fills inside the shape, but the goal is almost impossible in Scratch. I'm very sorry about that - I've tried as much as possible including solutions designed for Scratch 1.4 I've also looked online, but I still can't find anything. It might be worth considering telling the Scratch team that the ability to fill pen shapes during the running of a Scratch application could be added in a future update. Sorry - I tried!

Good luck!
oh come on! i've found some other games on scratch that DO have some cool pen fillings but i cant use those…
look at this for example! https://scratch.mit.edu/projects/54931060/
Ok, I'll try… What do you mean you can't use them? Just because they are hexagons, all you have to do is change the maths of it. Anyway, I'll give it a go!
FloweyTheFlower42
Scratcher
90 posts

Help with pen

JB150 wrote:

FloweyTheFlower42 wrote:

JB150 wrote:

I hate to say, but I really can't work it out… I've tried creating pen loops where it fills the x coordinates of the box, and using boolean to make sure it only fills inside the shape, but the goal is almost impossible in Scratch. I'm very sorry about that - I've tried as much as possible including solutions designed for Scratch 1.4 I've also looked online, but I still can't find anything. It might be worth considering telling the Scratch team that the ability to fill pen shapes during the running of a Scratch application could be added in a future update. Sorry - I tried!

Good luck!
oh come on! i've found some other games on scratch that DO have some cool pen fillings but i cant use those…
look at this for example! https://scratch.mit.edu/projects/54931060/
Ok, I'll try… What do you mean you can't use them? Just because they are hexagons, all you have to do is change the maths of it. Anyway, I'll give it a go!
i can't use them because they are over compllicated! and i'm afraid i can't take out one of their bits! (that sounded way more bad than it is suppose to be! O_O)
JB150
Scratcher
100+ posts

Help with pen

FloweyTheFlower42 wrote:

JB150 wrote:

FloweyTheFlower42 wrote:

JB150 wrote:

I hate to say, but I really can't work it out… I've tried creating pen loops where it fills the x coordinates of the box, and using boolean to make sure it only fills inside the shape, but the goal is almost impossible in Scratch. I'm very sorry about that - I've tried as much as possible including solutions designed for Scratch 1.4 I've also looked online, but I still can't find anything. It might be worth considering telling the Scratch team that the ability to fill pen shapes during the running of a Scratch application could be added in a future update. Sorry - I tried!

Good luck!
oh come on! i've found some other games on scratch that DO have some cool pen fillings but i cant use those…
look at this for example! https://scratch.mit.edu/projects/54931060/
Ok, I'll try… What do you mean you can't use them? Just because they are hexagons, all you have to do is change the maths of it. Anyway, I'll give it a go!
i can't use them because they are over compllicated! and i'm afraid i can't take out one of their bits! (that sounded way more bad than it is suppose to be! O_O)
That's exactly what I'm trying to say: there isn't any easy way to do it. I will keep on working on it and/or try and find a solution to the problem, but I really cannot find a solution that isn't over complicated - that's the whole point!
JB150
Scratcher
100+ posts

Help with pen

I'll work on it tommorrow: for now I need to do some other work to do with 3D game designing in Unity - that's another place I program.
footsocktoe
Scratcher
1000+ posts

Help with pen

There is no EASY way to fill ANY shape with the pen tool because the only way you can do it is sense the edges of the shape. What if it's a very complicated shape with dozens of edges? What if the shape has holes in it?

If I was approaching this problem (and one day I will because I like drawing programs) I think I would use a “scanning” approach. I would scan the whole stage line by line (360 scan lines) and when I first detected the edge of a shape I would put “pen down” and when I detected a new edge I would put “pen up”. The next time I detected an edge I would do pen down again, then next time pen up, and so forth.

This would allow multiple pen down / pen ups in one scan line to take care of complicated shapes.
FloweyTheFlower42
Scratcher
90 posts

Help with pen

footsocktoe wrote:

There is no EASY way to fill ANY shape with the pen tool because the only way you can do it is sense the edges of the shape. What if it's a very complicated shape with dozens of edges? What if the shape has holes in it?

If I was approaching this problem (and one day I will because I like drawing programs) I think I would use a “scanning” approach. I would scan the whole stage line by line (360 scan lines) and when I first detected the edge of a shape I would put “pen down” and when I detected a new edge I would put “pen up”. The next time I detected an edge I would do pen down again, then next time pen up, and so forth.

This would allow multiple pen down / pen ups in one scan line to take care of complicated shapes.
I GIVE UP ON LIFE!!!!!!!!!!
JB150
Scratcher
100+ posts

Help with pen

FloweyTheFlower42 wrote:

footsocktoe wrote:

There is no EASY way to fill ANY shape with the pen tool because the only way you can do it is sense the edges of the shape. What if it's a very complicated shape with dozens of edges? What if the shape has holes in it?

If I was approaching this problem (and one day I will because I like drawing programs) I think I would use a “scanning” approach. I would scan the whole stage line by line (360 scan lines) and when I first detected the edge of a shape I would put “pen down” and when I detected a new edge I would put “pen up”. The next time I detected an edge I would do pen down again, then next time pen up, and so forth.

This would allow multiple pen down / pen ups in one scan line to take care of complicated shapes.
I GIVE UP ON LIFE!!!!!!!!!!
Look, it not easy to do this - there is no easy way of doing it - this is the whole point!
FloweyTheFlower42
Scratcher
90 posts

Help with pen

JB150 wrote:

FloweyTheFlower42 wrote:

footsocktoe wrote:

There is no EASY way to fill ANY shape with the pen tool because the only way you can do it is sense the edges of the shape. What if it's a very complicated shape with dozens of edges? What if the shape has holes in it?

If I was approaching this problem (and one day I will because I like drawing programs) I think I would use a “scanning” approach. I would scan the whole stage line by line (360 scan lines) and when I first detected the edge of a shape I would put “pen down” and when I detected a new edge I would put “pen up”. The next time I detected an edge I would do pen down again, then next time pen up, and so forth.

This would allow multiple pen down / pen ups in one scan line to take care of complicated shapes.
I GIVE UP ON LIFE!!!!!!!!!!
Look, it not easy to do this - there is no easy way of doing it - this is the whole point!
… but nobody came.

Powered by DjangoBB