Scaling Sprites


16x16 sprites are a nice size on the Next’s screen. Neither too big nor too small.

> inset example of next sprites - reuse something from earlier

However the Next is capable of stretching sprites to make them larger on the horizontal and vertical axis.

Sprites can be stretched 2x, 4x and 8x their original size.

> diagram of the bits and what needs setting

Specifically, when we set sprite attribute 3 to specify the sprite pattern and to make the sprite visible, we also need to set bit 7 to enable sprite attribute 4.

In sprite attribute 4 several things can be set that are useful

> highlight these as I say them

  • Bit 1 is the 9th bit for the sprite’s Y position

  • Bits 2 and 3 set the scaling for the sprite’s Y axis

  • Bits 4 and 5 set the scaling for the sprite’s X axis

Doing a boolean OR with these flags gives every combination of scaling and stretching.

> example of all combinations