Nintendo Entertainment System


Graphical Summary


Standard game resolution: 256x240 (typically on a TV only 224 pixels of screen height would show.)
Color range: there is a specific palette of 54 colors. When you choose the NES/Famicom project preset those 54 colors will be at the bottom of the color palette for you to easily copy colors from there to the first 32 indexes of the palette. You should only use the colors you copy from the bottom 54 colors into the top 32 color indexes, and be sure to follow the graphical limitations mentioned below.

Number of color indexes available:
Typically 32 indexes used, but many are used for transparent so can't be used as a display color. Explained in greater detail below.

Background graphics color limitations:
Background graphics are always made from 8x8 pixel tiles. The 16 color indexes reserved for the background must be broken into 4 palettes of 4 colors each, HOWEVER, the first color of each 4 color palette MUST be the same color. This is the ?Background color?. This leaves 13 distinct colors total that can be used in your background graphics. Each tile MUST use colors from only one of these 4 color palettes AND although the tiles are 8x8 pixels, each block of 16x16 tiles MUST use the same 4 color palette! To recap, tiles are 8x8 BUT all tiles within a 16x16 grid MUST all share the same 4 color palette.

All background tiles for any given level must fit into a single 128x128 pixel image containing 256 total 8x8 tiles.

Background tiles can NOT be flipped or rotated.

http://www.dustmop.io/blog/2015/04/28/nes-graphics-part-1/

NOTE: The NES did not have any direct support for ?dual playfield? layered scrolling, but there are two methods which some games put to excellent use in order to create some fantastic parallax scrolling in their games.

The first method is to actually use animated tiles which change their appearance to look as though they are scrolling independently and at a different speed from the rest of the background. This is great when the background can be a small repeating pattern such as a brick wall etc. Be careful though. As this eats up your already limited number of available tile images quickly. For example: to allow a single 8x8 tile to look like a wall pattern which can scroll independently of the Background, you need a total of 8 entire tile images. One image for each 1 pixel offset making the tile loop (scroll) horizontally. If you wanted your single 8x8 pixel tile to be able to scroll independently in both directions, you'd need all 8 vertical offset images for every horizontal offset! This would require a whopping 64 tiles! That's ¼ of your entire tile image space! For this reason, most games which use this method limit the parallax effect to either horizontally or vertically.

The second method doesn't use up any additional tile image space because it uses a trick to slice your background screen into horizontal segments, where each segment can be scrolled at a different speed! The slicing of the background screen has no effect on sprites, so don't worry, the player character won't be sliced in half, with their legs scrolling at a different speed than their upper body. This method can only slice the screen into horizontal strips, not vertically.

Here is some more detailed information about this method:
http://www.dustmop.io/blog/2015/12/18/nes-graphics-part-3/

Sprites

The NES can display eight 8x8 pixel, 3 color (plus a ?clear? index for transparent pixels) sprites per scan line (row of pixels on screen). You can have 64 sprites on screen in total, but any more than 8 per scan line will result in sprites flickering (becoming invisible). Similarly to background graphics, the second set of 16 color indexes is used for the sprites and must be divided into 4 four color palettes BUT the first color in each palette will be used for transparent. This means the total colors available for sprites is 12, with any one sprite using 3 colors from one of the 4 color sprite palettes.

You can choose a second sprite mode which switches all sprites to 8x16 pixels instead of 8x8 pixels (yes, you can still display 64 of these on screen even though they are twice as tall) BUT all sprites must be in the mode you choose (8x8 or 8x16).

Similarly to the background graphics, all sprite graphics must be taken from a single 128x128 pixel images containing 256 8x8 pixel sprite ?tiles?, or 128 8x16 pixel sprite ?tiles? if you are using the second sprite mode for your sprites.

Sprite ?tile? images CAN be horizontally or vertically flipped! (but not rotated)

IMPORTANT: You can actually use background tiles to represent objects in the game that can be interacted with! The best example is the many on-screen coins in Super Mario 3. The NES would have absolutely no chance of putting that many sprites on screen, but luckily they didn't have to. They just used background tiles for the coins, and when Mario overlapped that screen location, the game would add a coin to Mario's coin count and replace the coin tile with a background graphic tile! The perfect crime! Clever game designers can use animated background tiles to create large enemies for the player to fight against with no sprite-flicker concerns.

More information about NES Sprites here: http://wiki.nesdev.com/w/index.php/Sprite_size

For more detailed technical references:
https://en.wikipedia.org/wiki/Nintendo_Entertainment_System
https://forums.nesdev.com/viewforum.php?f=2

sample projects


Last modified: 29 January 2023