Pixel Painter+Printer 2.0(BETA)

Demon666 - Custom level - from Android
Play97 players liked this.Log in to like this level.

Feel free to suggest features but first check the future updates list.
Also please tell me if this lags for you and how much and on what settings.
Numfeed is fps()

Default Tool: Pencil(completely overwrites colors)

Update 2.0
- new logo
- redesigned the code
- ~1000% proformance increase
- increased canvas size limit from 60x60 to 300x300!!!
- smoother lines when drawing fast
- brush spacing slider
- increased accuracy of pointer
- supports uneven canvas resolution
- visual canvas resolution scale
- new GUI
- each tool stores its own settings independently
- eyedropper tool
- spray paint tool
- basic brush size indicator
- zoom tool
- pan tool
- added new printer(incomplete)
- printer has 2 sheets of paper


Widget Controls Controls:
vertical slider1: color
horizontal slider2: tone(slide left to draken the color and slide right to lighten the color)
F: resets the alpha to default
vertical slider2: controls brush size
vertical slider3: controls brush spacing(less nessassery with larger brushes)
G: reset canvas resolution
H: print

notes:
- brush smoother version of pencil tool
- maxing out the brush size and brush spacing can
cause massive lag
- visual resolution is 1/2th of the actual resolution
- white/gray checkergrid is transparency(completely blank,no color at all)
- each tool retains the settings(color/size/spacing/etc) that was last used with it
- background color is the eraser only(bottom square)
- forgroundcolor color is for every other color-related tool(top square)
- eyedropper stores color and applies that color to the next color-related tool thats selected


Future Updates:
- merge pan and zoom tools
- fix GUI toolbar
- better brush size indicator
- square brush and circle brush options
- GUI brush sliders/buttons/color picker
- clear image button
- spray paint density setting
- Opacity setting for all color-related tools
- dynamic spacing toggle
- reset canvas resolution
- fix color differences between color view and canvas
- decrease chance of paper jams
- fully functioning printer
- print window
- print preview

- include text into the GUI
- line draw tool
- hollow/filled square tool
- selection tool
- cut selection
- copy selection
- clear selection
- brush tool (smoother version of pencil tool)
- blend tool (blends colors without adding new color)
- store commands but dont run them in real time(lag optimization)
- undo and redo buttons
- Save Button
- add filters(gray-scale, curve,invert colors)
- add bucket tool(this will take a while since i suck at math lol)
- scale selection tool

Views: 7323 Downloads: 2699 Unique objects: 1 Total objects: 290

Parent

Discuss this level

Log in to comment on this level.
  • JupiterSky: @principiafreak300 this too.
  • Alejandro: This reminds me to Windows 3.1 Paintbrush
  • Golden: @Demon666: I could have took screenshot but I forgot...
  • Demon666: @Golden: lol
  • Golden: @Demon666: like someone had rage by the printer pushed it over...
  • Golden: @Demon666: whole printer
  • Demon666: @Golden: the paper right? not the printer itself
  • Golden: Rare bug: printer falls down and blocks canvus
  • JOELwindows7: @Demon666: oh XD lol
  • Demon666: @JOELwindows7:
    well this thing has icons that are directly from gimp xD
  • JOELwindows7: @Demon666: yep, ultimately.
    Now, for the next level is to make like GIMP or Photoshop. If you dare tryin'!
  • Demon666: @Thomas00m: im guessing your wondering how i made the lines so smooth. its simple i drew a line from the last position of the cursor to the newest position of the cursor. then i plotted points along that line. the spacing slider is what controls the amount of plots in each line.
  • Golden: Exactly about eraser, not nil
  • Thomas00m: This is amazing! How did you manage to handle the linear interpolation (remember my paint level)?
  • Demon666: @Golden: I do plan to make it so that the widgets shift to the color that the current brush has when the tool type is changed.... that should make it less confusing.
  • Demon666: @Golden: yeah the eraser is basically just a paintbrush the paints in white. you can change its color just like any other tool. was that the error you were tanking about? or was it an actual code error like something is equal to nil?

    note to self: add a brush presets selector.
  • Golden: Now I see, how eraser works is setting random color or leftover into white, but if you change color while using eraser, changed erase color.
  • Demon666: @Golden: ok fixed bug#1... still can't reproduce bug#2 lol.
  • Demon666: @austin_knauss: Dat speechlessness lol
  • Demon666: @GlaDos: @JOELwindows7: lol
  • Demon666: @Golden: well this is a strange bug... it doesn't do it on pc.... also can't seem recreate the 2nd bug, was there anything else that you did to cause the error?
  • GlaDos: WOW INCREDIBLE! !
  • austin_knauss: Bruh.......
  • austin_knauss: .....
  • JOELwindows7: Maximal Duper Awesome!
    Real app!
  • Golden: So far so good but there's couple of bugs, 1.) Paint doesn't stop painting like paint then letgo then go other location then paint 2.) Error if you try to change color while using eraser then use paint brush
  • duncantoal: Can you guys check out my timer self spouse
  • Demon666: @Golden: and it only took 2 years for someone to notice. i think ill let it be lol
  • Golden: I was roaming around because I was bored
  • Golden: @Demon666: you misspelled eraser as esaser
  • camachi98: Lol
  • RasmusOlle: @Demon666: BTW, its so easy that you can take this level to the contest and then when the contest is finished so must you enable detrivates for a short time so i can get the electronics and move that to Windows Crap Edition and you will get credited with the company name you did made! Easy?
  • RasmusOlle: @Demon666: gotta sleep now, see you in the morning!
  • Demon666: @RasmusOlle: i planned on taking a break from principia untill the update..... im just kinda bored right now lol.... on the off chance i think of anything truly amazing for your contest then ill enter.
  • RasmusOlle: @Demon666: yes, what about entering that to my contest?
  • Demon666: @RasmusOlle: fine. Demon Industries..... happy now? lol
  • Demon666: @RasmusOlle: :]
  • RasmusOlle: @Demon666: *crashes into phone*
  • Demon666: @RasmusOlle: Demon666? lol
  • RasmusOlle: @Demon666: company name!
  • Demon666: @RasmusOlle: me? lol
  • RasmusOlle: @Demon666: what company did make this?
  • Demon666: @RasmusOlle: huh?
  • RasmusOlle: @Demon666: what is your imagnation company?
  • Demon666: @sdac: i already know what i need to do i just haven't gotten around to it. distractions.... distractions.....
  • Demon666: @sdac: this is meant to work with an array right? my painter still doesn't use arrays. version 2.0 will use arrays to store colors and after i get that working then ill add in your idea for redrawing sprites. i cant add anything else on the list unless i make it using arrays i hit a dead-end lol.
  • sdac: @Demon666: a typical flood fill implementation is recursive, but it's very simple. the function might look like this (in pseudo code)
    flood_fill(x,y, search, replace)
    {
    if (get_color(x,y) != search) {return;}
    set_color(x,y, replace);
    flood_fill(x+1, y, search, replace);
    flood_fill(x-1, y, search, replace);
    flood_fill(x, y+1, search, replace);
    flood_fill(x, y-1, search, replace);
    }
  • Ctjet: @Demon666: ha ha, :P
  • Demon666: @Ctjet: youll need it
  • Demon666: @Ctjet: good luck
  • Ctjet: @Demon666: alright, im ging to learn lua and prove you wrong
  • Demon666: @Ctjet: No its not that easy. what if the area you want to fill isn't a perfect circle or a perfect square then it will be very difficult to know where the actual boundaries are supposed to be.
  • Blood: Exelent! Awesome!
  • Ctjet: I am no lua coder, but wouldnt it be easy to implement a fill tool? When a certain color is clicked, start from the center point, then rotate in a spiral until no more colors are being filled in. Just remember that it would only fill the color that was clicked
  • Demon666: @zardOz: thats the main reason why i use a galaxy note lol.
  • zardOz2: Coming along nicely, I'm gonna need a stylus...
  • elie_elie5000: @Demon666: \/
  • elie_elie5000: The Gimp is free Photoshop
  • Demon666: @elie_elie5000: I LOVE THAT PROGRAM! i was about to name it GIMP instead lmao
  • elie_elie5000: The Gimp for Principia !!!!
  • Demon666: @kuba: and that's not even half the problem..... principia has a habit or distorting my signals when i try to transfer them from one lua to another.
  • Demon666: @kuba: oh.... that not as easy at you'ed think lol.... the canvas has a max size of 60x60 thats 3600 pixels each having 4 pieces of data relating to its color (rgba) so id have to find a way to transfer 14400 pieces of data from the painter to the printer......hell..... lmfao
  • kuba: No. Its like parent version of this pixel printer. the white pixel print it.
  • Demon666: @kuba: you mean print like out of an actual printer? that kind of function isn't in principia yet... you can take a screenshot of it and print if out somehow tho.
  • kuba: Greats but it dont printer. If you can, please add print button.
  • Cool Dude: I love it!
  • Cool Dude: I love it!
  • Demon666: @incrazyboyy: Thanks but I prefer the default widgets. if I were to use non RC sliders then they would be lua based.
  • incrazyboyy: For the color choosers: check my non-rc slider
  • incrazyboyy: And custom size works fine on a iPad
  • incrazyboyy: Dude this is amazing!!!!!!
  • Nighthawk: Awesome! now make Microsoft Office collection.lol
  • Demon666: @woodnut: thanks as you can see by the future improvements list... this thing is far from done lol
  • JOELwindows7: @Demon666: lol man.
  • Demon666: @JOELwindows7: where exactly is the typo?
  • Demon666: @JOELwindows7: LMFAO i am a good writer but i cant spell to save my life
  • JOELwindows7: Awesome update!
    But sir, Esaser? Lol!
  • ricardito08: @sdac: Hope you like this! :)
  • woodnut2: Wow ,,, very good lua :)
  • sjoerd19992: Awesome update!!
  • Demon666: @sdac: that's interesting... i was trying to do this without using tables in order to reduce lag as much as possible. i didn't think to restrict the actually redraw times lol.
  • Demon666: @TechZ: @principia_rus: thanks this is still far from finished tho.... a painting program needs to have far more than just two tools lol.
  • TechZ2124: Awesome update ! Your LUA creations are each time more amazing !
  • principia_rus: lua paint?
    this amazing!
  • sdac: Not sure how your code works but a quick optimization that comes to mind is to only update the texture on click release. When a click down event occurs, begin an array of modified cells, and render a colored sprite on top of each modified cell. When click release happens, commit the modified cells by looping through the array and updating the texels. A large texture should not be a problem even for slow devices as long as the calls to set_sprite_texel is not done every frame, it won't even be noticable if all calls to set_sprite_texel are compacted to when click up happens
  • Demon666: @sdac: awwwww.... lol
  • sdac: @Demon666: get_sprite_texel will be in 1.5
  • that guy2: Alpha made transparent for me.
  • Demon666: @pajlada @sdac is there a way to use set_sprite_texel to return the current value of a texel?
  • JOELwindows7: @Demon666: haha yes.
  • Demon666: @JOELwindows7: yeah problem is i haven't figured out how to set the resolution higher without loosing the accuracy on the pencil lol.
  • JOELwindows7: @Demon666: hope they will fix this. That would be awesome lol if we can draw render some png or jpeg file that are in 4K UHD. Can make better version of paint for that.
  • Demon666: @JOELwindows7: resolutions of more then 20x20 will lag more people including yourself lol. a 128x128 resolution might(probably wont) even lag my core i5 tablet lol.....
  • JOELwindows7: @Demon666: umm this. About 128×128 resolution of draw sprite. I want(wonder) if I could draw something in 1080p just one Lua so no that limit by unlag phone. Know why it is limited to 128 by one twenty eight.
  • Demon666: @JOELwindows7: what limit are you talking about?
  • JOELwindows7: Awesome! Wonder more if allowed than limit or it is allow infinity!
  • Demon666: @sjoerd1999: @Rubicon: thanks lol. soon you be able to paint in much higher quality if your device is powerful enough.
  • sjoerd19992: Amazing!!
  • Rubicon2: Awesome! I painted an exact duplicate of the Mona Lisa ;)
  • Demon666: @zardOz: yeah i realized that so i unlocked the zoom. i cant unlock the camera tho or you wont be able to paint properly since the camera will move constantly when you drag on the screen
  • zardOz2: I suggested a save variables to lua feature on tthe wishlist... nice work. I coulddd use the camera unlocked, impossible to "paint" pn a smaller phone.

LEVEL ID: 5597