Sometimes, NES sprites flicker when there are a lot of them, like at 1:19 in this video of Super Mario Bros. Why did they do this?
The Picture Processing Unit (PPU) in the NES can only draw 64 sprites per frame and 8 sprites per horizontal line (scanline). If the game tries to draw more than that, some of them will be invisible.
It could ruin the game if enemies became invisible because there were too many of them, so the developers programmed the games to change the order of sprites in the sprite list. Instead of some sprites always being invisible, the invisible sprites change every frame, causing the flicker effect.
The PPU stores the list of sprites in a a 256-byte area of memory called the Object Attribute Memory (OAM). Usually, games keep the sprite data in the program RAM and DMA it to OAM every frame.
The PPU also has Secondary OAM, a 32-byte memory area where it stores OAM entries for sprites that will be visible on the next horizontal line of the picture (scanline) and eight internal registers that store bitmaps, positions, and attributes for sprites that are visible on the current scanline.
Because primary OAM is 256 bytes, and each sprite takes 4 bytes, the PPU can only draw 64 sprites per frame. Because secondary OAM is only 32 bytes and there are only 8 sprite registers, the PPU can only draw 8 sprites per scanline. If there are more than eight sprites per scanline in OAM, only the first 8 will be drawn -- the rest will be invisible.
There are a fixed amount of memory cycles for the PPU to read the sprite data on each scanline; once those are exhausted, no more sprite data will be fetched.
As NobodyNada said, programmers would rotate the order in the list to make sure that the user would see all the sprites.
The technique was also used on other systems that didn't work the same way, but sprites were rotated to give the illusion of having more objects on screen. The Atari 2600 did that a lot (Joust is a perfect example of this where the birds constantly flicker). On the Intellivision, it was forbidden by Mattel since they wanted the Intellivision to showcase a better visual quality than the competition.