It is currently Sun Oct 22, 2017 10:27 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Sat Feb 18, 2012 8:21 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7234
Location: Chexbres, VD, Switzerland
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.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 18, 2012 8:56 am 
Offline

Joined: Wed Mar 09, 2005 9:08 am
Posts: 348
Quote:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 18, 2012 11:08 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7234
Location: Chexbres, VD, Switzerland
Sure, I'll send you a link to the .chr file I use in my game by PM.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 15, 2012 4:23 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 15, 2012 4:51 pm 
Offline

Joined: Wed Mar 09, 2005 9:08 am
Posts: 348
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...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2012 9:56 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
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: kkfos.aspekt.fi


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2012 3:09 pm 
Offline

Joined: Wed Mar 09, 2005 9:08 am
Posts: 348
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/tilificator/files/releases/tilificator_v0.2C07-win32.zip/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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2012 3:15 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2012 3:28 pm 
Offline

Joined: Wed Mar 09, 2005 9:08 am
Posts: 348
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2012 3:32 pm 
Offline

Joined: Wed Mar 09, 2005 9:08 am
Posts: 348
Quote:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 16, 2012 9:36 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
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...

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

Thanks!

Quote:
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.

Quote:
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?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 17, 2012 2:05 pm 
Offline

Joined: Wed Mar 09, 2005 9:08 am
Posts: 348
Quote:
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 19, 2012 11:34 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2963
Location: Tampere, Finland
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. :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 20, 2012 5:24 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19115
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 22, 2012 4:52 am 
Offline

Joined: Wed Mar 09, 2005 9:08 am
Posts: 348
Quote:
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. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group