←  Programs

ComputerCraft | Programmable Computers for Minecraft

»

[1.4.5] NPaintPro

nitrogenfingers's Photo nitrogenfingers 14 Oct 2012

With the public beta of 1.4.5, I'm looking at making some Atari 2600 style games- to do that I needed a sprite painting tool. A bit of rapid prototyping and some totally unguided brainstorming eventually lead to the bug-riddled, feature-bloated amalgamation that is:

NPaintPro

Posted Image

Get it here: http://pastebin.com/pzWSRqNF

Get 3DPrint here: http://pastebin.com/tzw1Sw78

Features
- 16 colour pictures with a range of painting tools
- Mouse support- draw on a blank, scrollable canvas that resizes itself to fit almost any screen or monitor
- Custom interface- use keyboard shortcuts for speed, or drop-down menus for convenience
- Custom display modes- draw on a blank canvas or grid paper, with alpha channel support
- Create moving pictures in animation mode, with frame manipulation tools and playback options
- Selection tools to cut/copy/paste parts of your image from the clipboard
- Comprehensive (if ugly) help screens with lists of keyboard shortcuts
- Text edit mode- add characters and paint them. Add flair to your text files, annotations to your diagrams or features to your sprites
- 3D printing with the companion program for use with wireless mining turtles
- The packaged GameUtils API allows fuss-free conversion of your assets into full-fledged game entities

Planned features:
- Ditching file extensions
- Bug Fixing

How to use:
npaintpro [-a, -t] filename

Standard paint files have the extension .nfp, animation files .nfa, and text files .nft. NPaintPro supports the standard hex colour encoding used by the pre-installed "Paint" along with other paint programs currently on the forums (Paint 2.0, I believe CCPaint1.1 and possibly others), providing they have the ".nfp" file extension. There are plans to remove this necessity very soon, but it's likely the .nfa extension will remain. Note that .nft encodes entirely differently and does NOT have any compatability with existing picture formats. It is however compatible with any text document you feel like painting.

-a for animation support and converting .nfp files (i.e. renaming them). At present there is no animation support for other programs- if you have an animation format you want widely supported let myself or Cruor know and they will be included in a file converter.

-t is for text support. There is no way to convert nfp or nfa files to nft at present, and nft files do not support animation either (either of these things may change in the future). If you have a text format you want supported, let myself or Cruor know so they may be included in a file converter.

3D printing has recently been added! Fire up a turtle with the 3D print program, load it up with items and you can create prints of your paint files.
The GameUtils API has been developed for turning your NPaintPro pictures and animations into game assets! Download the API from here: http://www.computerc...with-npaintpro/

Want to use it in your own creations?
A lot of people have asked for permission to use NPaintPro in their operating systems, servers and on other projects, to the point where clarification on the policy of usage has become necessary. I provide permission for everyone to use and modify NPaintPro to suit your purposes, given the following conditions:
- The comment near the top declaring the original name of the program and the author is left near the top of the code, though I'm happy for it to be appended (My Awesome Movie Player, based on NPaintPro by NitrogenFingers for example)

Also, I'd really appreciate you send a link to any videos or posts made in the programs section so I can check out what you've come up with in NPaintPro. I would consider it a great favour if you were to post it as a comment on this thread, so all the awesome things this program has done can be collated. But that's a courtesy, not a condition.

Questions/Comments? Post here! All feedback, from glowing with praise to outright hate is welcome!
Quote

Cruor's Photo Cruor 14 Oct 2012

Nice work nitrogen!
Quote

Klausar's Photo Klausar 14 Oct 2012

How do I set a background? You are talking to fast in the video :)/>
Quote

nitrogenfingers's Photo nitrogenfingers 14 Oct 2012

You can press "H" for help in the app (although admittedly the help is pretty worthless)- select a colour and press Q or W to change the alpha channel to the colour on your the left or right of your pallette respectively
Quote

Klausar's Photo Klausar 14 Oct 2012

Figured it out, thank you. Also I drew McPixel, I have bad paint skills though :)/>
Spoiler
Quote

Sammich Lord's Photo Sammich Lord 14 Oct 2012

Just wait till somebody makes a whole studio to make games!(Also my 100th post!)
Quote

brett122798's Photo brett122798 14 Oct 2012

Pretty awesome, I like the save file format too.
Quote

nitrogenfingers's Photo nitrogenfingers 16 Oct 2012

Posted a fairly large update to this (PhD study be damned!)- the application has support for a selectable rectangle tool, cut/copy/paste operations with that rectangle, an exhaustive help sheet with lists of keyboard short-cuts and explanations for all pertinent functions, new painting tools and more! Just when NPaintPro couldn't be any more feature-bloated I've found a way to force a few more down, and it is now approaching a tool that can reasonably used to make VG sprites and animations.

Having said that I've yet to do any thorough testing and it's likely there are bugs, especially in the animation editor so be sure to save all progress carefully. If you find a bug that impedes your work (or you want me to fix) let me know and I'll do what I can.

Enjoy!
Quote

CastleMan2000's Photo CastleMan2000 16 Oct 2012

Woah, how do colors? (Translation: Wow, how did you make the colors? Does CC have color support now?)
Quote

Lyqyd's Photo Lyqyd 16 Oct 2012

Check out the 1.45 beta in that shiny newly-public section of the forums called Beta Testing or similar. New update includes colored text/backgrounds and mouse events on certain computers.
Quote

CastleMan2000's Photo CastleMan2000 16 Oct 2012

Awesome. I will check it out. Thanks.
Quote

Exerro's Photo Exerro 17 Oct 2012

Well this kinda made sketch-it useless...great work btw, its a really fun program
Quote

BigSHinyToys's Photo BigSHinyToys 17 Oct 2012

Is anyone else having trouble with the link ?
Quote

faubiguy's Photo faubiguy 18 Oct 2012

View PostBigSHinyToys, on 17 October 2012 - 04:46 PM, said:

Is anyone else having trouble with the link ?

Yeah, the download doesn't seem to be working.
Quote

nitrogenfingers's Photo nitrogenfingers 18 Oct 2012

Sorry for any issues with the media fire link, I've had persistent problems with them, so I've included a pastebin link instead. It's in the description, or you can get it here: http://pastebin.com/Y77q7RnS
With the code as... "visible" as it is in pastebin please bear in mind this is very much a WIP and will be cleaned up with a later release.
Quote

BigSHinyToys's Photo BigSHinyToys 19 Oct 2012

1000 lines exactly was that by accident or on purpose lolXD

This is a very cool program combined with a public picture draw /image manipulation api this has some huge potential. Great work NF +1
Quote

nitrogenfingers's Photo nitrogenfingers 19 Oct 2012

Another big-ish update, this one brings the code up to PR4 of the beta to reflect updates in mouse support, fixes to the move tool, record tool and select tool, added the flood tool and done some general code neatening to get it legible. Updated code available from the description, or you can get it here: http://pastebin.com/ph1R7bnF, or here: http://www.mediafire...iz6ks6zc8aadec3

Barring any changes in the images API this program is probably pretty near finished. I've not had any problems with it recently but please report bugs in usage, I'll be sure to fix them. Any other suggestions for tools or features are more than welcome as well, I feel a bit sad with it being finished as I want to keep working on it.

Because it's now a rather large program and more than a little confusing I'll be making a tutorial on it's use, and how that applies to game development soon (after the release of the latest version of CC). Hope someone finds it useful!
Quote

BigSHinyToys's Photo BigSHinyToys 19 Oct 2012

making the save / exit menu operable with the mouse might be cool example.

NOT a full program just a demo
Spoiler
clicking the top bar of the menu then clicking another location will move the menu to that location on the screen. options are selectable but don't do anything.
Quote

nitrogenfingers's Photo nitrogenfingers 19 Oct 2012

That's something I actually did want to work on! Instead of having 2 dozen shortcuts for every tool, clicking on the footer should bring up a menu, where options can be selected from a tree menu- including saving and loading!

I'll get on that ASAP! Thanks BigSHinyToys!
Quote

nitrogenfingers's Photo nitrogenfingers 19 Oct 2012

Drop-down menus have been added to NPaintPro:
Posted Image

There's probably mode bug-testing to do but it's getting very close to finished now
Quote