Sprite per scanline question

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

Post Reply
cdalten
Posts: 1
Joined: Mon Jul 18, 2022 10:22 pm

Sprite per scanline question

Post by cdalten »

I understand there are 8 sprites per scanline. But what happens if the sprite spans multiple scanlines. How does the nes keep track of that?
Fiskbit
Posts: 891
Joined: Sat Nov 18, 2017 9:15 pm

Re: Sprite per scanline question

Post by Fiskbit »

Each scanline is processed independently, and while a particular sprite may be skipped on one scanline because there are 8 higher-priority sprites on that scanline, it may be drawn on some other scanline where that's not the case. Drawing an 8x8 sprite tile is not all-or-nothing.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Sprite per scanline question

Post by psycopathicteen »

I remember once finding that confusing as well. Similar to how tech sheets saying "SNES has 256 colors onscreen at once and can do transparency" was confusing to me because it made me think "how the hell am I supposed to make sure transparency effects never go over 256 colors?"
Post Reply