On the Tiles
When designing art for the Sega Megadrive, it's important to understand how the console handles graphics. The Megadrive uses a custom graphics chip called the Visual Display Processor or VDP. The VDP is tile-based - graphics are stored in tiles that are 8x8 pixels big. Sprites are split into tiles which are then read in sequence to display them. Each of the tiles references one of the 4 colour palettes available. The above image shows how the VDP has stored the graphics from the main window and the 4 colour palettes being used. (The 5th line of colours is not in the data, but used by the Gens emulator for testing).
8x8 tiles are the basis for all the graphics. So all sprites and game tiles have to conform or fit into multiples of 8, e.g.: 16x16, 32x32, 16x48, 8x24, etc.
The VDP stores all this information in it's VRAM, which is limited to 64K. One of the tricks the Megadrive can use is to use DMA (Direct Memory Access) to copy data from the game ROM to the VDP. This takes some processing time, but used wisely it can allow graphics to be animated using data stored in ROM rather than it all being stored in VRAM. The sprite tiles are placed in a VDP location, but the actual data is copied across from ROM into that space every frame (or every few frames depending on the frame rate you want the animation to play at). This saves space in the VRAM and allows more frames of animation.
Large sprites can be animated by changing just a few of their tiles. This means that you need to be careful of how the animated sections fit into their 8x8 boundaries. Another advantage of this is that sprites can be compressed more easily if more less tiles are animated. For example this toast only animates the center tiles where the face is.
Comments
Post a Comment