But in the Game Boy community (gbdev.gg8.se and the related Discord server), it's common to hardcode OAM indices for actors or at least not shuffle them from frame to frame, and I'm trying to understand why they do that. The Game Boy sprite system differs from that of the NES as follows:
- There is enough secondary OAM to draw 10 8-pixel-wide sprites per 160-pixel scanline. Thus sprites can cover nearly half of the screen's width rather than one-fourth like on the NES.
- The PPU determines which sprites to draw by finding the 10 lowest-numbered sprites in OAM whose Y range overlaps each scanline, just as the NES PPU does. But then according to Pan Docs, the monochrome Game Boy sorts these frontmost 10 sprites by their X coordinate before displaying them. Sprites to the left are drawn in front, with position in OAM only breaking ties.
- The memory controller responsible for OAM isn't a rushed, buggy mess. This means OAM can be randomly accessed at $FE00-$FE9F during blanking periods.
- Horizontal blanking on the Game Boy is much longer than on the NES. OAM on the Game Boy can be accessed not only during vertical blanking but also during most of horizontal blanking.
Relationship to other topic: This one also includes the random access instead of DMA as an additional factor.