All effects

y = base + A · sin(x·k + t)

Sine scrollers.

1986 to today

Every cracktro needed one: a line of text gliding across the screen on a wave, carrying greetings, insults and party invitations. The message was the medium.

8-bit16-bitPCGPU

How it works

The algorithm

Scroll a line of text horizontally, and displace it vertically with a sine of the screen x-coordinate and time. Move whole characters (a DYCP, ‘different Y character position’) or every one-pixel-wide slice of the text (a true sine scroller). Add more sines, a colour gradient per line and a mirrored reflection, and you have a cracktro.

The old-hardware trick

The C64 cannot afford a sprite per letter, so DYCP redefines a few characters every frame and draws the shifted glyphs into them. On the Amiga the blitter copied one-pixel columns of a pre-rendered text strip to sine-table offsets, and the Copper painted the colour gradient through the letters for free.

Per frame, in pseudo-code
scroll += speed
for x in 0..319:                       // one column at a time
  column = text_bitmap[(x + scroll) / scale]
  y0 = base + SIN[(x·k + t) & 255] · A
  blit(column, x, y0)                  // 1 px wide, 8·scale tall
  colour = copper_gradient[y − y0]     // free on Amiga

// DYCP: per character instead of per column
  y0 = base + SIN[(char_x·k + t) & 255] · A

Timeline

Documented milestones, with a source for each. Famous examples, not claims of who did it first.

  1. 19868-bit

    DYCP on the C64

    Yip / PureByte · Commodore 64

    Jazzcat's researched C64 chronology attributes the ‘Different Y Character Position’ scroller to a Yip release of 27 June 1986, every letter riding its own sine.

    Source
  2. 198816-bit

    The sin intro

    PHR Crew (code: Haegar) · Amiga OCS/ECS

    A documented early Amiga sine-scroll intro. Its discussion page argues about ‘firsts’ and usefully separates sliced text deformation from whole-character movement.

    Source
  3. 198816-bit

    Smooth double sine on the ST

    XXX International · Atari ST

    ‘Nibble scrapping smooth sine scroller’ brings two combined sine waves to the other 68000 machine.

    Source
  4. 1992PC

    The PC adopts the vocabulary

    The Phoney Coders · Even Better Than the Real Thing · DOS · VGA

    Its effect list reads like an Amiga demo, sine scroller, vector balls, rotating 3D, showing the 16-bit language moving to the PC.

    Source
  5. 1993PC

    Scroller over a starfield

    Phantom / Epical · Hoax #3 · DOS

    A diskmag opens with a sine scroller in front of a 3D starfield: the effect as a reusable presentation device.

    Source
  6. 19938-bit

    DYCP, explained

    Pasi ‘Albert’ Ojala · C= Hacking #6 · Commodore 64

    An electronic magazine article documents the character-memory method behind DYCP, preserving the optimisation, not just the look.

    Source
  7. todayGPU

    A scroller in one shader

    ByteJuggler · Space Travel · WebGL2

    Font, rainbow sine scroller, reflection and bars drawn by a single full-screen fragment shader, the old character machinery replaced by per-pixel maths.

    Source

Over time

5 live versions, from the oldest platform to today: 4 on the CPU, 1 on the GPU. Retro versions run at their original resolution and palette. Demos pause when off screen.

C64 · char mode

DYCP

1986

Whole 8×8 characters, each at its own Y on a sine, recoloured per raster line through a C64 colour ramp, under a 2× logo.

8-bitCPUdifferent Y char position16 colours
Detail page
Amiga · blitter + copper

Slice scroller

1988

Every one-pixel column of the text is displaced on its own, the letters bend. A copper gradient runs through them and a wobbling reflection below.

16-bitCPU12-bit colourreflection
Detail page
Atari ST · 512 colours

Double sine

1988

Two sines summed for a rolling wave, big 4× letters in shifting colours from the ST's 9-bit palette, over timer-B raster stripes.

16-bitCPU9-bit colourraster
Detail page
PC · VGA mode 13h

Scroller over stars

1993

Like the Hoax #3 opening: a 3D starfield flies at you while a 3× scroller bounces in front, in a 256-colour gradient.

PCCPUstarfield256 colours
Detail page
GPU · GLSL

Shader scroller

today

The 8×8 font lives in a texture; the fragment shader finds the glyph under each pixel, adds a rainbow, a glow, a starfield and a rippling reflection.

GPUGPUfont texturereflection
Detail page