AGSketch (pixel painting program)

Started by Kweepa, Fri 22/01/2010 08:46:56

Previous topic - Next topic

Kweepa



http://www.kweepa.org/step/ags/tech/AGSketch23Jan2010.zip

A pixel painting program made in AGS.
With some unique features:
* a pencil mode that doesn't make double pixels!
* a perspective drawing mode
* an outline fill mode that can quickly recolour outlines
* quick switch between 10 palette colours

And some not so unique:
* magnifier window
* magic wand
* colour picker
* unlimited undo
* save/load with preview

Keys:
X to toggle perspective lock in the pencil mode
C/V to toggle horizontal/vertical pencil drawing
<shift> to move the vanishing point around
1..0 to select one of the palette colours
<ctrl>-click to add to a magic wand selection
<esc> to cancel a selection
Cursor keys to move a selection
<enter> to "flatten down" a moved selection
-/+ or </> to increase/decrease the pen size
<tab> to move/hide the interface
<ctrl>-S to save
<ctrl>-O to open
<shift>-click to draw a line in pencil mode
Right click to cycle tools

Let me know if there is anything you think would be useful to add!
Steve
Still waiting for Purity of the Surf II

abstauber

#1
I'd find it usefull if you would join the Grafx2 project :P :P

Honestly, that pencil tool is really cool - I wish some "serious" program would implement a pencil like that.
But to be even more honest... I bet this baby is going to be abandoned before it's reaches a stable state.
I'm afraid that you might loose interest ;)

Anyway, it's totally incredible what you can squeeze out of the AGS script!
Terrific!

Kweepa

Quote from: abstauber on Fri 22/01/2010 08:58:39
I'd find it usefull if you would join the Grafx2 project :P :P
Work... in a team? That would be too much like... work. :=
Grafx2 looks nice but I don't like the 256 colour limitation.

Quote
Honestly, that pencil tool is really cool - I wish some "serious" program would implement a pencil like that.
That's why I started this project. I downloaded the GIMP source code to see if I could modify that, and threw up in my mouth a little.

Quote
But to be even more honest... I bet this baby is going to be abandoned before it's reaches a stable state.
But... but... it is stable. (I know what you mean though.)
Still waiting for Purity of the Surf II

Ubel

Wow! This is extremely impressive.

Quote from: SteveMcCrea on Fri 22/01/2010 08:46:56
* a pencil mode that doesn't make double pixels!
* a perspective drawing mode
* an outline fill mode that can quickly recolour outlines

These are all something I've been wanting for some of the bigger drawing software to have for a long time. Especially the perspective helper! The pencil is brilliant too.

The fill tool is impressively fast!

I found a bug though: When I select a piece of the image with the rectangular selection tool and move it around, if I click outside the selection area without first pressing ENTER the process goes a bit nuts. And then when I press ENTER later, it copies the original selection into the area where it was moved to. Also I think you should disable UNDO and REDO when the user is in selection mode.

Anyway, please keep up the good work and I will definitely post if I come up with any ideas to add. I could actually see myself using this for some stuff. :)

cat

Fantastic! I always wanted to have a no-double-pixel-pen! I don't have time this weekend but I look into it next week!

zabnat

Quote from: SteveMcCrea on Fri 22/01/2010 09:06:58
But... but... it is stable. (I know what you mean though.)

Stable? I got this when trying to draw to the vanishing poins:

Quote
An error has occurred. Please contact the game author for support, as this is likely to be a scripting error and not a bug in AGS.
(ACI version 3.20.1099)

in "PencilTool.asc", line 471

Error: Error running function 'repeatedly_execute':
Error: Floating point divide by zero

To replicate: Open the program. Show perspective lines. Draw a pixel on vanishing point. Doesn't happen if you draw something before this.

Chicky

I can't run the program, no support for 960x720. I wouldn't call it a bug seeing as i'm running on a macbook pro through crossover but just to let you know.

That no doubles pencil tool looks fantastic, would be very useful for tablet work!

GarageGothic

Are you releasing the source code for this also? I was working on a similar set of drawing tools to be used with my lightmap module, but there didn't seem to be too much interest so I discontinued development. I remember the flood fill tool being a bitch to code (though I eventually got both solid and gradient fills to work without crashing, especially gradient fill is quite slow in response). Which flood fill algorithm are you using? I used four-way fill with a stack (declared as a dynamic array) but was considering switching to scanline fill for solid colors.

Kweepa

Fixed:
* vanishing point divide by zero :-[
* click outside selection confusing the tool

GG: I stole a couple of pieces of technology from SSH - a modified version of the save dialog with preview, and the flood fill routine, which is as you guessed a four way fill with a stack (although a static stack).

Chicky: I set the default resolution to 640x480 in the ini file. Hopefully that'll help you.

Everyone else: Thanks for the comments!

Steve
Still waiting for Purity of the Surf II

cat

Luckily I had some time to try your tool. I like the pen and the outline fill, and I totally love the perspective lock.

Some issues:

1) When you use the outline fill on a non-outline pixel you have some very strange effects.
2) Is it possible to change the palette colors?
3) Is it possible to change the canvas size?

bicilotti

Pencil tool alone is worth the download. I admire skillful scripting in AGS and this AGSketch has some nifty tools in it, which is great!
One day AGS will be more resource friendly for pixel-by-pixel operations, that day AGSketch will rock even more!

Kweepa

Quote from: cat on Sat 23/01/2010 19:19:07
1) When you use the outline fill on a non-outline pixel you have some very strange effects.
That's what <ctrl>-Z is for! Although it does sometimes have a pleasing look.

Quote
2) Is it possible to change the palette colors?
No... no... yes. It is now. I uploaded a new version. If you add a file called userPalette.bmp to the game folder it will use that as the palette. Internally the engine clamps to a 16 bit palette, so there's no point in trying to make the palette have super fine gradients. Also, if you use pure purple (255,0,255) the corresponding palette entry won't show up.
If you think it would be useful, I could add an option to load a palette on the fly, or switch between several from the game folder.

Quote
3) Is it possible to change the canvas size?
No... Did you want it to work at higher resolutions? It's already quite slow for low resolutions. I could add an option to save only the selected region.

Quote from: bicilotti on Sat 23/01/2010 20:48:31
One day AGS will be more resource friendly for pixel-by-pixel operations, that day AGSketch will rock even more!
Well, the limit is the scripting speed rather than the pixel ops, so AGS doesn't have to improve, just your processor!
Still waiting for Purity of the Surf II

tzachs

Hey Steve, I was inspired by your perspective mode, so I wrote a plugin for paint .net that does the same thing...
If you're interested, details & download from here.

Kweepa

Quote from: tzachs on Sun 24/01/2010 00:26:03that does the same thing...
Hmm, it's not quite the same thing - mine actually locks the pencil tool into drawing perspective correct lines.
Still, interesting!

New version:
* I totally misread pablo's comments earlier, and so missed his great suggestion to disable undo/redo when something is selected. Now done.
* Hitching a ride with that is a test feature - double pixel removal filter. Hover over an outline that you want the double pixels removed from and press G. (You can still draw lines with double pixels if you use a 1 pixel thick brush. Press J and then < until the box in the zoom window is 1x1.) It has problems near line overlaps and tight loops...

As usual, let me know what you think and what features you would like to see.
Steve

Still waiting for Purity of the Surf II

tzachs

Ahh, I see, off course you're right, mine are simply for reference...

ThreeOhFour

Haha rad.

I've only had a quick play with it, but awesome work!

One feature I would personally find very useful would be a colour picker hotkey that switches back to whatever mode the cursor was on after the key is released. Photoshop and GIMP both have colour picker keys that only stay for as long as they are held down (I think it is alt and ctrl, respectively) and although your hotkeys are well placed, it's great having such a quick hotkey.

All my other suggestions kinda vanished when I came back here and read the documentation in this thread, so hooray!

Also I drew you a crummy picture ;)



I await the day when the MSPaint game is replaced by the AGSKetch game - obviously the quality of entries will skyrocket :D.

cat

#16
Yeah, using predefined palettes is great, what would be even greater if I could add or change palette colors at runtime and save it to the palette for later use.

Regarding size: I was thinking of using this tool also for creating inventory items. This would be especially useful with the new palette import feature. For backgrounds this tool is lacking layers - I really need them because I tend to move and rearrange the objects and items in my rooms.

Edit: Another thing - would it be possible to use 'ctrl + n' for getting a new clean canvas (or a similar shortcut)

Scarab

I haven't been able to try this out yet, I downloaded it twice, but when I try to unzip it I get the following message:

Quote!   C:\Users\Alex\Downloads\Zip files\AGSketchAlpha.zip: The archive is either in unknown format or damaged

However I am quite excited about this tool and can't wait to give it a try.

I think a nice feature would be to add a capability to draw with rectangular pixels and perhaps a dithering effect so you can just paint on the checkerboard pattern, (with an optional secondary colour on every other pixel).

Peace
Scarab

SSH

Ah, this is what the painting part of the Walkcycle generator should have been. I really should get round to updating that properly. I see that it gets used, though.

So, when you adding onion-skinning, layers and animation, Steve? ;)
12

Wonkyth

Add customisable controls and I'll abandon GG.
I'm still very attached to GGs right-click. :P
"But with a ninja on your face, you live longer!"

SMF spam blocked by CleanTalk