Afterglowscreensavers

Race Cars Screensaver

Race Cars is a free, in-browser screensaver that shows a field of top-down cars lapping a winding circuit forever, jostling for position on the straights. It runs instantly on a canvas with no download or install. Press ESC at any time to exit.

Live preview

Press ESC to leave fullscreen. Settings are saved in your browser only.

How the Race Cars screensaver works

The circuit is generated mathematically rather than drawn by hand. A base ellipse is bent into a closed loop by summing three sine waves of frequencies 2, 3, and 5 with random amplitudes and phases, producing a smooth but irregular track that always closes on itself.

Roughly every 22 seconds a brand-new set of track parameters is generated and the layout morphs smoothly into it over about three seconds, so the circuit slowly reshapes itself without ever jumping. The road is stroked as a thick rounded line with a dashed center line and a checkered start/finish drawn at the line.

Each car β€” 6 by default, up to 8 β€” travels along the same parametric path by advancing a position value from 0 to 1, offset sideways into its own lane. Its forward step is its personal base pace times your Speed setting, modulated by a slow sine so cars surge and fall back and trade places.

Cars are drawn as colored rectangles oriented along the track tangent, with a tinted cockpit and small black tires, each pulling its color from a fixed eight-color palette by index.

A worked example

With the defaults β€” 6 cars, speed 5, track #3a3f48 on grass #16301c β€” six brightly colored cars circulate a dark asphalt loop on green grass, swapping places on the straights, while the circuit gently morphs into a new shape every 20–28 seconds. Set Cars to 8 and Speed to 10 for a packed, fast-moving grid.

Settings & tips

Frequently asked questions

Is the Race Cars screensaver free?
Yes. Race Cars runs free in your browser with no download, install, or account needed. Open the page and it starts at once.
How do I exit the Race Cars screensaver?
Press the ESC key to exit at any time and return to the page. The race runs by itself until then.
Is the race track always the same?
No. The circuit is generated from random parameters and smoothly morphs into a new shape roughly every 20 to 28 seconds, so the layout keeps changing.
How many cars can race at once?
The Cars slider sets the field from 2 to 8 vehicles, each in its own color and lane.
Does Race Cars work on phones and Macs?
Yes. It runs on an HTML canvas in any modern browser, so it works on Windows, macOS, Linux, and mobile devices without a plugin.

← All Classics screensavers