A good sprite-tool with visual support for the OR-color?

Page 2/2
1 |

By Bengalack

Resident (53)

Bengalack's picture

18-02-2020, 13:03

And then I read a bit up on this. It seems like VRAM has room for 64 (16x16) sprite patterns, but only color table for 32? That really seems like a compromise. As if one can reuse the color across other sprite patterns? Would be good to have 64 sprites to chose from in VRAM in any given time, and not define the colors all the time.

Unless I have misunderstood. Oh well.

By spacemoai1973

Master (165)

spacemoai1973's picture

18-02-2020, 13:29

There are 32 sprites. Each sprite has a position, a (set of) color(s) and a pattern. There are 16 colors and 64 (16x16) patterns to choose from.

By Bengalack

Resident (53)

Bengalack's picture

18-02-2020, 15:23

Yes, but as there are 64 patterns, there should have been 64 sets of colors to choose from too (sprite mode 2). Ideally. I think Smile

By Metalion

Paragon (1101)

Metalion's picture

18-02-2020, 15:28

Bengalack wrote:

It seems like VRAM has room for 64 (16x16) sprite patterns, but only color table for 32?

You understood correctly. And it's a real pain in the back ... Each time you need a new sprite, you change the pattern number and then you have to load its color table in VRAM.

The only way to work around that is to have multiple pattern & color tables.
But it has other inconvenients ...

By spacemoai1973

Master (165)

spacemoai1973's picture

18-02-2020, 17:22

You can talk about "ideal" all you like, but color is a sprite attribute. This is how it works on most sprite hardware.
MSX: 1bpp pattern, color is a sprite attribute
NES: 2bpp pattern, color is a sprite attribute
V9990: 4bpp pattern, color is a sprite attribute
etc.

Generally in games, you'll have "palette swaps" of enemies and objects. Having color be an attribute facilitates this (and perhaps stimulates it). Are there use cases where the extended color attributes of sprite mode 2 are not ideal? Sure, but it's not unusual or the end of the world.

You don't constantly rewrite the pattern data, and there is no requirement to constantly rewrite the color attributes either.

By Bengalack

Resident (53)

Bengalack's picture

19-02-2020, 13:06

Agree. The concept of having colors decoupled from patterns is great. Just thought the amount should match. 64 vs 32 (on sprites with height=16), but yeah, it's not the end of the world. And: It is what we do all the time - work with the limitations Smile

Page 2/2
1 |