NES games use a display list in RAM, also called shadow OAM, and then DMA that to the PPU during vertical blanking period. OAM DRAM refresh bugs in the PPU make this necessary even when few sprites move from one frame to the next.Kenny Rogers won a Grammy for the song 'The Gambler', in which Don Schlitz wrote:Said "If you're gonna play the Game Boy, you gotta learn to play it right."
But apart from sprite 0, I've gathered that it's also considered best practice not to hardcode a particular game object's starting position in the display list. For example, don't always draw the main character using sprites 1-8, enemy 1 using sprites 9-14, enemy 2 using sprites 15-20, etc. Instead, NES games are supposed to reassign slots every frame, especially if there's a possibility that more than eight will be displayed on the same scanline. This also allows the game to make enemies intentionally Z-fight if they overlap.
But in the community for another 8-bit platform, it's common to hardcode OAM indices for actors, and I'm trying to understand why they do that. The best way I know to do so is to generalize from what I know, and I know the NES. So for comparison, I'll describe the other platform's PPU as if it were a famiclone:
- Like the AVS, this famiclone's PPU has enough secondary OAM to draw 15 sprites per line instead of 8, using the alternate fetch pattern I described in Enhancement#Overdraw. Thus sprites can cover nearly half of the screen's width rather than one-fourth.
- The PPU determines which sprites to draw by finding the 15 lowest-numbered sprites in OAM whose Y range overlaps each scanline, just as the authentic NES PPU does. But then it sorts these frontmost 15 sprites by their X coordinate before displaying them. Sprites to the left are drawn in front, with position in OAM only breaking ties.