Here's a fun little Doodler made with Scratch: The Doodle Pencil
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPhZOMfw1JirruHohTy5DGGC6zf9-sV1LyNxeE4xFzugROeKwkjoI9Jb7sTMidBaBzf1wjgQIXxca8KaQZtcAKraNTuBx0SuKBL7bryOprVEAkNa2NfsY9WjmjL12o2qrnxVasDW9x5uA/s320/Screen+Shot+2015-07-27+at+1.00.31+pm.png)
This was rather a spur-of-the-moment project... inspired by Etch-a-Sketch... and kind of a follow-up on the Pac-Man game...
The code is minimal, and I feel not much of an explanation is required. The instructions are mainly from the Pen area of the Scratch Instruction Set, along with the instruction to follow the mouse-pointer. The "green flag click" handler does the initialization - clearing the screen, setting the sprite size and setting up the pen size & color.
The code is interactive, and it's designed to enable the user to lift and lower the pen as required while doodling: Move the mouse pointer to the desired location on screen and then click on the up arrow key; the pen will start drawing now by following the movements of your mouse pointer. Click on the down arrow key to stop drawing at any point.
This could be a fun little exercise for the kids to see how different combinations of the "Pen" and "Motion" instructions interact with each other.
Enjoy doodling!
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPhZOMfw1JirruHohTy5DGGC6zf9-sV1LyNxeE4xFzugROeKwkjoI9Jb7sTMidBaBzf1wjgQIXxca8KaQZtcAKraNTuBx0SuKBL7bryOprVEAkNa2NfsY9WjmjL12o2qrnxVasDW9x5uA/s320/Screen+Shot+2015-07-27+at+1.00.31+pm.png)
This was rather a spur-of-the-moment project... inspired by Etch-a-Sketch... and kind of a follow-up on the Pac-Man game...
The code is minimal, and I feel not much of an explanation is required. The instructions are mainly from the Pen area of the Scratch Instruction Set, along with the instruction to follow the mouse-pointer. The "green flag click" handler does the initialization - clearing the screen, setting the sprite size and setting up the pen size & color.
The code is interactive, and it's designed to enable the user to lift and lower the pen as required while doodling: Move the mouse pointer to the desired location on screen and then click on the up arrow key; the pen will start drawing now by following the movements of your mouse pointer. Click on the down arrow key to stop drawing at any point.
This could be a fun little exercise for the kids to see how different combinations of the "Pen" and "Motion" instructions interact with each other.
Enjoy doodling!
No comments:
Post a Comment