IT lexicon › Hardware › Sprite priority

Sprite priority

Hardware På svenska → Updated: 2026-10-27

The rule that decides which hardware sprite shows when two overlap, and whether a sprite sits in front of or behind the background graphics.

Eighties video chips had no depth buffer, only fixed rules. On both the NES and the C64 the lowest-numbered sprite wins, so in practice the game draws in whatever order it fills the sprite table. Each sprite also has a bit that sends it behind the background's foreground pixels, letting a character walk behind a fence or a bush.

The combination produces bugs that became features. On the NES, a low-numbered sprite with the behind bit set also hides every higher-numbered sprite, even though it is itself invisible. Super Mario Bros. 3 uses exactly that to make mushrooms rise out of question blocks. Games that rotate sprite numbers every frame to beat the scanline limit get, as a side effect, characters that swap depth order.

← Back to the lexicon