Discuss Scratch

Flipped_
Scratcher
500+ posts

Improvements to the Pen Extension

Hello fellow Scratchers,
I've been integrating the pen lately into some of my projects, and I've noticed the pen extensions could use some improvements. Here are my ideas:

Pen Layers
The pen drawing always appears behind the sprite. I think the pen layer system should follow the sprite layer system; you should be able to choose what layer the pen is on, similar to how sprites can. There should be a maximum of 5 layers to prevent lag, as justsomenerds mentioned that unlimited layers would cause lag.
go to layer [front v] :: pen

move [forward v] (...) layers :: pen

Pen Erasing
It's really annoying that the “erase all” block erases EVERY drawing created. I think that drawings should be categorized by sprites and clones, and should be erased accordingly.
erase [my drawing v] :: pen // Pick between another sprite's drawing or the current sprite's drawing.
A pen eraser should be included, so you can erase part of a drawing however you want.
set pen type to [eraser v] :: pen // Choose between eraser or pen.


Elaborating Explaining my suggestion better
When one sprite on one layer draws two lines that overlap each other, the newer line will be on top.

The pen on a separate layer than the sprite drawing it. The pen drawing is considered another sprite, and its layers are arranged on a sprite-like level. For example, if there were two sprites, Sprite A and Sprite B, one would be on a layer in front of the other. If Sprite A made a drawing, the drawing would be one layer ahead of Sprite A. So if Sprite A was on the back layer, the drawing would be on the layer in between Sprite A and Sprite B. And if Sprite B made a drawing, the drawing would be at the top layer.

When I refer to “drawing” in the previous elaboration, I don't mean my suggested drawings that are specific to each sprite and clone.



Thank you for your consideration!

Last edited by Flipped_ (March 7, 2019 20:18:50)


☄️ Hey! I'm Flipped_. ☄️

Here, you can sit down in that chair over there. No no, that one. The other
one is reserved for my pet coelacanth.
I guess we wait now. Feel free to drink some orange juice
in the meantime.
———————————————
StrangeMagic32
Scratcher
1000+ posts

Improvements to the Pen Extension

Flipped_ wrote:

Pen Reporters
The pen should have a reporter for the current size or color. The size reporter would return a numeric value, and the color reporter would return a hex value.
pen [size v] :: pen reporter // There are two choices - size or color.
the Pen Reporters are a duplicate.

Otherwise, Support!

Last edited by StrangeMagic32 (Jan. 31, 2019 14:17:40)



“Remember the worth of souls is great in the sight of God;”
- Doctrine and Covenants 18:10


I have since moved to @JollyWinter
Flipped_
Scratcher
500+ posts

Improvements to the Pen Extension

Okay, I'll fix my post!

☄️ Hey! I'm Flipped_. ☄️

Here, you can sit down in that chair over there. No no, that one. The other
one is reserved for my pet coelacanth.
I guess we wait now. Feel free to drink some orange juice
in the meantime.
———————————————
CoolGuyBug
Scratcher
100+ posts

Improvements to the Pen Extension

Support. Layers, erasers, etc. would be extremely helpful for pen projects.


Flipped_
Scratcher
500+ posts

Improvements to the Pen Extension

bump

☄️ Hey! I'm Flipped_. ☄️

Here, you can sit down in that chair over there. No no, that one. The other
one is reserved for my pet coelacanth.
I guess we wait now. Feel free to drink some orange juice
in the meantime.
———————————————
Flipped_
Scratcher
500+ posts

Improvements to the Pen Extension

bump

☄️ Hey! I'm Flipped_. ☄️

Here, you can sit down in that chair over there. No no, that one. The other
one is reserved for my pet coelacanth.
I guess we wait now. Feel free to drink some orange juice
in the meantime.
———————————————
Flipped_
Scratcher
500+ posts

Improvements to the Pen Extension

bump

☄️ Hey! I'm Flipped_. ☄️

Here, you can sit down in that chair over there. No no, that one. The other
one is reserved for my pet coelacanth.
I guess we wait now. Feel free to drink some orange juice
in the meantime.
———————————————
PopStarYoda
Scratcher
1000+ posts

Improvements to the Pen Extension

Support! This would be very helpful for those who like to use the pen feature. It would also make drawing with it a whole lot easier.


кᴀтнɪᴇ | ♀ | ɪɴғᴘ | ʀᴀνᴇɴᴄʟᴀᴡ | ғσʀᴜм нᴇʟᴘᴇʀ | 3 ʏᴇᴀʀs+ σɴ scʀᴀтcʜ | † | нσмᴇѕᴄнσσʟᴇᴅ | cᴜʀᴀтᴇᴅ x1
♥️ ᴘʀσғɪʟᴇsтᴀтsᴀвouт ᴍєwσʀkshoᴘɪɴѕρɪʀᴀтɪσɴ вσᴀʀᴅ ♥️
——————
——————
-Rex-
Scratcher
500+ posts

Improvements to the Pen Extension

Erasing an individual sprite's pen trails would be difficult to implement with good performance, since (IIRC) pen trails are stored in a single bitmap image. If two sprites drew to the same layer, erasing one sprite's trails would require redrawing the entire pen layer without that sprite's trails, which would not be good for performance and would require storing every single pen trail.
StrangeMagic32
Scratcher
1000+ posts

Improvements to the Pen Extension

-Rex- wrote:

Erasing an individual sprite's pen trails would be difficult to implement with good performance, since (IIRC) pen trails are stored in a single bitmap image. If two sprites drew to the same layer, erasing one sprite's trails would require redrawing the entire pen layer without that sprite's trails, which would not be good for performance and would require storing every single pen trail.

This wouldn't happen based on how I'm reading the Pen Layers, they would work like the sprites layers which can't have 2 sprites on the same layer.

Flipped_ wrote:

I think the pen layer system should follow the sprite layer system; you should be able to choose what layer the pen is on, similar to how sprites can.


“Remember the worth of souls is great in the sight of God;”
- Doctrine and Covenants 18:10


I have since moved to @JollyWinter
NitroCipher
Scratcher
500+ posts

Improvements to the Pen Extension

Check out this topic, it is basically this suggestion, but with more stuff

I hope my post helped you in some way! Post count: 500+

Current project: [s3Blocks: scratchblocks rewritten for Scratch 3.0] ::#4b4a60 //https://scratch.mit.edu/discuss/topic/290031/ Basically done!
This is my signature identifier “aWFtbml0cm9jaXBoZXI=”
Flipped_
Scratcher
500+ posts

Improvements to the Pen Extension

NitroCipher wrote:

Check out this topic, it is basically this suggestion, but with more stuff
That is a similar suggestion, but way more complex. I don't think this would be considered a duplicate.


☄️ Hey! I'm Flipped_. ☄️

Here, you can sit down in that chair over there. No no, that one. The other
one is reserved for my pet coelacanth.
I guess we wait now. Feel free to drink some orange juice
in the meantime.
———————————————
-Rex-
Scratcher
500+ posts

Improvements to the Pen Extension

StrangeMagic32 wrote:

This wouldn't happen based on how I'm reading the Pen Layers, they would work like the sprites layers which can't have 2 sprites on the same layer.
This would break compatibility with some older projects. The best solution I can think of would be to allow multiple sprites to be in the same layer and have a block that clears a single layer.
kritav
Scratcher
100+ posts

Improvements to the Pen Extension

No support.

All of these have workarounds.

The way to make pen blocks go to the front is to stagger the rendering so that the sprite that is supposed to be at the back renders first.
Erasing part of a pen would be hard–just use custom blocks without screen refresh so that it erases just as fast as the sprite is drawn.
Also, about the pen erasing everything, that doesn't matter if you use custom blocks.

so yes

Flipped_
Scratcher
500+ posts

Improvements to the Pen Extension

kritav wrote:

The way to make pen blocks go to the front is to stagger the rendering so that the sprite that is supposed to be at the back renders first.

The pen layering would be useful since you can shift drawings after they are drawn, or while they are drawn.

kritav wrote:

Erasing part of a pen would be hard–just use custom blocks without screen refresh so that it erases just as fast as the sprite is drawn.
Also, about the pen erasing everything, that doesn't matter if you use custom blocks.

I'm not exactly sure what you mean by that. Do you mean redraw over and over again (without screen refresh) to make the pen look like it's being erased? The problem with that is the overload of blocks you would have. And also, for example, if you were using a pen text engine how would you make a letter half-formed (partially erased)?

Also, the reason why I included the erasing part is because in one of my projects, I needed to draw a line gradually and then erase it gradually. Now I ended up with just drawing a white line over the original line gradually, which makes a mark over the part of my backdrop that isn't white. It would be a whole lot harder to redraw that line over and over again, but smaller and smaller.

☄️ Hey! I'm Flipped_. ☄️

Here, you can sit down in that chair over there. No no, that one. The other
one is reserved for my pet coelacanth.
I guess we wait now. Feel free to drink some orange juice
in the meantime.
———————————————
Flipped_
Scratcher
500+ posts

Improvements to the Pen Extension

-Rex- wrote:

This would break compatibility with some older projects. The best solution I can think of would be to allow multiple sprites to be in the same layer and have a block that clears a single layer.

Older projects with pen would just be drawn on one layer. To elaborate, though, when you draw on one layer and the pen overlaps another drawing on the same layer, the newer drawing would be shown in front, so it would not be break compatibility with older projects.

I edited the post to explain my suggestion better.

Last edited by Flipped_ (Feb. 15, 2019 03:12:02)


☄️ Hey! I'm Flipped_. ☄️

Here, you can sit down in that chair over there. No no, that one. The other
one is reserved for my pet coelacanth.
I guess we wait now. Feel free to drink some orange juice
in the meantime.
———————————————
Flipped_
Scratcher
500+ posts

Improvements to the Pen Extension

Bumpity bump

☄️ Hey! I'm Flipped_. ☄️

Here, you can sit down in that chair over there. No no, that one. The other
one is reserved for my pet coelacanth.
I guess we wait now. Feel free to drink some orange juice
in the meantime.
———————————————
DipLeChip
Scratcher
1000+ posts

Improvements to the Pen Extension

Full Support.
Pen layering and the Pen Erasing would really help with certain projects I want to make. Because I hate having to make a script to redraw everything when I'm trying to delete just one thing. Pen Layering can help with making cool patterns, I would really like that.

Last edited by DipLeChip (Feb. 20, 2019 21:47:31)


stop fuming and start loving :p
PopStarYoda
Scratcher
1000+ posts

Improvements to the Pen Extension

OwenRich wrote:

Full Support

Hi! Please explain why you support/don't support a suggestion. Thanks!


кᴀтнɪᴇ | ♀ | ɪɴғᴘ | ʀᴀνᴇɴᴄʟᴀᴡ | ғσʀᴜм нᴇʟᴘᴇʀ | 3 ʏᴇᴀʀs+ σɴ scʀᴀтcʜ | † | нσмᴇѕᴄнσσʟᴇᴅ | cᴜʀᴀтᴇᴅ x1
♥️ ᴘʀσғɪʟᴇsтᴀтsᴀвouт ᴍєwσʀkshoᴘɪɴѕρɪʀᴀтɪσɴ вσᴀʀᴅ ♥️
——————
——————
DipLeChip
Scratcher
1000+ posts

Improvements to the Pen Extension

PopStarYoda wrote:

OwenRich wrote:

Full Support

Hi! Please explain why you support/don't support a suggestion. Thanks!
edited

stop fuming and start loving :p

Powered by DjangoBB