Tons of 16x16 tiles at Nethack Wikispace!

Chris H.'s Ultima / ACS-style game development system!

Moderators: Ice Cream Jonsey, joltcountry

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Tons of 16x16 tiles at Nethack Wikispace!

Post by Garth's Equipment Shop »

I've been checking out other games that use similar resources to ACK. Nethack can use ASCII, 16x16 or 32x32 tiles. I found a Nethack wiki repository of 16x16 tiles I thought the ACK community might find useful.

http://nethack.wikia.com/wiki/List_of_v ... Hack_tiles

Take a look at the menu to the left of that page. The dropdown menu under 16x16 Tiles has a bunch of links to all the other categories or lists of Tiles available there in addition to the ones on that page! Thats a lot of tiles!

Edit/Correction: My mistake, that page I linked you to is actually the complete list of all the tiles in the most up to date pack of 16squared scale. Hmm, are 16x16 and 16squared the same thing? Not sure about that - it just kind of popped out just then, lol. The menu on the left I referred to does include a few extra tiles such as the pack of dragons which are all identical except for their color.
Last edited by Garth's Equipment Shop on Fri Dec 19, 2008 12:10 pm, edited 1 time in total.
Which of you is interested in my fine wares?

Chris H
Posts: 272
Joined: Sun Dec 02, 2007 4:07 pm
Location: California, USA

Post by Chris H »

Wow -- great find! What an incredibly different style -- the shadows are a great touch. I'd love to see something put together with that... and I think the universal grayish background could be an interesting change from the typical black.

(It's funny how the graphics in ACK are a throwback to the early Ultimas, which themselves were a workaround for the graphical quirks of the Apple II. Sort of reminds me of the joke about train track widths and Roman chariots.)

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Just too bad they aren't altogether in one big bitmap though huh? Hmm. I think I could whip up something for that prob. But I'll just have to see if my idea works first and then if it does I'll share it with y'all. ;)
Which of you is interested in my fine wares?

Chris H
Posts: 272
Joined: Sun Dec 02, 2007 4:07 pm
Location: California, USA

Post by Chris H »

So is there any existing utility that can take a bunch of 16x16 PNG files and merge them together in one large image? Or even in one page, from which you could take screenshots? (From there it should be trivial to paste sections of that into 320x200 BMP files)

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Well there is a way to automate the process in Photoshop CS2 using actions scripting and hotkeys. The difficult part is recording the necessary actions, then editing out the unnecessary stuff that always gets thrown in there, and then tweaking the script so that it is portable and can be run on anyone's computer if they have PS-CS2 installed. Of course this solution won't help those who dont have Photoshop CS2 but if I can get this to work right I will more than happy to take requests.

Edit: Got a better idea now. I just remembered once experimenting with a nifty little program called image magic a while back. It is a powerful commandline image editing and composing suite. I used it to to do some batch processing on a couple gigs of sprites I needed to edit for use in RMXP. It just occurred to me that it has just the right tools we need to merge a bunch of tiles into a single bitmap! I'll get to work on it right away and when I figure out the proper set of commands to do it I'll pass it along to the community.

2nd Edit: Ok, I was right about Image Majick having the right stuff. The command were interested in here is "montage."

http://www.imagemagick.org/script/montage.php
Which of you is interested in my fine wares?

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Ok Chris and all you ACK designers out there. I've whipped up a little treat for y'all! And just in time for Christmas! ;)

First you'll need to dl ImageMagick if you haven't already. Heres the link to the official dl page with all the different distros for various OS's.

http://www.imagemagick.org/script/binary-releases.php

If you want it portable like for usb drive or stick you can dl the static version. I dl'd the Win32 dynamic binary which installs itself into the registry.

I dl'd both the 8bit and 16bit versions just in case but ended up using the 16bit first in case that was needed just to read 16bit files before converting them to 8bit. I never installed 8bit since the 16bit version worked just fine. I'm guessing 8bit is for if you have a really old system.

Anyway, go ahead and install the distro of your choice. Dynamic is best as that way you can be sure that IM's commands will work from any directory on your comp. Static is supposed to too though by setting an environment variable in addition to adding itself to the path.

The batch file I made is designed to run from any directory that contains the tiles you wish to merge and convert into one 320x200 BMP. Preferably 16x16 tiles so they dont get resized which would result in unpredictable quality - and yes if they are not 16x16 they will be automatically resized but the original png files will not be changed at all.

The output files are saved to a new directory created by the batch file. Also, if you wanted to merge a bunch of files of some other format all you need to do is edit the batch file and replace '../*.png' with '../*.gif' or '../*.bmp' '../*.ppm' or whatever format. ImageMagic can read a bewildering number of formats including uncommon or older ones. If you wanted you could edit the batch file to process a comination of formats. If you need help with how to do that just ask.

Here is the batch file...

md montages
cd montages
montage ../*.png -geometry 16x16+2+2 -tile 16x9 -format bmp -depth 8 -size 320x200 tileset.bmp

No matter where you install ImageMagic - the default directory or one of your choosing it will be functional from any drive or directory from the command prompt. You can just copy the above batch file text to a new text file in notepad and save it as whatever name you want except "montage" or "convert" which are ImageMagic commands and make sure you choose SaveAs and add the .bat extension to the name you choose and enclose the whole name+ext in quotes so it doesnt save as a text file. And save it to the directory where the files to merge are located.

Once saved you can copy the file to other directories if you have other collections you wish to merge or you can just save it to the ImageMagic directory or Windows/system directory so that it can be invoked from anywhere at the command prompt. If you save it to the directory where your files are you can just click on it in Windows without going to command prompt. If you run from command prompt, and didn't put a copy in c:\windows\system or the ImageMagic root directory, you'll need to navigate to the directory the files are in for it to work unless you have command prompt here in the Windows Explorer's right click context menu.

I have it so that if you have more tiles than will fit into one 320x200 8bit BMP it will automatically create multiple 320x200 8bit BMPs until it runs out of tiles. Any other types of files in the directory will be ignored and your 320x200 BMPs will be saved to a new directory called "montages". If there are more than one resulting 320x200 BMP they will be named tileset1.bmp, tileset2.bmp, etc.

ENJOY!


EDIT: PLEASE READ THE REST OF THIS THREAD BEFORE YOU DO ANYTHING AS THERE HAVE BEEN A COUPLE IMPORTANT IMPROVEMENTS SINCE THE TIME OF THIS WRITING!
Last edited by Garth's Equipment Shop on Fri Dec 19, 2008 10:00 pm, edited 2 times in total.

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Image

Image

Image

Image

Image

Image
Last edited by Garth's Equipment Shop on Fri Dec 19, 2008 9:14 pm, edited 1 time in total.
Which of you is interested in my fine wares?

Chris H
Posts: 272
Joined: Sun Dec 02, 2007 4:07 pm
Location: California, USA

Post by Chris H »

Now that is awesome right there. :) I'll have to throw together a quick adventure to see how they look.

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

OOPS! Sorry about the size prob. I thought it would stick to the size I specified but it automatically cropped the final images when the tiles didn't fill the whole 320x200 canvas. Here is the line you need to add to that batch file to fix this. This line looks strange I know but trust me it works - the end result is a perfectly resized canvas.

convert tileset-?.bmp -bordercolor white -border 160x100 -gravity center -crop 320x200+0+0 tileset-?.bmp

I'll replace those files I uploaded with the fixed versions in just a few minutes.

EDIT: Ok, I ran that command on all of them and uploaded them again. Same links new files.

Are BBcodes turned off? I'm not seeing the images in that post. Is anyone else?
Which of you is interested in my fine wares?

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Damn, I just tried importing them and something is not right. Nothing but a black window opens when I try Alt-B and choose A for the first tileset. I'm thinking its the 8-bit thing. Even though I specified 8-bit. Or maybe I also need to specify 256 colors. I'll try adding a line for 256 colors first and see if that fixes it.
Which of you is interested in my fine wares?

Chris H
Posts: 272
Joined: Sun Dec 02, 2007 4:07 pm
Location: California, USA

Post by Chris H »

It might be easiest to just export them in full color, then use Photoshop so you can manually set the palette to the ACK palette. Otherwise you may end up with 256 of the wrong colors. :)

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Ok, it must be the palette. I checked in Paintshop and the tilesets all have exactly the right dimensions, they're all 8 bit and they're all 256. I'll look into how to get the ACK palette and have it so the batch file incorporates that into it's conversion. I really want this to be a total one step conversion so we don't have to do anything else to it except load it up in ACK and start pilfering tiles.

On another note though I noticed something odd in the editor or maybe it was the launcher. I get a little confused where one ends and the other begins. Anyway, I noticed that the import tile list will not list tileset-0.bmp as it is but renames it to tileset-1 and then renames all the others one higher to compensate and so you end up with a tileset-6 in the list even though you only had 0-5 when you started. Thats kind of strange, why would it do that?

Also, after I ran ImageMagic's convert on a test tileset with the command to set it's palette to 256 colors when I tried to import it in ACK it flashed it on the screen for a splitsecond [yes I actually saw color tiles] and then crashed ACK though the launcher stayed open.
Which of you is interested in my fine wares?

Chris H
Posts: 272
Joined: Sun Dec 02, 2007 4:07 pm
Location: California, USA

Post by Chris H »

It may be that it's trying to make a compressed BMP or something (Photoshop has those options, but they default to Off) ACK is pretty fussy about the BMP file being structured in the "old school" format.

As for the naming -- ACK is a dos program, so filenames longer than 8 characters (like something.bmp) will get shortened (in that case into someth~1.bmp)

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Ok I went to the full ACK palette view where it shows you all 256 colors and hit ctrl-F5 to get a screen cap of it then loaded that up in PS and went to color table and saved that as a PS ACT file. Then loaded each of the tilesets and went to their color tables and loaded the ACK.ACT color table I made. Then I went back into ACK and was able to import from them. If anyone tries this at home be sure you choose NONE for the option to use any type of dithering when applying the custom colortable. Otherwise the icons come out fuzzy or with stray pixels in random places.

I updated the post above to correct the links with the new DOS friendly file names and uploaded the corrected images to the server after deleting the old ones. So all should be 100% functional and ready to dl now. Since the img bbcode isnt working here they are again as HTML links instead of embedded images. Hopefully the url bbcode for links is working.


The six tilesets that were listed here are now featured on the nethack resource page of the ACK Quick Reference Site.

All of these were tested in ACK and are ready to be imported!

Credits: NetHack's DevTeam for putting this tileset together. Next up will be Adam Bolt's 16x16 Angband Nethack tileset. See it as it appears in Nethack here:
Last edited by Garth's Equipment Shop on Fri Aug 10, 2012 11:14 am, edited 1 time in total.

bruce
Posts: 2544
Joined: Tue Jun 04, 2002 10:43 pm

Post by bruce »

There are lots of Nethack tilesets of widely varying spiffiness.

Most of the spiffier ones are larger than 16x16, but if you're running it through Imagemagick anyway then downconverting the size should be easy....although they might look awful at smaller sizes. "Absurd" looks really good at 64x64 anyway.

Bruce

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

Yep, still experimenting with it to get just the right magic formula for this. I can do a little bit of decision making in the code to get it to treat different sizes and formats with different parameters but I may just settle on a menu driven DOS batch prog that will run many separate IM routines depending on what the user wants to do. Unfortunately I've found that you can only get so far with IM never all the way. The problem is that IM doesn't really support fixed indexed color palettes. So in the end you still have to use something else to do the final palette replacement or conversion.

I've been looking at other command line utils for something that is more indexed-color-palette friendly. What I'm hoping for is something that can support indexed color palettes to the degree that say Deluxe Paint Enhanced II or III did. I have DPEII but its major drawback is its lack of support for many of the formats we now use most often. BTW: It runs just fine in XP without DOSBOX! Drawback: fullscreen only - no running it in a window if not using DOSbox.

DPEII is best for PCX and LBM, it also does color cycling which is a real cool feature you don't see anymore. No indexed color palettes means no color cycling. I'll keep combing the web for a portable solution. It probably won't end up being cross-platform [but it might who knows?] I'd settle for just something portable and freely distributable for all to use.
Which of you is interested in my fine wares?

Post Reply