This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
LDDestroier's profile picture

PAIN - NFP+NFT+BLT+GIF+UCG support, block characters, undo buffer, fill tool, and an infinite scrollable canvas

Started by LDDestroier, 07 April 2016 - 06:50 PM
LDDestroier #1
Posted 07 April 2016 - 08:50 PM



pastebin get wJQ7jav0 pain
wget https://github.com/LDDestroier/CC/raw/master/pain.lua
std pb wJQ7jav0 pain
std ld pain pain

Syntax:

pain <filename> [view (displays the picture and exits)] [x] [y] [frameNo]
pain [-n] --no argument will also create new image
pain -h/--help

PAIN is an advanced, yet simple-to-use paint program that can be used to make artwork in ComputerCraft better and faster than ever!
PAIN automatically converts images from NFP (used by paint), NFT (used by npaintpro), BLT (used with the BLittle API), GIF (used with real paint programs), and UCG (used by silica). You can export to these formats too!

It also supports frames, which allows you to save multiple images in the native format and BLT as one file.

Controls:
Spoiler

Arrow keys: scroll canvas up/down/left/right
  • +LeftShift: translate picture up/down/left/right
  • +Tab: Hold while using arrow keys to guarantee that you'll only move one character at a time
F1: Open up verbose help.
F3: Show all connected monitors.

Mousewheel: change background color
  • +LeftShift: change text color
'[' or ']': also change background color
  • +LeftShift: also change text color
Right click: erase a thing

Middle click or 'T': Place text with a prompt (cancel with X)

'Z': Undo. The buffer allows for, by default, a total of five undos.
  • +LeftAlt: Redo.
'P': Pick text and background colors from a part of the screen (cancel with X)

leftclick: Put down background color below cursor
  • +LeftShift: Drag and draw a line
'+' and '-': Go to next and previous frame respectively. If going to a frame that doesn't exist, makes a new one, unless you are previewing with BLittle, in which case it'll loop back.
  • +LeftAlt: Replaces the current frame with the next or previous one respectively.
  • +LeftShift: Merges the current frame atop the next or previous one respectively.
  • +RightShift: If using '+', will duplicate the current frame IF it's the last one.
'G': Converts to grayscale. Do not fret, press it again to revert. It saves in grayscale too.

'A': Resets scrolling to (0,0)

'C': Quickly scroll to a certain set of coordinates.

'F': Activate fill tool - left click on a spot to fill with the current color/character. Right click deletes the region instead.
  • +LeftShift: Fills all empty pixels on the screen with your current text/background color.
'T': Activate text tool - click on a spot, then type out text and push enter to put down text.

'M': Changes the metadata attribute to each pixel. It's not terribly useful, unless you want to make a game map in PAIN or whatever.

Ctrl: Opens the menu.

'B': Toggle BLittle preview mode (if possible)

'N': Opens up the block character selection screen.
  • +Shift: Opens up the special character selection screen (all characters from byte 0 to 255)
MENU:
File:
  • Save: Saves the picture. If no filename was given, it will ask for one.
  • Save As: Same as save, but it cuts straight to the chase and asks for a filename.
  • Export: Saves the picture in one of six formats, being tabular PAIN format, NFP, NFT, BLT, UCG, or GIF.
  • Open: Opens another image.
Edit:
  • Delete frame: Deletes the current frame.
  • Clear frame: Removes all dots in a frame.
  • Crop frame: Removes all dots that are outside the screen.
  • Choose Box Character: Opens up the box character selection.
  • Choose Special Character: Opens up the special character selection.
  • BLittle Shrink: Shrinks image with the BLittle API.
  • BLittle Grow: Reverses the effects of BLittle Shrink.
  • Cut: Select a rectangular area, and cut it to a clipboard.
  • Copy: Select a rectangular area, and copy it to a clipboard.
  • Paste: Paste a specified clipboard onto the canvas.
Set:
  • Config options are self-explanatory and I'm tired, get off my case
Window:
  • Set Screen Size: Sets the size of the "@" references of the size of the screen. Can be set to an XY value, or to that of a connected monitor.
  • Set Scroll XY: Set the X and Y coordinates that you scroll to.
  • Set Grid Colors: Sets the backdrop colors to your currently selected color configuration.
Exit:
  • Duhhh, I dunno


Screenshots:
Spoiler
Picture in PAIN.


The very same picture in Paint (rom/programs/paint)


You can make lines! And text! If middle click is impossible (say you're on one of those laptops), pressing 'T' will work the same.


Move the canvas with arrow keys!


In addition to showing screen limits, also shows block character limit! (2*x, 3*y). It even can open/save to/from the native BLittle format, BLT!

The bad stuff…
SpoilerBugs inherent in CC:
Spoiler
  • Scrolling function might not catch "key_up" event, and keep scrolling until you press and release that direction again. This is probably not a problem on CC emulators like CCEmuX though.

Bugs inherent in PAIN (that are technically solvable):
Spoiler
  • Default saving format is really inefficient. Since launch, I've mitigated a bit it by removing whitespace and newlines and stuff, but it's still pretty gnarly. That's why I recommend exporting to NFT most often, especially if you don't need to take advantage of multilayer images. You can set a variable at the top of the code to set the default save format.

Demonstration video:
[media]http://www.youtube.com/watch?v=h-ofuCraKYk[/media]
Edited on 04 February 2020 - 01:05 AM
supernicejohn #2
Posted 08 April 2016 - 01:13 PM
I like it, it's nice to have a scrollable canvas! And with a mouse the controls would be excellent (No middleclick or RMB+scroll on my laptop), I'll have to try it out at home with a mouse.
I think the file format is nice, and saving twice reduces file size sometimes, (it saves a pixel multiple times occasionaly).

Good work! :)/>
LDDestroier #3
Posted 08 April 2016 - 01:43 PM
I like it, it's nice to have a scrollable canvas!
Thanks! Having a scrollable canvas was one of the reasons I have a table-based saving format.

And with a mouse the controls would be excellent (No middleclick or RMB+scroll on my laptop), I'll have to try it out at home with a mouse.
Okay, the controls ARE a bit awkward. I can quickly change it to using LSHIFT or LALT instead of rightclick. But putting down text has to be middle click. On my lapop (which runs Ubuntu), I can middleclick by pressing both laptop buttons at the same time. I guess I could have it so that it detects if you leftclick, then rightclick with leftclick still down.

I think the file format is nice, and saving twice reduces file size sometimes, (it saves a pixel multiple times occasionaly).
Saving PAIN pictures was kind of troublesome to code. I needed to make SURE that no two (or more) pixels existed in the same X and Y space. But that's really hard, as it means whenever you save, it loops through the amount of pixels squared. I bet it wouldn't lag so much if I didn't use textutils.serialize to compare tables. I changed the way it finds redundant pixels, and now it works just dandy.
Edited on 08 April 2016 - 01:11 PM
EveryOS #4
Posted 08 April 2016 - 05:16 PM
Could you explain exit?
LDDestroier #5
Posted 08 April 2016 - 05:56 PM
Could you explain exit?
Exit is a function that makes animatronic arms shoot out of your monitor, make you toast in your DVD drive (not compatible with CD drives), and pours battery acid down your trousers while blaring a looping clip of Nicolas Cage laughing.


<ontopic>

At the time of posting, I fixed the function that deletes pixels that exist within the same X and Y, clearing space.
EveryOS #6
Posted 08 April 2016 - 06:22 PM
Exit is a function that makes animatronic arms shoot out of your monitor, make you toast in your DVD drive (not compatible with CD drives), and pours battery acid down your trousers while blaring a looping clip of Nicolas Cage laughing.
Thanks (;
LDDestroier #7
Posted 27 April 2016 - 06:12 PM
New update! I pretty nice one, I might add.

+Added a 'metadata' attribute to each pixel drawn. This is only useful when making a game using PAIN, which I might do.
+Added button combination to fill all blank pixels with your selected colors
+Added button to set scroll back to start (0,0)
+Added button to toggle displaying and saving in grayscale. Note this does not mean PAIN is for normal computers.
*Fixed flickering whenever you press any key or scroll the mouse.
*Spit on it to make it shine

* = fix, + = addition
Edited on 27 April 2016 - 04:33 PM
LDDestroier #8
Posted 28 April 2016 - 01:18 PM
yaya more update

Scrolling is now faster and smoother using a parallel.waitForAny and a table with all the pressed keys.
Also, I changed the background of 'o's to an actual grid! The whole grid is rendered in one long, convoluted line.
Waitdev_ #9
Posted 20 May 2016 - 01:24 PM
if supernicejohn has a mac, why not try using gestures?

also, i'm gonna try out the program :)/> i'll see if i can get to work with blittle aswell :D/>
Edited on 21 May 2016 - 12:11 AM
LoganDark #10
Posted 20 May 2016 - 01:26 PM
Mac OS X has no middle click gesture, and you can't scroll while clicking
Edited on 21 May 2016 - 12:12 AM
Waitdev_ #11
Posted 20 May 2016 - 01:31 PM
well, ik about it having no middle click but true, you can't scroll while clicking.
Edited on 21 May 2016 - 12:12 AM
supernicejohn #12
Posted 20 May 2016 - 09:33 PM
Just to clear things up, that was on my school computer, a windows machine. I'd prefer to have a mac at school too, but they give them to us for free.
I personally think Mac OS is better, but I think it depends on what you start with. Always had Mac OS (since Classic) and I still like it.
Ontopic, this is a better editor than the default one! The file format allows for some pretty cool stuff!
Edited on 21 May 2016 - 12:10 AM
LoganDark #13
Posted 20 May 2016 - 10:03 PM
Had windows all my life past the release of Windows 10. Got an 8-year-old MacBook (that's now BROKEN, thanks cousin) and on Feb 21, 2016 got a MacBook Pro. Completely ditched my Windows machine for this thing. Awesome. It can run everything but MC shaders with over 60 FPS (CURSE YOU INEFFICIENT RESOURCE-HOGGING OVERDONE SHADERS)
Edited on 21 May 2016 - 12:10 AM
supernicejohn #14
Posted 20 May 2016 - 11:58 PM
Is it just me or has MC gotten less resource efficient over the years? iMac from 2011 =P ( occasionally Powerbook G4 from 2004 <— 2fps xD)
Edited on 21 May 2016 - 12:11 AM
H4X0RZ #15
Posted 21 May 2016 - 12:27 AM
Am I the only one with a semi-good amount of FPS? :o/>

Edited on 21 May 2016 - 12:08 AM
Waitdev_ #16
Posted 21 May 2016 - 01:56 AM
Am I the only one with a semi-good amount of FPS? :o/>


Semi-good?

WHAT ARE YOU EVEN DOING HERE I THOUGH WE WERE TALKING ABOUT BAD FPS xD

(though seriously, how'd you get it that high? any certain graphics card?)

ontopic (lol):

Thanks heaps for making this program, it can be so useful :D/> I was thinking of using it with blittle since with the normal paint you can't get as big of pictures.
Edited on 21 May 2016 - 12:09 AM
Bomb Bloke #17
Posted 21 May 2016 - 02:14 AM
C-C-C-Combo edit! Yeah, let's not abuse the forum quote feature.

I was thinking of using it with blittle since with the normal paint you can't get as big of pictures.

Easier said than done; how will you target which "pixels" you want to draw to? ;)/>

Sure, you could use BLittle to draw a "preview" next to your main drawing area, but then you've got even less screen space to actually work in…
Waitdev_ #18
Posted 21 May 2016 - 02:46 AM
C-C-C-Combo edit! Yeah, let's not abuse the forum quote feature..
what do you mean by that?

and as for the pixel targeting, i mean paint something normal size, then scale it down in a different program:

LoganDark #19
Posted 21 May 2016 - 04:00 AM
C-C-C-Combo edit! Yeah, let's not abuse the forum quote feature.
First of all, we weren't abusing it.
Second of all, it wasn't causing any trouble.
Third of all, you don't need to "C-C-C-Combo Edit!" it.
Edited on 16 June 2016 - 01:06 AM
Bomb Bloke #20
Posted 21 May 2016 - 04:09 AM
First of all, we weren't abusing it.
Second of all, it wasn't causing any trouble.
Third of all, you don't need to "C-C-C-Combo Edit!" it.

Having to scroll through the same text repeated half a dozen times is annoying.

Netiquette! :P/>
TheRockettek #21
Posted 21 May 2016 - 09:18 AM
I really like this Pain application, very useful. But it is quite a bit of a Pain in itself. :D/> No ones laughting
H4X0RZ #22
Posted 21 May 2016 - 09:35 AM
Am I the only one with a semi-good amount of FPS? :o/>/>/>


Semi-good?

WHAT ARE YOU EVEN DOING HERE I THOUGH WE WERE TALKING ABOUT BAD FPS xD

(though seriously, how'd you get it that high? any certain graphics card?)

ontopic (lol):

Thanks heaps for making this program, it can be so useful :D/>/>/> I was thinking of using it with blittle since with the normal paint you can't get as big of pictures.

Normally I don't talk about my secrets with other people but I'll make an exception. I don't have a good GPU (it's just a GTX 760). All I did was shrink the Minecraft window until I reached a desired amount of FPS. Also… running Minecraft on Linux helped me for some reason xD I get 80-120 FPS with shaders on Linux (sometimes just 50. Depends on the shader) and on windows it is just 50-80 FPS.

But I still tend to get around 1k FPS on flat maps when playing full-screen (1920x1080)
Edited on 21 May 2016 - 07:36 AM
TheRockettek #23
Posted 21 May 2016 - 09:41 AM
Am I the only one with a semi-good amount of FPS? :o/>/>/>


Semi-good?

WHAT ARE YOU EVEN DOING HERE I THOUGH WE WERE TALKING ABOUT BAD FPS xD

(though seriously, how'd you get it that high? any certain graphics card?)

ontopic (lol):

Thanks heaps for making this program, it can be so useful :D/>/>/> I was thinking of using it with blittle since with the normal paint you can't get as big of pictures.

Normally I don't talk about my secrets with other people but I'll make an exception. I don't have a good GPU (it's just a GTX 760). All I did was shrink the Minecraft window until I reached a desired amount of FPS. Also… running Minecraft on Linux helped me for some reason xD I get 80-120 FPS with shaders on Linux (sometimes just 50. Depends on the shader) and on windows it is just 50-80 FPS.

But I still tend to get around 1k FPS on flat maps when playing full-screen (1920x1080)

:D/> i cant even see the image you first posted. It just says posted image. XD Virgin media and imgur right now dont go very well

Those times you need a VPN just to see images

HOLY SHEEET XD 10000 FPS
LDDestroier #24
Posted 22 May 2016 - 07:55 PM
Okay then, I updated PAIN again! These changes aren't as big, but you'll notice them.

+Allows you to use '[' and ']' to change colors (use SHIFT for text colors)
+Added lines indicating the max screen size for regular viewing AND blittle (x*2,y*3)
+Added a void of "/"s where you cannot save dots
+Added a warning if any dots are x<0 or y<0

I've been meaning to add lines to the canvas for a while, but didn't care to figure out how until now.
Edited on 22 May 2016 - 05:55 PM
LDDestroier #25
Posted 14 June 2016 - 07:02 PM
New update! And it's fairly big.

+Added line drawing! Hold SHIFT and drag leftclick
+Added 'Clear' option in menu to clear all dots on frame.
*Fixed saving in grayscale.
*Fixed the 'fix' option, if dots are out of bounds.
*Updated the drawing code; now it fills in dots the "mouse_drag" event didn't pick up
*Optimized dot rendering.
*An easter egg. Press F7.
*Localized a bunch of functions
*Sped up movement with arrow keys
*Can now display normal text files as NFP files, like the default paint program does.

If for some reason you want to use PAIN in CCJam 2016 (and beyond), go right ahead.
Edited on 14 June 2016 - 05:08 PM
KingofGamesYami #26
Posted 14 June 2016 - 07:12 PM
If for some reason you want to use PAIN in CCJam 2016 (and beyond), go right ahead.

Actually, I don't think it's allowed, because you updated it after they posted. I asked about a similar scenario, and the answer was no.
H4X0RZ #27
Posted 14 June 2016 - 07:23 PM
If for some reason you want to use PAIN in CCJam 2016 (and beyond), go right ahead.

Actually, I don't think it's allowed, because you updated it after they posted. I asked about a similar scenario, and the answer was no.

So we can't use PAIN to draw stuff for the CCJam? :o/>
LDDestroier #28
Posted 14 June 2016 - 07:33 PM
No, I'm not sure about that. PAIN was first posted well before June 12th, but was updated today. The rule is that any program or API released to the public on or before June 12th are free to use. I'll have to ask.
CrazedProgrammer #29
Posted 15 June 2016 - 07:24 PM
Cool program!
Will you add text and NFT support?
Also, the JSON format is EXTREMELY inefficient, I strongly suggest you make a custom format to suit your needs.
LDDestroier #30
Posted 15 June 2016 - 07:39 PM
Will you add text and NFT support?

Text is already supported. Do it with middleclick. And isn't NFT the normal paint format? I thought it was called NFP.

Also, the JSON format is EXTREMELY inefficient, I strongly suggest you make a custom format to suit your needs.

Yeah, agreed. I already got an idea of how to format it next, but I'm having difficulty doing that.


Oh btw NEW UPDATE! You can now draw by holding the mouse button and pressing arrow keys. Like holding a pen down and moving the paper.
Edited on 15 June 2016 - 07:20 PM
LDDestroier #31
Posted 06 July 2016 - 10:58 PM
This is a small update, but one I should've done a while ago. On pocket computers, the menu was broken, and it would redraw weirdly every time you select a different option…and, uh, now it doesn't.

Also I drew TROGDOR THE BURNINATOR!
Edited on 06 July 2016 - 08:58 PM
CrazedProgrammer #32
Posted 06 July 2016 - 11:36 PM
Nice!
I love how there is no error checking for the input file, so you can basically do
pain /rom/apis/window
and get some modern art, but you might want to change that :P/>

Btw NFT is the image format made by nitrogenfingers for NPaintPro.
It supports text and text colours and it's very easy to implement, that's why it's so widely used.
You can view the technical info at https://github.com/o...ts/image/nft.md
Edited on 06 July 2016 - 09:39 PM
LDDestroier #33
Posted 07 July 2016 - 03:35 AM
Nice!
I love how there is no error checking for the input file, so you can basically do
pain /rom/apis/window
and get some modern art, but you might want to change that :P/>

Btw NFT is the image format made by nitrogenfingers for NPaintPro.
It supports text and text colours and it's very easy to implement, that's why it's so widely used.
You can view the technical info at https://github.com/o...ts/image/nft.md

Ahh! I gotta go do that now then!

EDIT: AAHHH why does NFA not use the same format as NFT??
Edited on 07 July 2016 - 02:23 AM
LDDestroier #34
Posted 28 October 2016 - 05:32 PM
A new update! And a good one!

Spoiler

+Replaced 0-9 for metadata with pressing 'M' and having a prompt
+Added 'C' button to teleport to coordinates
+Use LEFTALT+ '+' and '-' to replace current frame with next/prev one
+Added verbose help with 'F1'
+Made it so you can press a letter and have the menu cursor jump to a command starting with that letter
+Added 'Quit?' YN prompt if you exit without saving
+Added (X:* Y:*) indicator
+Added individual character scrolling by holding TAB
*Fixed bug where it crashes if you delete the latest frame
*Fixed bug where right ctrl doesn't close out of menu
*Made 1200% more cool than the next leading brand
*Removed 'Q' to quit in menu
*Localized a few things that weren't localized before
-Exorcised dan200's dead brother from the code

Changing a bunch of these things has been a thought for a while now, so it's good to finally check them off a to-do list. It's been my pleasure to give you more PAIN!
Edited on 28 October 2016 - 03:33 PM
LDDestroier #35
Posted 05 November 2016 - 04:03 PM
New update! Press B to preview your picture with the BLittle API! It downloads the API and loads it into memory, and disables menus and prompts. That was another thing I've been meaning to add for a while
Oh, and I added the ability to toggle displaying the grid with SHIFT+SPACEBAR.


To sum it all up, someone please say they both use and like it – that is more compelling a thing to a developer to continue developing than most people know
Edited on 05 November 2016 - 03:50 PM
Bomb Bloke #36
Posted 08 November 2016 - 02:20 PM
Frankly, asking programmers to use something other than their own programs isn't likely to yield results.

Personally I do nearly all my pixel work in MS Paint and an ancient copy of Paint Shop Pro. Despite Microsoft's best efforts to wreck the former with every release of Windows they come out with, mind you. It's all gone downhill for that app since 3.11… but anyway, typically I manually encode from there, typing in the colour data according to what I've drawn.

That said, as drawing programs for ComputerCraft go, this one's pretty good. It's responsive and fairly easy to use (so long as you RTFM).

The one thing I don't get is why you don't use that status bar down the bottom to accept some mouse input for the purposes of eg opening the menu and selecting its options, etc.
LDDestroier #37
Posted 09 November 2016 - 01:57 AM
Frankly, asking programmers to use something other than their own programs isn't likely to yield results.
Yeah, fair enough. But some feedback wouldn't hurt, y'know…

That said, as drawing programs for ComputerCraft go, this one's pretty good. It's responsive and fairly easy to use (so long as you RTFM).
Thank you. It's always been my pleasure to make more hotkeys than necessary.

The one thing I don't get is why you don't use that status bar down the bottom to accept some mouse input for the purposes of eg opening the menu and selecting its options, etc.
Hmm, that's a good idea. You'll find that…in the next update!
LDDestroier #38
Posted 09 November 2016 - 04:38 AM
And the next update.

+Clicking and dragging on the menubar allows you to select an option by letting go
+Clicking and quickly letting go on the menubar just opens it up
*Fixed bug with skipping a pixel when deleting with right click and arrow keys
*Improved help screen to adapt to size of screen.

Today is the day where the president of the united states is elected…and…Trump is winning at this seconds…uuuuhhhghh
LDDestroier #39
Posted 21 December 2016 - 04:31 AM
Another update!

+Allowed PAIN to be read as an API with os.loadAPI()
+Added 'view' argument after filename, to render picture then close.

The process of turning PAIN into an API was the main problem, but it's for the better.
Edited on 21 December 2016 - 03:34 AM
Pyuu #40
Posted 21 December 2016 - 04:37 AM
Lovely looking program. What's unclear in the instructions is what to do with the frames?
You can have multiple frames, but how would you go about animating this in another program?

Sorry, just lazy at the moment.
LDDestroier #41
Posted 21 December 2016 - 01:14 PM
Lovely looking program. What's unclear in the instructions is what to do with the frames?
You can have multiple frames, but how would you go about animating this in another program?

Sorry, just lazy at the moment.

Isssokay. Frames are basically different layers that you can switch between. If you want to make an animation, you do have to make your own animation program, though.
TheRockettek #42
Posted 21 December 2016 - 02:54 PM
is there a way to turn a pain file directly into a png for example. Or a way to see just your image without the gui so i can screenshot it? :D/>
Edited on 13 February 2017 - 02:44 PM
Bomb Bloke #43
Posted 21 December 2016 - 11:09 PM
Isssokay. Frames are basically different layers that you can switch between. If you want to make an animation, you do have to make your own animation program, though.

So are they frames, or are they layers?

I have an API which can dump out images to an animated format. Just sayin'.
LDDestroier #44
Posted 19 March 2017 - 09:47 PM
A new update for PAIN! You know how there are "@" indicators for the screen size? Well, now that can be changed in the CTRL menu.
Set it to either an X and a Y value, or give the name of a connected monitor and it will set the reference to the size of the monitor! Also, press F3 to list all connected monitors.
LDDestroier #45
Posted 23 October 2017 - 03:16 PM
Major update!
  • Added actual submenus, such as File and Edit
  • Added support for export and import to/from NFT format (will automatically import from correct format)
  • Added support for export (not import) to BLittle's BLT format
  • Added new argument "-n" to create new file and declare filename afterward.
  • "pain [filename] view" now works with other formats besides native PAIN.
Many thanks to Bomb Bloke for help with export to BLT.
By the by, if export to BLT chops off the right half of a picture (or doesn't save image data at all), you will want to wait until an update to BLittle fixes that. blittle.shrink() seems to determine picture width an odd way. I'll investigate it (read: pester Bomb Bloke)
Edited on 12 November 2017 - 07:49 PM
LDDestroier #46
Posted 12 November 2017 - 08:50 PM
Fixed BLT export, and added a color picker button "P". You can also create a new image just by using the command "pain" with no arguments, so as to work with GUI operating systems better.
LDDestroier #47
Posted 07 January 2018 - 05:27 AM
Update:

+Added "Crop Frame" option to delete all dots not onscreen
+Added GIF export/import!!!!
+Added UCG export/import too!!!
+Added extra menu items for actions that only had button inputs
*Changed save function so that if you open an image, saving will save in that format instead of the default one
*Fixed bug involving block character picker and a large line appearing
*Fixed bug with color picker ignoring scroll
*Changed fill function (Shift+F) so that it doesn't ignore the bottom Y layer if the menu is visible
*Tidied up bottom bar

GIF is now a supported file format for read/write! Thanks to Bomb Bloke and his GIF API!

I also updated all screenshots and added a real title image! Huzzah!
Edited on 07 January 2018 - 08:56 AM
LDDestroier #48
Posted 13 February 2018 - 07:56 PM
New update: an actual undo buffer! Undo and redo up to 5 times. Configurable with the "undoBufferSize" variable.
Use "Z" to undo.
Use "LeftAlt+Z" to redo.

I also fixed a bug involving saving without preemptively declaring the file name.

REJOICE!



(and bomb bloke, they are frames, and I will take extra care into calling them frames from now on)
Edited on 16 February 2018 - 10:19 PM
CrazedProgrammer #49
Posted 15 February 2018 - 10:31 PM
Woah that's amazing!
LDDestroier #50
Posted 16 February 2018 - 06:02 PM
Woah that's amazing!

I've been waiting for what feels like years for someone to reply to an update with something other than a bug report. Thanks a ton.

On a side note, I updated the Discover Store listing for PAIN, among other programs.
LDDestroier #51
Posted 23 February 2018 - 07:03 AM
Update:

+Edit > Shrink BLittle: shrink the image into block characters! Unreversable without Undo.
+Window > Set Grid Colors: sets the backdrop's colors to your current color configuration
*Some graphical hiccups rectified, particularly with canceling a Save As menu
*Maximum undos raised to 8 from five..

BLT import has been found to not be exactly ideal (read: it sucks), but that'll be fixed later. Much later. Where's my hands
Jummit #52
Posted 02 March 2018 - 07:10 PM
Update:

+Edit > Shrink BLittle: shrink the image into block characters! Unreversable without Undo.
+Window > Set Grid Colors: sets the backdrop's colors to your current color configuration
*Some graphical hiccups rectified, particularly with canceling a Save As menu
*Maximum undos raised to 8 from five..

BLT import has been found to not be exactly ideal (read: it sucks), but that'll be fixed later. Much later. Where's my hands
Just giving you +1 for an update two years after you first started the post. First time I see something like this! :)/>
LDDestroier #53
Posted 02 March 2018 - 09:22 PM
Just giving you +1 for an update two years after you first started the post. First time I see something like this! :)/>

My ego has been soothed
LDDestroier #54
Posted 14 October 2018 - 06:32 AM
PAIN now allows you to print images to the best of it's abilities. Since printers (to my knowledge) don't support full-block graphics, and you can't use more than one color per coordinate, it's quite limited. But hey, it's functional. And it prompts for each color, too.

Also, NFT export was bugged in that any characters to the right of transparent space was cut off. This has been fixed.
Bomb Bloke #55
Posted 14 October 2018 - 08:40 AM
Since printers (to my knowledge) don't support full-block graphics

Correct, they're pretty much a terminal that locks the background colour for each character to white.

Y'know, thinking about it, it'd be really pretty cool if we could print directly to maps…
LDDestroier #56
Posted 26 October 2018 - 07:12 PM
It's taken me a long time to figure out how to get a fill tool into PAIN, but now it has one.
Good

(and it doesn't crash when filling over 255 dots, neener neener)

Press 'F' to initiate fill tool ('X' to cancel), and click anywhere to fill that space with color.
Since PAIN has an infinite canvas, it treats either the screen size, or the most far-out dot's coordinates as the boundary.

If doFillDiagonal = true, then it will fill diagonally (but it's false by default)
if doFillAnimation = true, then it will animate as it fills (but it's false by default)


Finally, a paint bucket tool. It's took what, over two years?


EDIT: Also added a File>Open function. That's kinda important too.

EDIT EDIT: Added a Set menu option, with config options. No longer will you have to edit the PAIN file to change anything!

EDIT EDIT EDIT: Added the ability to merge the current frame atop the next or previous frame with LeftShift and '+' or '-'. The function to copy the last frame when making a new one is remapped to RightShift and '+'.

EDIT EDIT EDIT EDIT: Added the ability to copy/cut regions of the screen, and paste them. Instead of having one clipboard, you save a copied region with a name. Also, when making lines, they preview while you are dragging the mouse now.
Edited on 09 November 2018 - 06:29 PM
LDDestroier #57
Posted 22 December 2018 - 10:43 PM
A couple bugs were fixed, involving the fill tool and undo.
And, a video demo was added to the original post. PAIN looks good in high-res.