Sprite Table

From NerdConsole
Revision as of 14:33, 14 January 2024 by NerdOfEpic (talk | contribs) (Created page with "The Sprite Table describes the forground layer for a game. You can think of this as the objects that move around such as the player, enemies, and projectiles. NerdConsole has a single Sprite Table that supports up to 256 sprites. === Sprite Table Format === Sprite Tables in NerdConsole use a 4-byte structure for each entry. Bit 7 6 5 4 3 2 1 0 Byte 0 x x x x x x x x Byte 1 y y y y y y y y Byte 2 M F D C p p p p Byte 3 i i i i i i i i * x - x-axis position of the upper...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The Sprite Table describes the forground layer for a game. You can think of this as the objects that move around such as the player, enemies, and projectiles. NerdConsole has a single Sprite Table that supports up to 256 sprites.

Sprite Table Format

Sprite Tables in NerdConsole use a 4-byte structure for each entry.

Bit 7 6 5 4 3 2 1 0 Byte 0 x x x x x x x x Byte 1 y y y y y y y y Byte 2 M F D C p p p p Byte 3 i i i i i i i i

  • x - x-axis position of the upper left corner of the sprite on the screen
  • y - y-axis position of the upper left corner of the sprite on the screen*
  • M - Mirror (Left/Right)
  • F - Flip (Top/Bottom)
  • D - Depth Flag (0 = Over BG, 1 = Under BG)
  • C - Color Cycling
  • p - Sub-Palette Index
  • i - Tile Table Index