I've recently been having a nostalgia run with very old video games such as Battletoads. There is one thing that these very old games seem to have in common: sprite flickering. What i mean by that is that sometimes sprites (or part of sprites) will randomly disappear and re-appear again. Why does this happen?

Here's three images showcasing what I'm talking about:

stage 1 stage 2 stage 3


I managed to patch together an answer for the Nintendo Entertainment System (NES) based on some Wikipedia articles and some discussion with a professor of mine.

Before I begin it's important to note that sprite in the context of NES means moveable textures. This does not apply for static textures (called "background") as far as I can tell.

On the NES this happens because the Picture Processing Unit (PPU) in the NES only supports a certain number of sprites. For the PPU this limit is eight per scanline and a maximum of 64 sprites in total. Because of this whenever the system tries to draw another sprite when there's already eight sprites present on the same scanline the PPU simply does not draw that sprite, and instead sets a flag noting that an "overflow" of sprites has happened.

In addition to this the PPU only supports 8x8 or 8x16 sized sprites. Knowing this we can take a look at the pictures in the question body and note that Battletoads use 8x8 sized sprites. Aproximate image:

split image

From this image we can see that the sprite is actually cut up into 4 separate 8x8 sprites, and because of "sprite overflow" the bottom right sprite has failed to draw.

Because of how the PPU works it would be very annoying if a projectile completely disappeared because there were too many sprites on screen and it was drawn too late (after 8 other sprites). To combat this the game developers for the NES used the flag mentioned above as an indication that they had to "shuffle" the sprite rendering order. Re-ordering the sprites simply made the sprites on the same scanline draw in a different order than the previous frame, causing a different sprite to be left out than last time.

This is what caused the "flickering" effect of sprites appearing and disappearing randomly since they were sometimes too late in the draw order to be drawn, and sometimes not. While not perfect or aesthetically pleasing it beats out having completely invisible objects.

Here's a scan line visualization effect (horizontal lines) courtesy of "ritcharnd moskow" on Wikipedia:

scan line effect


Not the answer you're looking for? Browse other questions tagged or ask your own question.