← labopen switchback →

Switchback

A downhill motocross run down a mountain made as you ride it. The style target is a single flat-colour illustration (switchback/target.jpg): an orange-and-black rider on a pale cliff road, a charcoal rock wall, an orange fence along the drop, black pines, a deep ultramarine sky, blue snow-banded ranges, a white river far below, and speed drawn as orange, white and charcoal shards rather than blur.

The brief

A moving composition of cut colour: cobalt space, pale passages, charcoal weight and orange force. The mountain, the rider and the machine come out of overlapping silhouettes, deliberate openings and a few decisive internal marks; large areas stay flat and unbroken. Depth comes from perspective, occlusion, parallax, contact and a changing silhouette, not from shading every facet. What isn't drawn matters as much as what is:

Riding

Drag left or right to steer: the drag's distance from where it began sets how hard you turn. Nothing steers for you: the bike goes where it points, and with no input it runs straight on, so every bend has to be ridden. Turn hard at speed and the rear steps out: the way you're travelling follows the way the bike points only as far as the tyres grip (less at speed, less braking), so the bike yaws past its line and slides, scrubbing pace and throwing roost, until it lines up again. Drag up and down to drive, as far as you drag, like the steering: up opens the throttle wider (a harder pull, toward ~185 km/h), down brakes; left alone, the engine and the hill keep you going as they always have. ← → or A D steer from a keyboard, ↑ ↓ or W S drive. Jumps come in four sizes, the orange chevrons painted on the ramp counting them: a hop (one chevron; under a second or so in the air), a kicker (two; about two seconds), a big kicker (three; nearly three) and a booter (four; three and a half and more: the big set piece, every kilometre or so, a little way past a checkpoint so a missed one doesn't cost much). Each is built to its flight: a ramp, a gap, and a landing shaped to the flight a rider at the usual pace makes, so whoever clears it comes down along it; the big ones have a straight run-in eased toward level and a steep ramp. Most are the mountain's own: the take-off a mound of snow and rock the ground rises into, the gap a cleft cracking the mountainside (for a hop or a kicker) or a gorge cut through it (for the big ones), its notch running up the wall as a gully and on down the drop as a channel, no flat floors: a cut falls steeply from its lips into a V, a stream's channel down its middle, its bed falling away down the mountain and rough with rock; a stream along a gorge's floor, and over some gorges' rims on the wall side a waterfall, thrown clear of the rock and falling in an arc to the floor, bands of it sliding down, spray where it lands; some kickers are still built, a ramp on black trestles, over a cleft like the rest. Too slow and you fall short into the gap; too fast (the throttle held wide open into a big one) and you overshoot the landing onto the flat: landed square, the bike takes it, slammed down and a third of your pace gone; crooked, it's a crash. Jumps launch you; whoops (a run of rollers) throw you at speed; any crest that falls away faster than you would drop puts you in the air. The take-off decides the flight. Nothing you do in the air steers: the rider's body keeps the bike on line (easing the flight back along the road and toward its middle, gently, at most about 0.6 rad/s), but where you go is where the lip sent you. On a ramp, down isn't the brake, it's the pull: how hard you're pulling as you leave the lip is how fast the bike rotates, nose up, and pulled hard enough (and with air enough: a whole turn wants about two and a half seconds, so a big kicker or a booter) it comes round into a backflip. Once it's committed you can only trim it: in the air the throttle spins it faster and the rear brake slows it, within a band around what the lip gave you, so a flip pulled too lightly can't be saved and one pulled too hard has to be held back. Off a flight that isn't a flip, up and down only tilt the nose (about 20° at most either way) and it settles back to the flight's line when you let go: nothing you press builds into a rotation, so a straight landing is always there. A light pull (as a brake into a ramp would be) counts for nothing; and a pull the flight can't bring round to a whole turn, even trimmed as hard as it can be, isn't committed at all (NO ROOM TO FLIP): the lip flies the flight forward to see. Up and down are measured from where your drag stood when you left the ground, so a pull held through the lip doesn't count twice. Tricks are drawn. Steering does nothing in the air. Instead, put a finger down while you're up (a fresh touch, or a second finger if you're still holding the first) and draw: a straight line is one of the body's tricks by its direction, → NO HANDER (arms out wide), ← NO FOOTER (legs kicked out behind), ↑ SUPERMAN (both legs stretched straight back, the body flat over the bike), ↓ CAN-CAN (the left leg swung over the seat to join the right), and on the diagonals ↗ HEEL CLICKER (both feet up over the bars in front, heels together), ↖ NAC NAC (the right leg swung back over the rear fender), ↘ SEAT GRAB (a hand back on the seat, the legs kicked back) and ↙ ROCK SOLID (hands and feet off at once, the body floated above the bike: the slowest in and out, and worth the most); the straight ways take a little more of the circle than the diagonals, so a line drawn a little off across still reads as across; a loop is the WHIP, the bike swung out beneath you, clockwise to the right, anticlockwise to the left. The line shows where your finger goes, turning orange once it's read. The trick is asked the moment the shape is clear and held for as long as your finger stays down: lift it and the rider gets back on (a quarter to two fifths of a second, the superman slowest), or draw another shape without lifting and the next trick is strung on from the first. Each is worth more the longer it's held all the way, and half as much again for each one strung on in the same flight. Still off the bike as you land is a crash, so the hold is the risk. But a trick the air left can't fit is never attempted: as you ask for it the sim flies the rest of the flight forward, and if there isn't time to get into it and back out, it's refused (NOT ENOUGH AIR) and costs nothing; ask for something else to try again. Keys: Z X C V the straight ways, R F T G the diagonals, Q E the whip, held. Over a crest, an air you didn't ask for, the rider's body lines the bike up with the road twice as firmly as off a jump, so a bend under a crest doesn't carry you off it. How the bike meets the ground matters (and a fall says why: SHORT, TOO HARD, NOSE UP, NOSE DOWN, ON YOUR HEAD, STILL OFF THE BIKE, STILL WHIPPED): square to its slope, the landing's soft and keeps its pace, and it takes nearly twice the slam a crooked one does (a nose pushed down onto a falling slope carries you on a little faster); a little off and a wheel slams; well off (nose first, or looped over onto the back wheel) is a crash. And upside down in a flip with too little height under you, the helmet touches down before the wheels: a crash (ON YOUR HEAD); the showing-off rider only flips where its head will clear the ground halfway round. A whole turn landed is a BACKFLIP or a FRONT FLIP (DOUBLE, or more), across the screen with a three-note chime. Bring it back straight before you land: still out a little and it comes down yawed and slides straight, scrubbing pace; still well out (past about 34°) and it's a crash. The wall on the left glances you off it and costs pace; the drop side, on the right, is forgiving: you can ride the shoulder past the fence and the slope beyond it (the bike rides the ground as it's drawn there, and slides down it where it's steep), and only going too far down it, landing too hard into it, or riding into a face (an outcrop, the side of a raised deck) ends it. A fall or a crash puts you back at the last checkpoint: the flags on the wall side, further apart the further down you are (about 300 m apart at the top, about a kilometre five kilometres on), each one counted as you pass it (CHECKPOINT n across the screen, and again when you're put back at it), and you start again just past it, going.

The rider is yours from the start; auto hands the steering to the sim's own rider, for a run like yours in the page's mode: scored, its tricks called, ended with its card, but never kept on your board (auto=tricks shows off; the lab's listing shows that, its score and calls over it). The eye rides over your right shoulder, the drop side, so the wall rises beyond the rider and the valley opens under you.

The course (course.ts)

The line is laid a metre at a time from the seed, as an off-road route picks its way down rock rather than a road's arcs: straight legs broken by short, sharp kinks (seven to fourteen metres each, some hard; always turning back toward the fall line once the route has wandered, so it keeps going down the valley), a width that never settles (a new one every few metres, joined straight; now and then a pinch between rocks under 5 m, or a wide flat over 10), a fall that steepens and eases, and a rough surface that steps up and down over rock, a new height every few metres joined straight. On the legs, features: a jump every so often (a hop, a kicker or a big kicker; a booter a little way past some checkpoint flags), whoops between. The mountain stands on the left (a rock wall going up) and falls away on the right, as a cliff road does. Everything asks the course the same things: where the line is at distance s, the surface height at (s, u) with u across it, and whether there's surface at all (a gap has none).

The rider (sim.ts)

Arcade physics in the world: the bike has a heading (where it points) and a travel (where it's going); steering turns the heading, quicker at low speed; the travel follows through the grip; where you are on the course (how far down, how far across) is read back from your position. The fall of the hill and the engine drive you, the air holds you back, the loose shoulder slows you. The lean is what the turn asks (pace times how fast the heading swings, against gravity). The engine pulls hard toward 165 km/h; a run averages well over 100. Off a ramp's lip you fly, exactly at its last metre and as steeply as that metre lifts you; off a crest too, where the ground a tenth of a second on falls away below the arc you'd fly by more than the suspension takes up (so the rough rattles you without throwing you every step). You fly a ballistic arc, the air holding you back with the square of your pace as it does on the ground; you land along whatever's under you, a hard landing squashing the suspension and costing pace; landing short into a gap or a landing's face, or falling far below the road, is a crash. Put back at a checkpoint, you start at about 85 km/h.

On a long flight the eye eases out to the drop side and holds the rider in the middle of the frame, so a flip or a whip reads as the whole figure turning; it comes back in as you come down.

The bike and rider

A motocross bike in its real proportions: a 1.48 m wheelbase, a 21-inch front wheel on a fork raked at 27°, knobbly tyres drawn as open rings with the rim inside, a swingarm and shock behind, tank and radiator shrouds, a long flat seat, the rear fender kicked up, the pipe and silencer.

The rider isn't fixed to the bike; it works it:

Drawn as cut colour: three masses, each one flat field with one dark cut where it turns from the light. Orange is the jersey (one shape, lofted through the pelvis, a narrow waist, the chest and broad, rounded shoulders; sleeves full at the shoulder, narrowing to the elbow) and the bodywork. One charcoal is the legs, the gloves and the whole machine (engine, frame, swingarm, pipe and silencer, side plates, tyres), with no marks inside it. Cream is kept for what touches or steers (the boots, the fork as one slash), the front plate and the helmet, its one dark cut the goggles and strap as a single band, with an orange stripe over the top; a dark neck parts it from the jersey. The wheels are thick knobbled rings, open through the middle. The rider is lit for the picture, not by the sun: from above, behind the eye and to its left, so what faces you is one field and only the side turned to the eye's right takes the cut.

look=side|front|rear|quarter holds the eye off the bike, for judging the model.

Studies (flags, for judging the figure):

The drawing (mesh.ts, render.ts)

Every triangle has one material and one tone. The renderer takes each face's normal from the screen (so every face is flat), and its light, nudged by its tone, picks one of its material's four colours, all taken from the target: pale snow, packed track, charcoal rock, orange, black, white, the ranges' blues. So planes lit alike still break into different greys, as a painter sets them. Distance doesn't fade smoothly: it steps, four hard bands toward the valley's blues, each face keeping its band so the far slopes stay faceted. The rider's shadow is the bike itself flattened along the sun onto the ground. Each face's position is taken relative to the eye before its normal is found, so far down the mountain, where world coordinates run to thousands of metres, faces don't speckle between bands.

The backdrop is drawn round the eye, far enough off that it needn't move with you, in one family of blues: lighter and flatter the further off, never charcoal. It's a few deliberate set pieces rather than a field of random facets:

The world is built in 48-metre chunks: a cross-section every four metres, a few big planes from high up the wall to far down the drop, jittered hard in all three directions so its faces break into rock, its character drifting as you go down: the wall from a snowy bank to a sheer cliff, the drop from a shelf to straight down, now and then an outcrop of rock rising between the route and the valley; rock where it's steep and snow where it isn't; the track over it, its edges ragged; the fence (posts, an orange tape and a white one), checkpoint flags on the wall side, further apart the further down (their banners flying, built fresh each frame: waves run out along them, bigger toward the free end, which droops and swings; the facets catch the light and lose it as they turn), kickers on trestles, big jagged boulders bedded along both sides, crags (clusters of leaning rock towers) down the shelves and up the banks, a few pines.

Ruts (gouge.ts) are carved, as a linocut would cut them: marks that say what the ground is rather than where to ride. Each is a gouge stroke, fine where it enters, swelling, lifted out square (or, now and then, tapering again); its floor a step darker than the road, a line of the deep shade's violet (a new ink, the road's) down the wall the sun can't reach, and a sliver of white over the lit lip, seen where the road round it is in shade. On smooth ground they come in combs of three to five parallel cuts going with the road, a print's way of laying down a field, cut by hand rather than stamped (staggered starts, so a comb's front edge slants, uneven gaps, each its own length, now and then one left out), one to each side now and then, with long rests of clean road between; through a bend more of them, longer, leaning out. Where the surface steps, short choppy cuts at odd angles just below the edge (a comb stops at an edge, it never runs over one). On whoops, hatching across the face of each hump, so the humps read as humps; where a landing takes the bike back, a cluster of short heavy cuts. They're anchored to the course, thin to nothing in the last metres before the eye, are cut broader further off so they keep their weight in the frame, and stop at about 60 m. Your own track is the freshest cut: laid behind the rear tyre as you ride, nearly unbroken, wider where the rear was sliding, broken where you were in the air, in the violet; the last 30 m of it kept, and a crash keeps it until you're put back at the flag.

The bolts they replaced (ruts.ts, kept behind ruts=bolts) were drawn as bolts, not stripes: chains of straight strokes with breaks between them, each a thin dark wedge (the track's shade, nearly charcoal) that comes to a point at its uphill end, toward the eye, and is cut off blunt and slanted at its downhill end. A stroke kinks sideways where the surface bends (a rock step's edge, a roller's crest or trough) and every five metres or so between, so each lies on one plane of the road and takes that plane's light: the ruts are what describes the road's rise and fall. Two lines run down the road, swinging in toward the inside of a bend; where they come close they merge, and part again; now and then a third splits off one, runs its own way and rejoins it. They run on the road, the rollers and a landing deck, not on a ramp or over a gap. Near the eye they stream past as speed; further off fewer are drawn, and past about 60 m none, so the far road is one pale field. They're built each frame round the rider, not into the world.

With them, your own track is the same mark, fresh and a shade darker: strokes laid behind the rear tyre as you ride, a little kinked at each joint, wider where the rear was sliding, broken where you were in the air, the last 30 m of it kept. A crash keeps it until you're put back at the flag.

Nothing fights in depth. The ground under the road sinks away from it (0.15 m at its edges, 0.45 m under its middle), so the two never lie in one plane however the road's roughness and the 4 m between the ground's sections fall; what's laid on the ground (the road, its ruts and gouges, the rider's shadow) is drawn a hair toward the eye in depth; and the eye's near plane is 0.6 m (it was 0.3), which doubles the depth's precision everywhere. node cells/lab/devtools/switchback-zfight.mjs [query …] finds what's left (the eye held where it settles, hold): a held frame drawn with every face's depth, and nothing else, nudged a few steps every other frame (zjit); what changes between the frames is fighting.

Speed, drawn

Motion is drawn as vector shapes on a canvas over the world, never as blurred pixels, and each colour has one job, so the layer reads like a gauge (and the sound says the same):

Painted (paint=1, paint.ts)

Painted is the default look; SETTINGS › LOOK switches between PAINTED and CUT (the flat facets), kept in this browser, and paint=0|1 sets it for one page.

An experiment in drawing the mountain as paint, after looking closely at a brush-shader snowboard prototype (Brush Rush) and its sibling (Paris Freestyle). Everything you see is a brush stroke on paper: the sky, the ranges, the mountain, the road, the fence, the pines, the flags, the rider and its shadow. Nothing is underpainted: the facets are still built, but only drawn into the depth, for what hides what.

The marks come from an atlas of sixteen brush stamps made when the page loads: flats, rounds, a dab, dry flats running out, a long flat, flicks (heavy at the start, whipped thin, curving), impasto (a few thick bristles, deep ridges, ragged edges), a scumble (dragged dry over the paper's tooth), a wash (soft-edged, smooth), a fan (bristles splayed), a palette knife (flat, hard-edged, cut on a slant, paint ridged at its sides) and a rake. Each is a brush of bristles that clump (bands of their own widths), every bristle with its own load of paint, touching down and lifting a little apart from the rest, running dry along the stroke, and piling paint where it lifts. Each subject has its own brushes: the road flats and the knife; the snow rounds, dabs, washes, scumbles, fans and flicks; the rock dry flats, impasto, the knife and the rake; the far ranges long flats and washes. And no two strokes are alike: each a little lighter or darker, warmer or cooler. They.re drawn instanced, blended (premultiplied) in a fixed order, far chunks first.

Cost: tens of thousands of strokes; a chunk's take about 7 ms to place as it's built; what moves (the rider, its shadow, the flags, the ruts) is re-painted on the CPU each frame. Untried on a phone.

Title, menu, modes, score (score.ts)

It opens on its title, the sim's own rider showing off on the mountain behind a veil of the sky's blue: flicking into kinks so the rear steps out, and at each ramp choosing what the flight will hold (on the run-in it flies the flight forward from the lip against the ground to see how long it'll be up and what it'll come down on, and picks what fits: a backflip, pulled up the ramp as hard as that flight needs and trimmed in the air; one of the body's tricks, or two strung together on a long flight, let go as soon as the air left is only enough to get back on; a whip; or nothing; it uses only the player's own inputs, so what it lands, you can). Pick a mode (THREE LIVES to begin with) and RIDE (which starts the sound too: browsers only start it from a tap), or look at the LEADERBOARD:

Each mode keeps its best on each mountain (in this browser), shown under the mode; a run that beats it gets a gold card, A NEW BEST.

Signed bests and the leaderboard (sign.ts): a new best goes up on its mode's board, and the card asks SIGN IT? over a blank with a line and a cross, like an autograph book: no name typed in, just a gesture signed with a finger, a pen or the mouse. The pad keeps the strokes as they're made, with their timing (each point in thousandths of the pad's height, so the shape holds whatever box draws it, and hundredths of a second from the first touch), and puts them to the run on the board stroke by stroke. Leave it blank and the run stays unsigned; CLEAR to start over. The ink is a pen's: heavier where the hand went slowly, finer where it was quick.

LEADERBOARD, under RIDE on the title: a mode's top ten (each new best, on any mountain), with the place, the autograph, the score (a time trial's by the clock) and the mountain and day. Every board starts with a PAR run on it, signed by Claude: RUN 8,000, THREE LIVES 10,000, TIME TRIAL 1:45, ENDLESS 20,000. They're a tidy ride with a few tricks: the showing-off rider scores 12–18k over the 3 km in about 90 s, and around 40k in five minutes of ENDLESS, so PAR is well inside what can be done, for the humans. The mode's line on the title gives its PAR, and a run that beats it says PAR BEATEN on its card. Each signature is written out again as it was signed, one after another down the board, the one just signed in orange. It's kept in this browser: the lab has no shared store yet, so it's your own board of your own bests. Bests kept before there was a board start it, unsigned.

Autographs by hand (hand.ts): the built-in signatures aren't set in a font. They're written by a hand: each letter a few points the pen passes through, in a quick cursive; a word one stroke where its letters join (the pen lifted before a c, which joined into reads as an e, and for figures and marks); the dots and crossings after the word; the whole slanted, its baseline drifting, its letters varying a little; then timed as a hand moves, slow round the turns and quick down the straights. Out come the same strokes the pad keeps, so they ink and write themselves out just as a player's signature does. Two so far: c15r @ parc.land, written across the logo in marker each time the title comes up (a commission), and Claude, the e's tail carried round and back under the name, on the PAR runs.

The score takes the place of the speed (the speed layer shows that): big, top right (in a time trial, the clock), under it how the run's going (the kilometres of the three, the lives left, or how far), and the combo pending. Points come from riding well:

The combo: each trick adds its points to a pool; each move after the first (a flight, a slide) lifts the multiplier half a step, to ×4. It banks (pool × multiplier into the score, with a little run of notes) once you've ridden a couple of seconds on the ground without another trick, or at a checkpoint; a fall before then wipes it. A clean 3 km run without tricks scores about 6,000; one showing off, flips, whips and the body's tricks strung together, half as much again and more (often three times).

The menu (the two bars top left, or Esc) pauses a run: CARRY ON, START AGAIN, FINISH (endless), QUIT (back to the title). SETTINGS › opens the settings, kept in this browser:

Sound (audio.ts)

All made in the page (WebAudio, no files):

Moods (mood=gold|mist|autumn|moon, a flag for now)

The same painting in another light, after Astra's art-direction studies (client/switchback/mood.ts): gold (golden hour: apricot snow against plum cliffs, a warm horizon under a violet sky, the road kept cream so the light doesn't compete with the rider), mist (a cold cloud: teal greys, the far off mostly lost in haze, the rider's orange the one warm thing), autumn (lower slopes: limestone and scree, ochre grass, green-grey ranges with snow only high up) and moon (a silver road against indigo). A mood is colours only, no new strokes: each material's four bands from lit to deep shade, the sky's horizon, top and pale strokes, the clouds lit and shaded, how strongly the far off is hazed toward the horizon, the four steps the near ground's distance takes toward the air's colour (they were always blue), and the speed layer's colours (the air off the rider, the grit, what a landing, a wall or a crash throws up); the rider, the jacket and the fence keep their own. A mood also sets the light, not only the colours (after Astra's critique, that the first moods changed the colours more than the light): the sun's direction (gold's low and from the side), how far its bands are pushed toward shade (gold keeps the warmest colours for the faces turned to the sun and most of the cliff cool and dark; night lets darkness into the road itself, mid-blue with silver where it's lit), how much distance flattens light and shade toward a thing's middle and thins its small strokes, the survivors broader, so the big shapes outlast the detail (strongest in mist, where the far ranges are swallowed and only fragments show), and the trees, posts and boards (no longer an absolute black). The whites are capped by mood. mood=cycle runs through them all, the day, gold, mist, autumn, moon and back, each held eight seconds and blended into the next over five (palette, sky, light, haze and the speed layer together), lettering each as it arrives: for judging the transitions before moods are laid along the course. Next: moods by place along the course (a clear summit, a cloud belt, warmer grassy slopes below), light, atmosphere and terrain changing separately, and for autumn, less snow and marks for grass.

Course regions (mood=course, a flag for now)

One descent with three things changing, each tied to what it belongs to (client/switchback/regions.ts): light by how far down the course you are, across the whole scene, keyed to the station (so a respawn has the light that belongs there): the clear day at the top, turning to autumn's light below the cloud, toward golden hour further down. Atmosphere by altitude: a belt of cloud about 140 m deep at a seeded place partway down (1–1.5 km), the cloud along the line from the eye to each stroke taken by how much of that line lies in the belt's heights, so above it the valley lies under a sea of cloud and the far ranges rise out of it, inside it the air closes in to tens of metres, and below it it's a grey ceiling. Terrain by place, built into the ground as it's laid: below a snowline under the belt the snow's flats become grass, patchily round the line, the road's drifts dwindle and the pines thicken.

Painted callouts

A trick, a checkpoint or a wipe-out is lettered into the picture (ink=0 for the type instead) in brushed capitals (client/switchback/callout.ts), drawn after the game's own title (a heavy grotesque set tight): broad letters, strokes about a fifth of their height, barely slanted, each letter a touch off its line; a cap height about a fifteenth of the picture, so it's a callout, not a banner. Each letter (A–Z, 0–9, a few marks) is a few strokes laid in the order a painter lays them, and a round letter's bowl or an S is one stroke: the painter's own brush stamp bent along it (Brush2D.along, the stamp cut into thin slices along its length, each laid where it falls on the curve), so its bristles follow the bend. Under each stroke a thin solid core, so the letter holds its shape while its edges are the bristles' own, ragged as the scenery's strokes are; and, as the scenery's, no two strokes the same colour (the snow's creams, the fence's oranges, a few a step darker). All the letters are laid at once, each a touch after the one before, a letter's strokes one after another quickly (written strictly in order, a long callout took too long to read); held, then painted out: each stroke taken up again the way it was laid, its start drawn along after it to its end, the letters a touch apart as they came (no fade: it's paint, laid and lifted); cream over an orange stroke a little offset (the type's own orange shadow). It's drawn in the speed layer's canvas, so it's in a REC or EXPORT video; the type is kept, unseen, for screen readers. inktext=<words> letters those words every two seconds, for looking at it. (Tried first: the autograph experiment's joined hand, too quiet and personal for a shout at speed; then thin slanted sign-painter capitals built from straight brush pieces, whose round letters broke into joints.)

Video

Three ways to make a video of a run (client/switchback/rec.ts):

(The offline, fixed-step, in-page export is an idea seen in a sibling project's exporter, written here our own way.)

Flags

paint=0|1 the look for this page (painted is the default, and a setting): everything painted in brush strokes, laid by a paint front ahead of you (stretch=0…2: how far they stretch along their motion; front=700,110: how far ahead the masses and the detail are laid) · seed= the mountain · mode=run|lives|time|endless the mode for this page (THREE LIVES unless chosen) · auto the rider rides itself (auto=tricks showing off, as on the title), a run like yours in the page's mode: scored, its tricks called, its lives or kilometres shown, ended as the mode ends with its card, but never kept on your board (a touch takes over, and the run still isn't kept; AGAIN rides the sim's run again) · (any flag below skips the title) · fx=0 no speed layer · fog=0 no distance fade (both for judging a frame) · rider=sil|facets, whip=, world=0 the rider studies (above) · t= start that many seconds down the run (ridden there by the auto rider) · still hold the frame · preview no HUD.

Tests

node cells/lab/devtools/switchback-run.mjs [seconds] [seeds…] rides the auto rider down seeds 1–3 for three minutes with no page (few crashes, kickers cleared, pace held), and checks that hands off, nothing steers for you: the bike leaves the line at the first real bend; the air's tricks: a whip held a moment off a big ramp swings out and comes back and lands, a no hander held into the landing is a crash, held a while and let go in time it lands, and over the crests' little airs full steering does nothing and a superman asked is refused, never a crash; habits that mustn't crash a straight landing (the throttle held in the air, braking into a ramp, flat out all the way); the gestures: each line by its eight directions, each loop by its way round, a big slow loop not mistaken for lines, a line strung into a loop, a short scribble nothing; and the pull: pulling on every ramp with no trim crashes, and the throttle held open is faster than left alone. node cells/lab/devtools/switchback-shot.mjs [query…] renders pinned moments at a landscape and a phone size beside the target, in devtools/out/switchback-board.png. It also measures the jumps by size (airtime at the run's own pace, a hop about a second up to a booter over three) and rides the showing-off rider down three seeds (its flips, whips and slides, and what it lands). And it scores a 3 km run ridden plainly against one showing off (tricks are worth riding for), and checks a fall wipes the combo pending. Last, the board, in a stand-in for the browser's storage: each has its signed PAR (never kept with the player's runs), it starts from the bests kept before it, a new best goes up where it places and can be signed and unsigned, a lesser run is left off, time trials go by the clock, and ten are kept; and the hand's autographs come out whole (strokes in order, time going on, written in a few seconds).

Pictures: node cells/lab/views.mjs switchback makes the README's pictures from client/switchback/views.mjs (each static/switchback/v-<name>.jpg, the whole set in static/switchback/views.md): most held moments of the sim's run (t=…&still&preview), the run and its card caught as they happen.

Every picture (18)

Riding

A run

Painted

The bike and rider

The road

Speed, drawn