Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How would you store complex NES sprites, such as from the original Final Fantasy?

I know that NES had 4-color sprites (with 1 usually being transparent Edit: according to zneak, 1 color is always transparent). How then did the original Final Fantasy have so many sprites with 4 colors + transparent? (Example sprite sheet -- especially look at the large ones near the bottom.)

I understand that you can layer sprites to achieve additional colors (For example: Megaman's layering gives him 6 colors: body=3+trans, face=3+trans). It's odd that these FF ones are all exactly 4 colors + transparent. If FF used similar layering, why would they stop at 4+1 instead of taking advantage of 6+1?

Is there another method of displaying sprites that gives you an additional color?

Also interesting is the fact that the big sprites are 18x26. Sprites are 8x8 (and I think I read somewhere that they're sometimes 8x16) but both 18 and 26 are [factor of 8] + 2. Very strange.

like image 688
Dinah Avatar asked Jul 20 '10 02:07

Dinah


People also ask

How many colors can NES sprites have?

Number of Colors Per Sprite Sprites on the NES were limited to 4 colors (or 3 colors + transparency) as you can see with the sprite characters in The Legend of Zelda screenshot on the right.

How many sprites can the NES render?

The NES has a hard sprite limit of 64 hardware sprites on screen. A hardware sprite is 1 8x8 pixel sprite tile. Keep in mind I'm saying sprites, not NESmaker objects. The NES also has a hard limit of 8 hardware sprites per scanline, so 8 hardware sprites can be rendered horizontally.

Can you save on Final Fantasy NES?

Yes. When you rest at an inn, it automatically saves the game to the only save slot. You can also use tents etc on the world map, which is something I just learned today.

How do sprites work?

A sprite is a two-dimensional (2D) bitmap graphic object that can be a static image or animation that is integrated into a larger scene. Sprites are used in games to collectively create a scene. Each sprite is used to represent each object. A "Sprite Sheet" is simply a collection of still images that progress.


2 Answers

As far as I know, 1 isn't usually transparent: it always is.

As you noted, sprites are either 8x8 or 8x16 (this depends on bit 6 of the PPU control register mapped to memory address 0x2000 in the CPU's address space). Character sizes not being a multiple of 8 simply means there are wasted pixels in one or more of the constituting sprites.

For the colors, I beg to differ: the last sprite at the bottom, with the sword raised, has these 8 colors: Final Fantasy sprite 8 colors: black, brown, beige, sky blue, navy, dark turquoise, turquoise, cyan http://img844.imageshack.us/img844/2334/spritecolors.png

I believe this is more an artistic choice, because each 8x8 block is limited to 3 opaque colors; maybe it just was more consistent to use fewer colors.

like image 188
zneak Avatar answered Nov 15 '22 11:11

zneak


I found the answer. I finally broke down and downloaded the ROM and extracted the bitmaps with NAPIT. (btw: staring at extracted ROM bitmaps is really bloody hard on your eyes!)

I matched a few bitmaps and end-results here.

Each character has a color that is mostly relegated to top part of the sprite so I chased that idea a while. It turns out that's a red herring. Comparing the in-game sprites vs. the color masks, you can see that black and transparent use the same color mask. Therefore, IF a black outline is shown, then it must be on a separate layer. However, despite the black outlines on the sprite-sheet, I can't find any real examples of black outlines in the game.

Here's a video on YouTube with lots of good examples. When you are on the blue background screen (@ 0:27), the outlines and the black mage's face are the blue of the background (ie: there is no black outline, it's transparent). In combat, the background is black. @ 1:46 a spell is cast that makes the background flash grey. All black areas, including outlines and black eyes, flash grey. Other spells are also cast around this part of the video with different colors of flashes. The results are the same.

The real answer is that the black outlines on the sprite sheet don't seem to exist in the game. Whoever made the sprite sheet took the screenshots with a black background and scrubbed the background away.

like image 32
Dinah Avatar answered Nov 15 '22 11:11

Dinah