Saturday, April 02, 2011

C64: How to build a colored hires sprite

The sprites on the C64 come in two modes, single colored 12x21 (stretched to 24x21) and multicolored 24x21, a simple trick to get a sprite that has both a resolution of 24x21 and contains color is to split it up. One sprite gets the hires details and the other one gets the lowres color. When using those two sprites in a game one simply has to place them at the same coordinates:


PypeBros said...

A trick used in Giana Sisters and "Mayhem in Monsterland", afaik.

And likely in many other games.

Jupp3 said...

It's usually better to have the hires sprite on top of the multicolor one, that way you can "mask off" any unwanted half-pixels into the color that the hires sprite is using.

Is there actually any benefit in doing it the other way around?

Grumbel said...

In the example the hires sprite is actually on top of the lowres color sprite. Graphic however doesn't make that very clear.

I don't think there would be any advantage of doing it the other way around, as one would indeed lose the ability to mask the rough edges of the lowres sprite.

Unknown said...

A good trick, but it's too bad it costs you an extra sprite... C-64 sprites are a rare resource!