Sprites
Hardware-accelerated game objects
Sprites are hardware-supported graphical objects that move independently of the background, fundamental to 2D game graphics across platforms.
Overview
Sprites are graphical objects handled specially by video hardware—characters, projectiles, and items that move without affecting the background. Hardware sprites meant the CPU didn’t need to erase and redraw moving objects each frame; the video chip handled compositing. Each platform had different sprite capabilities: size, colour, number limits.
Fast facts
- Definition: hardware-supported moveable graphics.
- Advantage: CPU offload, no background corruption.
- Limitations: per-platform count, size, colour.
- C64: 8 sprites, 24x21 pixels, multicolour or hires.
- NES: 64 sprites in OAM, 8 per scanline limit.
Platform comparison
Sprite capabilities varied:
| Platform | Sprites | Size | Colours |
|---|---|---|---|
| C64 | 8 | 24x21 | 3+1 or 1+1 |
| NES | 64 (8/line) | 8x8 or 8x16 | 3+1 |
| Amiga | 8 | 16px wide | variable |
| Mega Drive | 80 | variable | 15+1 |
Programming sprites
Common sprite operations:
- Position: set X/Y coordinates.
- Pointer: which graphic to display.
- Enable: turn sprite on/off.
- Collision: detect overlaps.
- Priority: ordering with background.