Friday, May 5, 2017

The night sky we don't see

One advantage of using indexed color graphics is that you can display the same object with completely different colors by simply using a different palette. Those palettes can potentially be loaded at the same time to separate palette lines, so the object can be displayed in several different colors simultaneously.

For instance, the square blocks in the slot machine bonus stage have a lot of individual rotations which cut down on the available VRAM, so it's nice that a single set of art is good for three different colors.


Sometimes the art reuse isn't immediately obvious, though. Here are the contents of CRAM during a special stage:


On the left side we can see the colors for the four kinds of spheres, followed by... the same colors? Except for white? This was really confusing, so I tried replacing the duplicate colors with something else. Some green should stand out.

And suddenly it became obvious.

3 comments:

  1. Get the Blue spheres!
    Avoid the Tomatoes!

    ReplyDelete
  2. I have to say, that's very clever. After all, they have all of those smaller, distant versions of the sphere in RAM, so having a star and plain version would use twice the space.

    ReplyDelete