Home

What's in a Frame? 3

Demotronic (2002)

One sequence from the demo Demotronic by 1.000.000 boys features scrolling text on top of a chequered background, which is scaled, translated and distorted.

The method used is fairly simple, but produces visually impressive results. The background tile set and tile map create a stripey, two-colour background which remains the same throughout the entire sequence. Instead of showing a 160 pixel by 144 pixel section of this image on the screen, each screen line displays an arbitrary 160 pixel by one pixel horizontal slice of the image. This is achieved by updating the background scroll registers between screen lines.

In other words, the 144 lines of the screen are filled with 144 separate slices of the image, each one pixel tall. Each slice can come from any horizontal line in the original image. The background palette is also updated between every line to create texture and suggest depth.

Full background map
Background as defined   on line 
Rendered background
Current line:
-
Background scroll (X,Y):
0, 0
Background palette 0:

Rendering the background line-by-line. Top left: 32 tile by 32 tile background image, with no palettes applied. The blue rectangle shows the 160px by 144px viewport (determined by the scroll registers) and the red line indicates the currently rendering screen line. Bottom left: the background defined by the current scroll and palette values. The grey arrows indicate the currently rendering screen line. Bottom right: the background as it is rendered on screen.

Drag the slider to draw lines to the screen.

Note: the "demotronic trick" is a different effect from the same demo.

Further information