Draw Tool

user_avatar Made by: DomiNation

PROJECT DESCRIPTION

Share this project:

I got kind of carried away with this. But it is a great example of how to make draw stuff if you can decipher what I did in the code.
This is also a great example for making an infinitely expanable color pallete and infinitely expandable pixels (I am working on custom canvas size).

***Just tap stuff on the menu screen to see what they do!

VERSION 1.4

Last Updated: September 21, 2022

Good news: I added an undo button! It can save 5 undos at a time!

Bad news: It's laggier than before. Loading the pixels is the main problem, but that is only once at the beginning. It's about as laggy as before I did the optimization this morning, but it's worth it!!!

COMMENTS

YOU MUST BE SIGNED IN TO LEAVE A COMMENT

July 02, 2016

For an undo button, you can save changes rather than states e.g. If the player taps on a pixel, get its colour and position, and save them. When a user presses undo it will load the colour and position again and set it back.

July 02, 2016

Yea that's what I was doing but the draw tools and fill means that I have to undo multiple pixels at once, which means I need to make undo groups where multiple pixels can be undone. I might just go with one at a time though. Also, it doesn't replace the pixel with a different colored pixel, it changes the pixel color.

July 01, 2016

This is real cool! I understand most of what's going on here and it can definitely help others!

July 01, 2016

Great Job! Absolutely love using this!

July 01, 2016

I love seeing stuff like this. Really makes me excited to be working on hyperpad. Great work so far!

The brush slider is a bit buggy, sometimes it works great, but others it doesn't work at all. I notice it works perfectly after using the fill tool after filling the grid.

A cool feature would be a shade slider. So you can change how light or dark you draw. This could be great for shading. You could do this by simply changing the hex or rgb of the selected colour.

Other than some performance issues, it's really awesome.

July 01, 2016

The full doesn't work. It just lags out and crashes/freezes

July 01, 2016

It's pretty good, some suggestions:

  • The grid generates slowly. I would recommend using a loop instead, check out the project I uploaded for generating a grid with loops

  • It wasn't clear how to get out of view mode

  • There was no way to get the help back up after I had started drawing

  • What does the slider down the bottom do?

  • Can't drag for drawing

  • Perhaps you could add a colour picker similar to what hyperpad uses, I have a hex colour generating project, but it's a bit complex and could be improved using loops instead of timers and waits (will work on it soon).

July 01, 2016

I did the for loops and improved efficiency a bit, I don't know if it's worth using though because it still uses a lot of behaviours.

July 01, 2016

The grid is created by shrinking every pixel. This way I can have any size pixels so I can make an adjustable canvas size.

July 01, 2016

Also, I will work on making more options for color but my main priority is a resizeable canvas. For now, you will have to settle with copy/pasting custom colors by tapping the color/pen size indicator in the top right.