Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 6

Author Topic: DFPaint: A cross-platform 'screenbuilder' utility in Java (Source released)  (Read 25542 times)

korora

  • Bay Watcher
    • View Profile

Go here for the source code.

Latest changes:
-Made palette resizable to avoid tiles getting cut off
-made paint window larger and scrollable
-optimized initialization

Someone in Suggestions requested a utility for putting together custom interfaces/screenshots.  I put something together quickly in my spare time this weekend; it's not polished at all but the functionality is there.  You can find it in the DF File Depot under Utilities, or through this link: http://dffd.wimbli.com/file.php?id=376 .

To install DFPaint, unzip it and drop DFPaint.jar into your DF folder so it can find the curses_640x300 tileset. 

To use DFPaint, use the two sliders (foreground and background color) and the unlabeled checkbox (foreground brightness) to select a color.  Click on one of the tiles below to select it.  If you want your ground tiles to be random, check the "Vary" box. Shift-clicking an already painted tile will select it in the palette.

To do:
-Change 'brush' size
-Use custom tileset and color information in init.txt
-Allow tileset selection
-Import maps exported from DF
-Make the panel resizable
-Save/Load
-Templates
-Z-level support




I've only tested this briefly and only on a mac, so let me know if you have any issues.
« Last Edit: October 20, 2008, 09:04:23 pm by korora »
Logged
DFPaint, a cross-platform 'screenbuilder' utility

Davion

  • Bay Watcher
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #1 on: August 03, 2008, 05:13:37 pm »

Works good for me, pretty cool.
Logged

Dogman

  • Bay Watcher
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #2 on: August 03, 2008, 05:47:22 pm »

You can find it in the DF File Depot under Utilities.


Why not just link it here and save everyone the hassle of digging for it ???
Logged

gamerman

  • Bay Watcher
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #3 on: August 03, 2008, 07:09:09 pm »

It looks interesting, I'll mess around with it a bit.

http://dffd.wimbli.com/file.php?id=376 for the people who are too lazy to go find it.  :P
Logged

sinoth

  • Bay Watcher
    • View Profile
    • http://sinoth.net
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #4 on: August 03, 2008, 07:58:51 pm »

Neat idea, but the sliders are too cumbersome to use.  You might take a look at this for another good ASCII drawer :
http://www.tailpig.com/AsciiDraw/
Logged
[i do not regret]

Tahin

  • Bay Watcher
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #5 on: August 03, 2008, 10:23:16 pm »

I got this:
Code: [Select]
Exception in thread "main" java.lang.NoClassDefFoundError: DFPaint/jar
Caused by: java.lang.ClassNotFoundException: DFPaint.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Help? I'm running Ubuntu Linux 8.04.
Logged

korora

  • Bay Watcher
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #6 on: August 04, 2008, 08:34:03 am »

I got this:
Code: [Select]
Exception in thread "main" java.lang.NoClassDefFoundError: DFPaint/jar
Caused by: java.lang.ClassNotFoundException: DFPaint.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Help? I'm running Ubuntu Linux 8.04.

Are you running it from the command line? If so, can you copy/paste the command you use to run it?
Logged
DFPaint, a cross-platform 'screenbuilder' utility

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #7 on: August 04, 2008, 11:06:46 am »

Clever! I like it. A few hopefully helpful suggestions: Have a menu for color and tile selection, and a way to select custom tilesets.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

korora

  • Bay Watcher
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #8 on: August 04, 2008, 01:15:37 pm »

Clever! I like it. A few hopefully helpful suggestions: Have a menu for color and tile selection, and a way to select custom tilesets.

Thanks! In the future I'd like to have buttons for color and tile selection, in more of a 'palette' system, but I wanted to push something out over the weekend.  Tileset selection is also on my list (it should handle them just fine as-is, but the file name is hardcoded), along with having it read init.txt and automatically start with the tileset selected there.  I'll probably work on it more this coming weekend, if not sooner, and get some much-needed interface improvements done.

Actually, now that I think of it, if you really want to use a custom tileset you could rename your tileset to curses_640x300.bmp and replace the actual curses file with it.  It's a bit hackish, but should work.  And again, in the future you won't need to do this.
Logged
DFPaint, a cross-platform 'screenbuilder' utility

penguinofhonor

  • Bay Watcher
  • Minister of Love
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #9 on: August 04, 2008, 01:19:29 pm »

I would like the ability to right click on a tile and copy that tile into the painter thing.

Also, the sliders work fine for the colors, but not for the tiles.
Logged

korora

  • Bay Watcher
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #10 on: August 04, 2008, 01:23:54 pm »

I would like the ability to right click on a tile and copy that tile into the painter thing.

Should be easy enough to do.

The other thing I need to do, since Toady has expanded the viewport, is allow you to set the size of the painting window instead of making it always 80x25.
Logged
DFPaint, a cross-platform 'screenbuilder' utility

Tamren

  • Bay Watcher
  • Two dreams away
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #11 on: August 04, 2008, 02:34:42 pm »

The holy grail in that regard would be to store a full map screenshot such as you would find in the DFMA and allow you to scroll around in it using the map editor.

The screen size of the editor could then be whatever you wanted.
Logged
Fear not the insane man. For who are you to say he does not percieve the true reality?

penguinofhonor

  • Bay Watcher
  • Minister of Love
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #12 on: August 04, 2008, 03:50:29 pm »

Another cool thing would be the ability to paint "ground". This would simply randomly paint one of the ground tiles (',.`) in whatever color you have selected.
Logged

korora

  • Bay Watcher
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #13 on: August 04, 2008, 04:08:59 pm »

Another cool thing would be the ability to paint "ground". This would simply randomly paint one of the ground tiles (',.`) in whatever color you have selected.

Yeah, I thought of that when I saw your painstakingly ground-painted pictures elsewhere.  Shouldn't be too hard, either, but won't make sense UI-wise until I've made tile selection more friendly.

The holy grail in that regard would be to store a full map screenshot such as you would find in the DFMA and allow you to scroll around in it using the map editor.

The screen size of the editor could then be whatever you wanted.

I haven't used the map export option or DFMA, but I'll look into it when I get a chance.
Logged
DFPaint, a cross-platform 'screenbuilder' utility

Tahin

  • Bay Watcher
    • View Profile
Re: DFPaint: A cross-platform 'screenbuilder' utility in Java
« Reply #14 on: August 04, 2008, 04:12:23 pm »

I got this:
Code: [Select]
Exception in thread "main" java.lang.NoClassDefFoundError: DFPaint/jar
Caused by: java.lang.ClassNotFoundException: DFPaint.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Help? I'm running Ubuntu Linux 8.04.

Are you running it from the command line? If so, can you copy/paste the command you use to run it?

I believe I just used "java whatever-the-filename-is." I'm probably doing something wrong, but it wouldn't work when I used the GUI, either.
Logged
Pages: [1] 2 3 ... 6