Page 1 of 1

[SOLVED] Help: ms paint clone project

Posted: Mon Aug 25, 2014 3:09 pm
by nice
Hello boys and girls!

Last year I did a project in Löve which I'm really proud of but fast forward to today and I haven't touched Löve for varied reasons but know I want to get back in the game.
The way I want to learn Löve/lua is by making two projects: on that focuses on the graphical part and one that focuses on the technical part and the one I want to focus on for now is the graphical part.

What I mean by the graphical part is that I want to make not a game but a very simple editor/colouring program and when I mention that I start by thinking of Ms paint: that's right I want to make a Ms paint clone!
Here's the idea and I will attach a .png file explaining a bit more what I mean:
  • -The brush size is 16x16 big
    -You can set the background with two different colours: black and white, you can also reset your canvas that way
    -You have a varied assortments of colours (not to many)
    -To pick a new colour you click on the colour of your choosing
So I'm looking for a good tutorial or articles explaining how to do it, I would appreciate that you take your time and help me with this little project.

XOXO

-Knodd

Re: Help: ms paint clone project

Posted: Tue Aug 26, 2014 2:34 pm
by veethree
It can be done by just drawing things to a canvas. The brush can just be a 16x16 circle that sticks to the mouse. The color picker can be very basic buttons. I'm sure you can pull this off relatively easily.

EDIT: 16x16 rectangle* Was on mobile earlier, didn't notice the image.

Re: Help: ms paint clone project

Posted: Tue Aug 26, 2014 5:27 pm
by nice
It can be done by just drawing things to a canvas. The brush can just be a 16x16 circle that sticks to the mouse. The color picker can be very basic buttons. I'm sure you can pull this off relatively easily.

EDIT: 16x16 rectangle* Was on mobile earlier, didn't notice the image.
Thanks for your reply!
Just one thing though, which functions löve/lua should I keep an eye on?

Re: Help: ms paint clone project

Posted: Tue Aug 26, 2014 9:49 pm
by veethree
Main thing you'd need to read up on would be canvases. Aside from that the only functions you would need are the love.graphics drawing and graphics state functions.

For the buttons you would need a way to tell if the mouse is within a rectangle, That's pretty simple, And there's plenty of threads about this already. For example here,

Re: Help: ms paint clone project

Posted: Tue Aug 26, 2014 9:53 pm
by nice
Thanks for your help! I appreciate it!