Starfield Screensaver
Starfield recreates the classic Windows flying-through-space screensaver: stars rush out from the centre and streak past as if you're flying forward at warp speed. This free browser version lets you set the star count, speed and colour, then fly fullscreen — press ESC to drop back to sublight.
How the Starfield screensaver works
Each star has a 3D position — an x, y and a depth value z. To draw it, the saver divides x and y by z to project the 3D point onto the flat screen. Stars with a small z (close to you) land far from the centre and look big; stars with a large z (far away) sit near the centre and look tiny.
Flying forward is just decreasing every star's z a little each frame. As z shrinks, the projected point races outward from the centre and grows — that outward rush is the warp effect. The speed control sets how fast z decreases.
When a star's z passes the camera (reaches zero) it has flown 'past' you, so it is respawned with a fresh random position and a large z, re-entering far away in the centre. With hundreds of stars at staggered depths, the stream never stops. The count control sets how many stars exist.
With streak on, each star is drawn as a short line from its previous projected position to its current one instead of a dot, so faster, closer stars leave longer trails — the look of light smearing at warp speed.
The starfield effect, from planetarium to PC
A starfield is one of the oldest tricks in computer graphics, and it rests on a simple observation about perspective: when you travel in a straight line, nearby objects appear to rush outward from the point you are heading toward while distant ones barely move. The point everything seems to flow from is called the focus of expansion. The psychologist James J. Gibson identified it in the 1940s while studying how pilots perceive motion, and the radial pattern of flow it describes helps supply the sense of moving forward.
Real stars are so far away that flying past them at any plausible speed would not change their positions at all, so the streaming effect is a cinematic convention, borrowed from science-fiction films, rather than an astronomical simulation. Implementations typically recycle a star once it passes the viewer, which lets a small fixed number of points imitate an endless journey.
Variants include brightening nearer stars, drawing short streaks to suggest speed, and slightly varying star colours. The underlying maths is the same perspective division used throughout 3D graphics, which is why a few lines of code are enough to produce the effect.
A worked example
Set count to 500 and speed to 7. The saver keeps 500 stars, each at a random depth. A star at depth z = 4 projects to four times closer to the centre than the same star at z = 1, so as the saver walks z from 4 down to near 0, that star sweeps from the middle out to the edge and grows the whole way. Turn streak on and that sweep becomes a visible trail; raise speed and every star reaches the edge sooner, so the field feels faster and the trails get longer.
Settings & tips
- Raise count toward the maximum for a dense, dazzling field; lower it for sparse, calm space.
- Turn streak on for warp-speed trails, or off for crisp moving points.
- Change the star colour for a blue hyperspace or warm amber look against the deep-space background.
Frequently asked questions
- Is the Starfield screensaver free?
- Yes. It runs free in your browser with nothing to install. Open it, press Run fullscreen, and press ESC to exit.
- How do I make the stars streak like warp speed?
- Turn on the streak option. Each star is then drawn as a trailing line rather than a dot, and faster stars leave longer trails.
- Can I change how many stars there are?
- Yes. The count control sets the number of stars, from a sparse field to over a thousand, and speed sets how fast you fly through them.
- Is this the same as the old Windows starfield?
- It recreates the same flying-through-space effect using 3D projection. It's an original rebuild, not the original Microsoft file, so it runs in any modern browser.
- Do real stars move like this when you fly past?
- No. Even at the speed of a spacecraft the stars are so distant that their apparent positions would not change over a human lifetime. The streaming effect is a stylised depiction of perspective, not a model of the real sky.
- What is the point everything flows out of?
- It is the focus of expansion, the spot in your field of view directly along your direction of travel. In a straight-line flight every point appears to move away from it along a line.