New sprite conversion tool: Tilificator

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Post by Bregalad »

OK, so the problem was about the color map. Which I get no control on when I do "PNG export" in Tile Molester...

That's weird the current sprite sheet I have for this is 70 tiles (which I already made) but I wanted to see if this could be improved further.
Useless, lumbering half-wits don't scare us.
Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

That's weird the current sprite sheet I have for this is 70 tiles (which I already made) but I wanted to see if this could be improved further.
Ouch, that does sound like a major disappointment then...

I'd love to get access to your .chr tiles if I could, so I could see what sort of handcraft Tilificator is not able to match here. There is a third tiling method called 'FullMatch', which does not add any tiles to the tile table but instead tries to match the sprite images to an existing tile table. This should (at least in theory) produce something very similar to your manual sprite arrangement.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Post by Bregalad »

Sure, I'll send you a link to the .chr file I use in my game by PM.
Useless, lumbering half-wits don't scare us.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Post by thefox »

I tried using the DragQueen method (with color size 4) on this image:

Image

The progress bar fills up (slowly) and then it just gets stuck here:

Image
Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

Sorry for yet another silly bug... I've fixed this now on the trunk. If you're using that, do an SVN update. Otherwise, I might be able to compile a new binary tomorrow night unless it gets too late... gonna watch Iron Sky at the movies tomorrow after work. Funny how one nazi-themed scifi story can delay me in helping out with another ;)

After running about 15 minutes on my netbook, it seems to result in 36 tiles:
Image

(ShiftedRows method runs much faster, but gives 2 tiles more..)

Here are the two palette layers shown individually:
Image

Image

One thing to note though, is that the tilification will be split into a separate phase for each palette, and only the first phase will be shown in the progress bar - the other will seem to have stopped until it completes. (but this time you should not get the out-of-bounds exception that cause it to never finish). Should fix this issue in the progress box sometime soon I guess, since it can be quite confusing...
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Post by thefox »

Bananmos wrote:Otherwise, I might be able to compile a new binary tomorrow night unless it gets too late...
That would be nice, I don't have a SVN client installed here right now.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

Wow, Iron Sky is probably the best scifi movie in decades!

Here's a new win32 build produced by py2exe which fixes the bug you ran into (and a few earlier ones):

https://sourceforge.net/projects/tilifi ... p/download

I take a wild guess that you are trying to fit all the faces in a single spritepage of 256 tiles that you can switch to during the dialogues? Having a look at the image sheet of faces, it looks like it could be a tight fit... but it might be doable.

Good news is that professor Tary doesn't seem to need more than 3 colors+bg. And you could take some liberties with the guy with glasses and change the very few pink pixels he has into brown ones.

Besides that, a lot of the faces requiring more than 1 palette have just one extra color, such as the one you tried converting. In this case, rather than waste bits on an empty bitplane you could do the old trick of encoding two 1-bit tiles in a 2-bit one, and use the sprite palette to select which one to use. But of course, there's no easy way to do that automatically with Tilificator.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Bananmos wrote:Besides that, a lot of the faces requiring more than 1 palette have just one extra color, such as the one you tried converting. In this case, rather than waste bits on an empty bitplane you could do the old trick of encoding two 1-bit tiles in a 2-bit one
That or use any of various forms of RLE on the CHR data.
Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

Actually, having a closer thought about this: by using all three sprite palettes (besides the main 4-color one) as 1-color palettes selecting diplaying either the low or high bits at a specific color, you could convert lots of the tiles that happen to get tilified into a single color (+bg) so they use these single color palettes. In that case, you would probably have no difficulties fitting this into a 256 tile bank!

Requires some extra tooling though, so I guess it's only worth it if you really have trouble squeezing it in.
Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

That or use any of various forms of RLE on the CHR data.
There are indeed lots of ways this could be compressed more efficiently (the codemasters scheme Tokumaru reverse-engineered comes to mind). But I was specifically thinking about how all tiles could be fit in a single 256 tile bank here for more simple coding, and chr compression schemes won't help with that.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Post by thefox »

Bananmos wrote:Wow, Iron Sky is probably the best scifi movie in decades!
I've been meaning to see it for a while now as well...
Here's a new win32 build produced by py2exe which fixes the bug you ran into (and a few earlier ones):
Thanks!
I take a wild guess that you are trying to fit all the faces in a single spritepage of 256 tiles that you can switch to during the dialogues? Having a look at the image sheet of faces, it looks like it could be a tight fit... but it might be doable.
It's not strictly required to fit them all in 256 tiles, I can upload each face when the speaker changes. So I don't think I'm going to bother with attempting that for now.
Besides that, a lot of the faces requiring more than 1 palette have just one extra color, such as the one you tried converting. In this case, rather than waste bits on an empty bitplane you could do the old trick of encoding two 1-bit tiles in a 2-bit one, and use the sprite palette to select which one to use. But of course, there's no easy way to do that automatically with Tilificator.
Yeah that's a good idea.

--

EDIT: Found a minor bug, when the open/save file dialog is open and I switch to another window (like this browser window) and then back to Tilificator, the main window pops up on front of the file dialog. File dialog is still the one with the focus but the main window obscures it. GTK problem?
Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

It's not strictly required to fit them all in 256 tiles, I can upload each face when the speaker changes. So I don't think I'm going to bother with attempting that for now.
Well, in that case, I indeed think you would be better off just employing some compression scheme to the raw images and converting the decompressed pixels to tiles on-the-fly during decoding, rather than using Tilificator. The "hardware compression scheme" inferred by the NES's 2-bit tiles really doesn't score that high as far as compression ratio is concerned.

There's plenty of time to run a decoders like this since the original game opens up the text box so slowly by design. And since only the mouth is changing between the images, the face could be animated by just enabling/disabling a sprite or two. :)


The Codemasters codec could be a good starting point, but you'll most likely need to modify it to support more than 4 colors to make it really useful.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Post by thefox »

Bananmos wrote:Well, in that case, I indeed think you would be better off just employing some compression scheme to the raw images and converting the decompressed pixels to tiles on-the-fly during decoding, rather than using Tilificator. The "hardware compression scheme" inferred by the NES's 2-bit tiles really doesn't score that high as far as compression ratio is concerned.
Yeah possibly, I'll probably explore these options when I have a better idea of what PRG size I'm going to target. :) For now, I'm just looking for a quick way to get them to show up.

This reminds me of another thing why prematurely optimizing for size is bad especially on the NES: the PRG size is pretty much forced to be a power of two. So let's say at some point in development we make an optimization that saves us 2KB of ROM. Now if the final game still ends up being e.g. 60KB big, that optimization was for nothing. Just something to keep in mind. :)
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

thefox wrote:This reminds me of another thing why prematurely optimizing for size is bad especially on the NES: the PRG size is pretty much forced to be a power of two. So let's say at some point in development we make an optimization that saves us 2KB of ROM. Now if the final game still ends up being e.g. 60KB big, that optimization was for nothing. Just something to keep in mind. :)
Unless the game is in a multicart with something else. That's what Wisdom Tree did when its Christian hack of Menace Beach into Sunday Funday: fix up Free Fall into Fish Fall and shove it into the remaining space. And it's possibly how we got the Balloon Trip mode of Balloon Fight. If your game ends up 80 KiB, but you can squeeze clones of two other A52 games into the rest of a 128 KiB cart, that's even better.
Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Post by Bananmos »

This reminds me of another thing why prematurely optimizing for size is bad especially on the NES: the PRG size is pretty much forced to be a power of two. So let's say at some point in development we make an optimization that saves us 2KB of ROM. Now if the final game still ends up being e.g. 60KB big, that optimization was for nothing. Just something to keep in mind.
Very good point. I'd say just get it working in whatever shape is playable on the NES, then see if you have motivation left for size tweaks.

Anyways, let me know if there's bugfixes/improvements to Tilificator I can do to help your effort. I'm really excited about your porting project, so I'd love to help out a bit if I can. :)
Post Reply