Sprite Layering

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Sprite Layering
by on (#121817)
I know and understand how it works (ish), but here's my question :?: : If sprite layering is possible, how can you see your progress? I'm using YY-CHR, so could I use some special tool in there (that I'm not aware of), and see my results? What about using something like NES screen tool and try to mix them together? Or do I have to program them both in and mash them up together-via-code? I'm just curious...

Thank You Very Much.
Re: Sprite Layering
by on (#121821)
I'm not aware of any programs that let you preview layered sprites... AFAIK, you have to draw them using your favorite (unconstrained) graphics editor (Paint, Photoshop, whatever), make two copies and erase from each copy the colors that don't belong, and then you convert the result to CHR. I might be wrong though, let's see if someone can recommend any tools.

Be careful when creating layered sprites though, because the NES can only display 8 sprites in a row. If you do more than add a couple of colorful details on top of your characters, you'll end up with a flickerfest.
Re: Sprite Layering
by on (#121823)
Can't NES Screen Tool do this with its metasprite editor? Open NES Screen Tool and load your CHR file. Click the Metasprites tab. Right click to drag a tile from the tileset window to the metasprite window. From there you can move a sprite pixel by pixel by clicking it and using the arrow keys. Right clicking a sprite will allow you to drag it around. Checking Snap will lock the sprite to the grid. Clicking a sprite and clicking the up and down changes what order it's drawn in. (So you can be sure your layered sprite is on top.) NES Screen Tool also lets you edit the CHR directly.

That said, I'd still probably recommend using an unconstrained editor to do this, but NES Screen Tool will do exactly what you've asked.
Re: Sprite Layering
by on (#121827)
I use GIMP to draw a sprite with 6 colours, or whatever it is I'm trying to do, and it has a tool that lets me select all pixels of a colour, which let me easily separate the sprite into 2 layers. From there I import the two layers into whatever I am using to make sprite data for the game.
Re: Sprite Layering
by on (#121847)
rainwarrior wrote:
I use GIMP to draw a sprite with 6 colours, or whatever it is I'm trying to do, and it has a tool that lets me select all pixels of a colour, which let me easily separate the sprite into 2 layers. From there I import the two layers into whatever I am using to make sprite data for the game.


Interesting.......
Re: Sprite Layering
by on (#121848)
Kasumi wrote:
Can't NES Screen Tool do this with its metasprite editor? Open NES Screen Tool and load your CHR file. Click the Metasprites tab. Right click to drag a tile from the tileset window to the metasprite window. From there you can move a sprite pixel by pixel by clicking it and using the arrow keys. Right clicking a sprite will allow you to drag it around. Checking Snap will lock the sprite to the grid. Clicking a sprite and clicking the up and down changes what order it's drawn in. (So you can be sure your layered sprite is on top.) NES Screen Tool also lets you edit the CHR directly.

That said, I'd still probably recommend using an unconstrained editor to do this, but NES Screen Tool will do exactly what you've asked.


Wow! That sounds neat! Thanks!
Re: Sprite Layering
by on (#121849)
tokumaru wrote:
I'm not aware of any programs that let you preview layered sprites... AFAIK, you have to draw them using your favorite (unconstrained) graphics editor (Paint, Photoshop, whatever), make two copies and erase from each copy the colors that don't belong, and then you convert the result to CHR. I might be wrong though, let's see if someone can recommend any tools.

Be careful when creating layered sprites though, because the NES can only display 8 sprites in a row. If you do more than add a couple of colorful details on top of your characters, you'll end up with a flickerfest.


I thought so....
Re: Sprite Layering
by on (#121850)
rainwarrior wrote:
I use GIMP to draw a sprite with 6 colours, or whatever it is I'm trying to do, and it has a tool that lets me select all pixels of a colour, which let me easily separate the sprite into 2 layers. From there I import the two layers into whatever I am using to make sprite data for the game.


Actually, I didn't know you could use gimp to make NES sprites. I thought you could only use a CHR editor. Thanks for the info!
Re: Sprite Layering
by on (#121853)
You can design NES graphics in any general purpose graphics editor. You just have to follow the NES limitations, and convert the result into a format acceptable for the NES afterwards, with an existing or custom tool, or manually.
Re: Sprite Layering
by on (#121856)
NESmaniac wrote:
Actually, I didn't know you could use gimp to make NES sprites. I thought you could only use a CHR editor. Thanks for the info!

I find it much better to be free when designing my graphics than being restricted to limited drawing spaces and tools... IMO, graphics always end up looking very blocky when made directly in tile editors. AFAIK you can paste data from other programs into YY-CHR, so you can draw wherever you want and just paste the final work there.
Re: Sprite Layering
by on (#121858)
Shiru wrote:
You can design NES graphics in any general purpose graphics editor. You just have to follow the NES limitations, and convert the result into a format acceptable for the NES afterwards, with an existing or custom tool, or manually.


OOOOHHH!!!! I see now: So make a sprite sheet in any graphics editor (like gimp) and port it into something like YY-CHR to make it into a CHR file. Is that correct?
Re: Sprite Layering
by on (#121860)
NESmaniac wrote:
So make a sprite sheet in any graphics editor (like gimp) and port it into something like YY-CHR to make it into a CHR file. Is that correct?

Yes. My project template (described in the topic "A simple sprite demo for teaching") includes a PNG to CHR converter written in Python and includes an example of how to call this converter from a project's makefile.
Re: Sprite Layering
by on (#121864)
tepples wrote:
how to call this converter from a project's makefile.

Yes, this is even better than copying/pasting in YY-CHR, because it doesn't require any manual work every time you change the graphics.