Skip to content
Techniques & Technology

Palette Cycling

Animation without redraw

Palette cycling created animation effects by rotating colour values rather than redrawing graphics, enabling flowing water, glowing effects, and pulsing lights without CPU overhead.

commodore-amigaibm-pccommodore-64atari-stgraphicsanimationtechnique

Change the palette, not the pixels. Palette cycling animated graphics by shifting colour indices through different values—what was blue becomes green becomes yellow becomes red, cycling endlessly. Water appeared to flow, lights seemed to pulse, and fire flickered, all without redrawing a single pixel.

The principle

Step Process
1 Design image with gradient colours
2 Assign sequential palette indices
3 Each frame, shift palette values
4 Pixels appear to move

Common effects

Effect Implementation
Flowing water Blue gradients cycling
Fire/lava Orange/red palette rotation
Glowing lights Brightness cycling
Neon signs Colour pulsing
Waterfalls Vertical flow illusion

Technical advantages

Benefit Explanation
Zero CPU redraw Only palette changes
Tiny memory No frame storage
Smooth animation Limited only by refresh rate
Multiple effects Different palette ranges

Platform implementations

Amiga

The Copper could change the palette per scanline. Colour registers live at $DFF180-$DFF1BE (32 entries × one word each). Cycling means writing the same range each frame with the values rotated by one slot:

; Rotate colours 1-7 for a "flowing" effect
; (palette[1] becomes palette[2], palette[2] becomes palette[3], etc.)
            move.w  $dff182,d0          ; Save palette[1]
            move.w  $dff184,$dff182     ; palette[1] <- palette[2]
            move.w  $dff186,$dff184     ; palette[2] <- palette[3]
            ; ... etc through palette[7] ...
            move.w  d0,$dff18e          ; palette[7] <- saved

The Copper can additionally swap palettes mid-frame for per-scanline cycling (e.g. waterfall sprite columns where each row uses a different rotated palette).

PC (VGA)

DAC register manipulation:

  • 256-colour palette
  • Direct register writes
  • Smooth transitions

C64

The C64 has no programmable palette — its sixteen colours are fixed — but in multicolour and extended-background-colour modes most pixels are not coloured directly. Commodore’s Programmer’s Reference Guide explains that a multicolour character’s bit pairs 00, 01 and 10 are “references to the registers associated with those colors” at $D021$D023, and points out the consequence: “Simply changing one of the indirect registers will change every dot drawn in that color. Therefore everything drawn in the screen and background colors can be changed on the whole screen instantly.” The guide’s own demonstration POKEs a random value into 53282 in a loop. Extended background colour mode adds a fourth register, $D024, chosen per character by the top two bits of its screen code, at the price of only 64 usable characters.

That is the mechanism behind the “flashing” text of demo-scene notewriters such as Face Noter and Octanoter: Richard Bayliss’s Codebase64 example switches on extended colour mode and, on each raster interrupt, loads the next entries of three 40-byte tables into $D022, $D023 and $D024. Cycling the fourth colour source, colour RAM, means rewriting it, and period BASIC programmers did that too — a 1989 COMPUTE!’s Gazette reader tip by Jacques Bingham installs an interrupt that walks a 32-entry table of colour codes through colour RAM behind a title message. Activision’s Paintworks advertised “color cycling for animation effects” as a feature of a C64 paint program in 1986.

Limitations

Constraint Impact
Fixed design Must plan for cycling
Colour usage Dedicates palette entries
Art constraints Limits general colour use
Directional only Can’t change shape

Famous examples

Game Effect
Monkey Island Ocean waves
King’s Quest Waterfalls
Deluxe Paint Animation tool
SimCity Water features

See also

Not yet fact-checked. This entry was drafted by an AI and nobody has verified it. The dates, figures and technical details may be wrong. Use it to find your bearings, then confirm anything that matters against a primary source.