Map an image against an existing tileset?

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

Moderator: Moderators

Post Reply
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Map an image against an existing tileset?

Post by Banshaku »

I think it's a very specific need but I will ask anyway.

Let say that I have a chr already. I want to extract the name table from an image against that chr. This means the tool look at the chr, try to find tiles in the picture and make the nametable data for that screen. Usually it's the opposite you want to do, automatically extract the tiles from an existing image and the nametable, I just want to create the nametable data only.

Does such tool exist? I do not remember seeing any or my memory is failing me.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: Map an image against an existing tileset?

Post by calima »

Yes, "tilecoords" from my tools at github.com/clbr/nes.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Map an image against an existing tileset?

Post by tepples »

Banshaku wrote:Let say that I have a chr already. I want to extract the name table from an image against that chr. This means the tool look at the chr, try to find tiles in the picture and make the nametable data for that screen. Usually it's the opposite you want to do, automatically extract the tiles from an existing image and the nametable, I just want to create the nametable data only.
I seem to remember that savtool.py from my NES background editor can do this as well. Try this:

Code: Select all

savtool.py an_image.png --chr already.chr --palette 0F0010300F0616260F1A2A3A0F021222 -o an_image.sav
savtool.py an_image.sav an_image.nam
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: Map an image against an existing tileset?

Post by Banshaku »

@calima, @tepples

So those tools does exist, even two of them :) That will be quite useful for some testing I have to do against an exist chr. Thanks!
na_th_an
Posts: 558
Joined: Mon May 27, 2013 9:40 am

Re: Map an image against an existing tileset?

Post by na_th_an »

I have something too. It reads a palette file, an existing tileset and a png with the image and creates a .NAM, optionally a rle'd image using the Nesst format

https://github.com/mojontwins/MK1_NES/b ... namgen.bas
https://github.com/mojontwins/MK1_NES/b ... namgen.exe

(It's on the 2.0 branch of AGNES, not released yet)
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: Map an image against an existing tileset?

Post by Banshaku »

@na_th_an

Another one, thanks! You should announce your latest game here ;)

So it seems that it was more common than I expected. I had the impression that is was something less common and people were doing the opposite like taking a PNG, extract the chr+nam instead. I was wrong.
na_th_an
Posts: 558
Joined: Mon May 27, 2013 9:40 am

Re: Map an image against an existing tileset?

Post by na_th_an »

Many times I find easier building my title or cutscene screens in Aseprite or Photoshop. Also, this integrates in my toolchain, so I can use the same png to first extract pattern data and build a chr and then use namgen the chr to get a nam out of the png.
Post Reply