Lucas Cervone

Coding

Building Alpine Slalom

How a small browser game turns a flat drawing into a ski slope, checks each gate, and keeps your best run on this device.

A slalom course beneath a violet sky

Drawing depth on a flat slope

The mountain stays still. Each pair of flags starts small near the horizon and spreads apart as it approaches the skier. Squaring the distance makes the last stretch feel faster. The terrain, flags, and skier are all drawn with SVG.

Counting a clean gate

At the moment a gate crosses the skier, the game compares their horizontal positions. Cross between the poles and the score goes up. There are eight gates per run. A personal best stays in the browser so the next run has a target.