Art

Painting a game cover with nothing but silhouettes

Every game on this site has a cover: a wide, moody image behind its title on the storefront. There are sixteen of them and no illustrator was involved. They come out of a Python script, about four hundred lines long, that has never drawn a recognisable object in its life.

The technique is old — it is how theatre flats and matte painters faked depth long before anyone had a computer — and it survives because it exploits something specific about how eyes read distance. Once you know the recipe you can build an atmosphere in an afternoon, and it will read as intentional rather than cheap, which is the only bar that matters.

Why silhouettes

Detail is expensive and depth is not.

If you try to draw a thing, you are immediately committed to anatomy, perspective, material, and light — four ways to be wrong, all of them visible to any viewer at a glance. If you draw the outline of a thing against a bright sky, you have committed to exactly one thing: its shape. A pine tree in silhouette is a triangle with a stick. A ridge line is a wobble. A wagon is a box and two circles.

Silhouettes are also how distance actually looks. Stand somewhere with layered hills at dusk and the far ridges genuinely are flat, edgeless shapes in a single tone. The technique is not a stylisation of reality so much as a description of one particular lighting condition — which is why every image the script makes is set at dawn or dusk. It cannot do noon, and it has never needed to.

The recipe, in order

The script paints in strict back-to-front order, and the order is the whole method.

A graded sky. Two colours, top and bottom, interpolated down the full height of the image. That is the entire background. The choice of the two colours does more to set mood than every subsequent step combined: a cold slate over dull gold reads as a bad morning, the same gold over deep violet reads as an evening you would want to remember.

One light source. A radial glow, additive, placed off-centre, falling off on a curve steeper than linear so it has a hot core and a long tail. This single element is what makes the image look lit rather than coloured. Its position also fixes the composition — everything afterwards is arranged in relation to where the light is, and moving it forty pixels changes the picture more than changing any shape does.

Silhouette layers, far to near. Each layer is a filled polygon whose top edge is a sum of a couple of sine waves at different frequencies, so the ridge is regular enough to read as landform and irregular enough not to read as a graph. Each layer is darker than the one behind it and placed a little lower in the frame. Three or four is plenty; the eye stops counting after about three.

Atmospheric fog between the layers. This is the step people skip, and it is the step that does the work. Before each new layer goes down, the accumulated image behind it is lifted slightly toward the sky's colour. That is what haze physically does — scatter sky light into your line of sight in proportion to distance — and reproducing it means the far ridge is not merely lighter, it is tinted toward the sky, which is the actual cue your visual system uses for distance. Skip it and you get a flat stack of grey cutouts. Include it and you get a valley.

Foreground detail. Rows of pines, scattered rocks, a fence, a wagon. Same silhouette logic, near-black, with jitter in the position and size of each element so the row does not read as wallpaper. The jitter is a random offset, and the fact that it is random is why it looks natural — a hand-placed row of trees always betrays the rhythm of the hand that placed it.

Grain and vignette. A fine film grain across the whole frame and a soft darkening at the corners. Both are cheating and both are indispensable. Grain hides the banding that a smooth gradient shows on an eight-bit display, and it gives the flat regions something to be — a perfectly clean gradient reads as a computer, a slightly noisy one reads as a photograph of something. The vignette pulls the eye to the centre and hides the edges where the sine waves are least convincing.

A final colour grade. One pass over the finished image that pushes the whole thing toward a single temperature. This is what makes sixteen covers made on different days look like a set. Without it they are sixteen pictures; with it they are a shelf.

Determinism, which sounds boring and isn't

The script's random number generator is seeded with a fixed value. Run it today and run it next year and the pines land in exactly the same places.

This matters more than it sounds. Without a seed, regenerating one cover regenerates all of them differently, so a tweak to one image silently rewrites fifteen others you were happy with. Every change becomes a decision about whether you can face re-reviewing the whole set. With a seed, the script is a pure function from parameters to pictures: change the parameters for one cover, get exactly that one cover changed, and every other file comes out byte-identical.

That is the same property that makes any generated asset maintainable. If regenerating is not safe, you will stop regenerating, and the script will rot into a thing that produced some files once.

What it can't do

It cannot draw a face. It cannot draw an object anyone has to identify. It cannot do a scene lit from the front. It has exactly one time of day and one mood, and every cover it makes is a variation on something large, seen from a distance, at the end of the day.

Those limits are why it works. A tool that can do anything requires taste at every call site; a tool that can do one thing requires taste once, when you decide whether this is the one thing you want. Sixteen covers in one register is a house style. Sixteen covers in sixteen registers is a stock photo folder.

Where the register does not fit — a puzzle game with no landscape in it, say — the answer is not to bend the script. It is to make that cover a different way, and let it be visibly different, because a deliberate exception reads as an exception and a stretched technique just reads as a failure.

The transferable part

If you take one thing from this: fog between the layers.

Almost everyone who tries layered silhouettes gets the layers right and the atmosphere wrong, and the result is a picture that is obviously made of stacked shapes. The stacking is not the illusion. The illusion is that things far away are veiled by the air between you and them, and the veil is the same colour as the sky. Ten lines of code, and it is the difference between a diagram of a landscape and a landscape.