Skip to content
Techniques & Technology

FLD

Flexible Line Distance

A C64 trick that inserts gaps between character lines, pushing the graphics below them down the screen. Unusually for a scene effect, it appeared in commercial games before it appeared in demos.

commodore-64graphicsrastervic-iidemoscenescrolling1987–present

FLD — Flexible Line Distance — moves blocks of graphics down the screen by inserting blank space between character lines.

With FLD you can make gaps between char-lines, thus the graphics below the FLD will be pushed down on the screen.

It works on character lines, eight pixels at a time, which makes it coarser than its horizontal cousins — and much easier to use.

It is the forgiving one

FLD is usually filed alongside VSP and linecrunch as a hard raster trick. It is not in the same class of difficulty:

FLD does not require exact timing and doesn’t even have to be updated each rasterline (only every ~6:th rasterline is ok). FLD can even be done with periodic interrupts instead of looped code that just wastes all the precious rastertime.

That tolerance is why it turns up in games. A commercial title cannot spend its whole raster budget holding an effect together; FLD lets you have the effect and keep the CPU.

Games first, demos second

Unusually for a C64 scene effect, FLD’s earliest recorded appearances are commercial games.

Release Kind Date
Thomas Larsen, The Vikings — “10 points full screen FLD” game before March 1987
Thomas Larsen, Tiger Mission game before March 1987
Mule/The Cream Crackers, Mega Jive demo “around march 1987”

The scene’s own record disagrees with itself about whether “before March” means February, and says so.

It kept turning up in games afterwards. Codebase64 publishes FLD parallax scrolling “reverse engineered from Tusari”, noting that the 1992 game was “the first documented game to use FLD with parallax in vertical scrolling sections” — and did it “using mainline code without any IRQ/NMI action”.

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.