← labopen squishy →

Squishy

A third-person platformer in which you are a dumpling: a steamed one, of dough, with a face; from level 13 (and, once you've been there, by the word at the bottom, anywhere) a clear pink jelly squishy toy of one, full of glitter, with a pointed tip. You don't walk: you flick. Take hold of the dumpling itself, drag back and let go, as with a slingshot, and it flies the other way, as hard as you pulled. Touch anywhere else and you're moving the camera. Through a kitchen, place by place, to the golden steamer: home. First the preparation table, a place laid out as it is (a spoon to land in, a bench with a towel thrown over it, butter melted across the wood); then the counter by the window (a loaf, a buttered tray, a bread bin, a shelf you climb up to by its towel); then the sink (a sponge, soap bubbles, the drainer, the dish rack, and over the water to the sill); then the stovetop, and the whole kitchen.

It opens on its title: its name in soft dough letters over the first place, the dumpling sat on its cloth and the jelly beside it (still to come, a treat for later), both turned to you. They're there to play with: take hold of either and pull, and it stretches after your finger, as far as it'll go, and springs back when you let go; tap one and it dents and wobbles. They don't go anywhere: the title is where to feel how each of them gives. Left alone a while, now and then one of them hops. New Game starts at the beginning; Continue, once you've got somewhere, where you left off; Settings has the sound, which dumpling (once the jelly's come), and any level you've reached to start at (a level's open once the one before it's been got home; the jelly's yours once the sink's last level, 12, has been). ?lab opens everything, with a level back and on, and the dumpling either way, at the foot of the glass. In play, the word menu at the bottom pauses the level behind the menu (nothing moves, the clock stops): Resume goes back to it, Settings changes apply when you do, and Leave the level goes to the title. (A link to a level, ?level=3, goes straight to it.)

Settings also has the aim, on a continuum: easy, the arc (dots along the flick, all the way) and the ring where it'll land; normal, the arc only, strong where it leaves and fading to nothing a little past its top, the way it's going and how high but not where it ends (the camera still swings to take in where it'll come down); hard, neither, by eye. Default goes as you go: easy to level 6, normal to 20, then hard (?aim= the same). And after a fall: back on the last top you stood on (the default), or back where you made your last jump from, flicked, pushed or poked (?reset=jump), so a hard hop's tried again from where it was tried; wherever that was, hanging from a rail or stuck to a side too; but put back there three times within twenty seconds, the next fall's back to the last top, so somewhere it can't hold, or a jump it can't make, isn't tried for ever. A double tap on the time, top right, copies the flick log kept on this device (every flick: where from, as dragged, the aim it had, where it ended) to the clipboard as JSON, to paste wherever it's wanted. Put back onto a lid, it waits for a quiet second on it, not into the rattle. A level's records (time, falls, score) are kept for each aim, easy, normal and hard, since a run with the ring isn't one without it (those from before count as easy); the card at home says which. And benches: every bench, each one thing to try over and over, listed with a line on what it is (?bench=breakfast, jelly, puddings, breads, coats, supports, look); from a bench, menu comes back to the title.

TouchMouse and keys
flicktake hold of it, drag back (toward you, or to the side) and let gothe same
spinhold still, then snap and let go: on, toward the dumpling, for topspin; back, for backspinthe same
poketap it: it dents where you tapped, and rolls away from your fingerclick it
rollpush it on, up the glass, the way you want it to go: it rolls that way, as hard as you pushed (dots along what it's on show how far; red, if it'd roll off an edge)the same
climbstuck to a wall: take hold, aim into the wall and let gothe same
turn the camera, tilt itdrag anywhere off the dumpling (or two fingers)the same, or ← →
come closepinchthe wheel
start the level again↺, under the clockR

Where you take hold of it is where it's held: the dough under your finger is drawn out toward it as you pull, stretching, the rest of it hanging back, and it winds up, squeezed along the way it's going with its eyes shut tight. (It's picked by its skin as you see it: the nearest bit of it under your finger, the side facing you, with a little room round it for a fingertip.) A dotted arc shows where its middle will go, ending in a ring where it lands: green for a top further on, cream for one already reached, red for nowhere (the floor). The band on the glass shows how hard. Its middle flies a true parabola, so the arc is exact up to where it touches something. You can only flick from something, but a flick let go in the air waits a moment (a third of a second) and goes as it touches.

A hold on the dumpling is one gesture or the other: once the finger's gone a little way (18 px), it's a pull (a flick) or a push (a roll), by which way it went first, and it stays that till you let go — a pull can come round to aim any way, toward you even, without turning into a push. Back into the middle where it began, it's undecided again. Let go before it's gone that far, soon, and it's a poke.

A finger lifted flicks just as aimed, still or moving: a fast pull let go of on the move is a plain flick, from where you let go. Spin is a snap: hold still a moment (a tenth of a second), then snap away and let go, quickly (within about a sixth of a second, 25 px or more, fast). The flick is from where you held, so the snap doesn't change where it goes; the snap is its spin. Snapped on, toward the dumpling, the way it will fly: topspin — it spins forward in the air and rolls on when it lands, the grip eased. Snapped back, further from it: backspin — it spins back and bites where it lands and stays, even on butter. The harder the snap, the more spin. A word at the bottom says which you gave it.

A tap on it is a poke: it dents where you touched it, the way your finger went into the glass, and rolls away from it, a hand's width and no more, with hardly a hop. Poked at its back, it rolls on; poked from above, it only squashes and wobbles. For creeping to an edge, off a lid, or back to the middle of a top.

Dragging off the dumpling turns the camera round it and tilts it, and it stays where you put it until your next flick, when it goes back to following.

Stuck to a wall

Everything's side holds it a little, as what it's made of does, and lets go as it does: glass, tin, glazed porcelain and steel hardly at all (only the dumpling's own tack, a quarter of a second, and it slides off); wood, bamboo and a cookbook's cloth a second or so, creeping down a few centimetres a second; terracotta and a loaf's crust a little longer; a sponge, soft, longest; a towel's linen until its grip tires; honey for good, oozing down slowly. Only against a side: what it lands on, it slides on as ever. And only if it isn't skidding past fast: a graze at speed carries on.

Stuck to something's side (honey's splat, or a towel's grip) it isn't held up stiff: it hangs. Held at the patch that's stuck, the rest of it goes limp and droops, slumping down off the patch, the dough longer (half as tall again as it stands) and the jelly less so; let go, it gathers itself back. From there you can jump off, aiming away from the wall, or climb: aim into the wall, and it pushes up the wall, sliding, hardly gripping, and once its middle clears the top, over and onto it (a mantle). The arc shows that too, up the wall and over to where it'll land, so how hard is yours to judge: too soft and it slides back down to where it was; too hard and it goes over and off the far side.

Hung from a rail

Some things are hung from, not landed on: a steel rail on the wall for the utensils (a ladle and a whisk on hooks at its near end), a window's sill, low on the wall, its rounded lip, a little oven's door handle on the counter. Fly at one and you catch it, and hang (dough droops more than jelly). Then prod your way along it: a tap on the dumpling shimmies it a hand's width along, away from the side you tapped; a push along it, further, the harder you push. It stops short of either end, never off it. From its far end, flick off on to the next spot; anywhere along it, you can. Buttered, you can't hold on. Fall after you've caught one and you're put back hanging from it where you caught it.

Any edge holds a little, too: land half off a top and the dumpling drapes over its edge, gripping its top and its side with its own tack (which tires, on a side). A tap there shuffles it along the edge the same way, away from where you tapped. But clinging isn't standing: only on its feet on a top (its middle over what of it's on the top, and above it), or hanging from a rail that's a stop, does a spot count, as the spot you're put back on after a fall, or as home.

Fall and it's a splat, and back to the last spot you stood on. There's no safe ground anywhere: every place is made of stations, things standing at their own sizes with a spot or two up on each, and the table's or the counter's top beneath them is the fall, as the sink's water is. The clock runs until you're home, the count of falls beside it. Home, a card shows how it went: the time, the falls, the tops you stood on, and a score from them (100 a top, a bonus for every tenth of a second under par, 8 s a hop; 60 off a fall, 150 for none). Each level keeps its best score, and its best time and fewest falls each in their own right; beat the best score and the card's gold, a new best, with a little fanfare, what you beat starred and what it was beside it. A level's opening card says its best. Each level opens with its place's name.

Every level is laid fresh from its own seed by its place, four levels to a place: 1 to 4, The Preparation Table; 5 to 8, The Counter by the Window; 9 to 12, The Sink; 13 to 16, The Stovetop; from 17 on, the whole kitchen, mixed. A place is its room, what things stand on there, how it starts and ends, and its pieces, from which each level is laid (kitchen.ts): a run of them, each where the last left off, every hop in it checked as it's laid, the next piece tried again if it won't do. A place's first level brings in what it's known by; each later one brings in one new thing, early, and the rest come from the place's own pool, a piece longer each level. No two levels are laid alike, and the next level in a place isn't the last again.

The Preparation Table

A wooden table in the middle of a room, its top the fall. You start on a folded cloth on a stack of cookbooks. Its pieces: a ramekin, and a wooden spoon laid from it up onto a painted tin bench (land in the spoon's bowl, it catches you, and go up its handle), a tea towel thrown over one end of the bench and hanging down both sides (linen grips, and a throw at its hanging side clings a moment or two); the butter dish (its butter slips, and stays on you); the floury paddle board laid across two jars or on cookbooks (flour gives a buttered dumpling its grip back); a chopping board across jars; a plate tipped up on a teacup on a cake tin (a tilted top, glazed, a little slippery); plates, tea tins and steamers on stools, crates, cookbooks and upturned bowls; later a mango pudding, a lazy Susan, a tiered stand. The first level is the spoon, the butter and the paddle; the next brings the tipped plate; then the pudding; then the lazy Susan. Home is the golden steamer, on something.

The spoon, the towel and the tipped plate are sheets: surfaces made of triangles, with a thickness under them, met exactly as they're drawn. The table, the bench, the board and the tins are the solid shapes everything else is made of.

The Counter by the Window

A butcher-block counter against a tiled wall with windows in it, the counter the fall. You start on a folded cloth on a biscuit tin. Its pieces: bread in a woven bread basket on two flour canisters (a boule, cross-cut and floured in its proving basket's rings; a bloomer, slashed across; a flat floury ciabatta; or three glazed rolls with sesame on them; beside a bloomer or a ciabatta, sometimes a baguette, its scores overlapping down it: each soft under its crust, a dead jelly that gives and doesn't throw you, and crumby; the basket floured inside, so where you land decides what you pick up, and its rim catches a bounce); a baking tray on a rack or a crate, butter melted across one corner of it, a lip all round to stop a slide; a tall cake stand, its plate sticky with hundreds and thousands; a tiered stand; things on cake stands and cookbooks; later a konjac jelly on something to bounce on, and two jellies in a row. Most of its levels end, and the first always does, at the bread bin, deep, out from the wall: above it, out of reach of any flick (a flick goes off at the one angle, so from below a high shelf by a wall, the arc meets the wall first), a shelf, a tea towel hung over its front edge: flick at the towel, it holds you, and climb up it and over onto the shelf. Fall off the towel and you're back on the bread bin, to try again. Home is then the golden steamer on the window sill along from it, a knife block on the counter below. Every hop is checked as it's laid, the towel's too: a flick from the bread bin that lands against the towel, low enough to hold and high enough that a climb from there gets up and over.

The Sink

The counter round a steel sink, the windows over it; the counter's the fall, and so's the water. You start on a folded dishcloth on an upturned pudding basin. Its pieces: a sponge up on something (soft, a dead jelly: it soaks up a landing); a soap dish up on something, foam on it in clusters, big bubbles with smaller round them, its middle clear: clear bubbles that bounce you and then pop (a hard landing beside one, or going by close and fast, knocks it loose to float off and pop a few seconds later, or when it's touched again), growing back a few seconds after; a two-tier dish rack, its steel drip tray grooved and sloping, wet, so it slips, and above it the wire rack, its rails to land across, two plates stood up at its far end; things on upturned bowls and wire racks; later a mango pudding, a bare rack, a konjac, a tiered stand. Most of its levels end, and the first always does, across the sink, at the dishcloth hung over the window sill's edge toward the water: it holds you, and you climb it onto the sill; home along the sill.

The Breakfast Counter

?bench=breakfast: a place made of stations. There's no safe ground in it: every spot is well above the counter, and the counter is the fall (touch it and you're back on the last spot you stood on). Each station is a thing standing on the counter at its own size, with a spot to land on; between one and the next there's always a gap.

From a tea towel folded on the toaster, two ways: down to a roasting tray on a cooling rack, buttered all along (it slides; its deep lip stops you), then up onto a konjac jelly on a cake tin (it throws you up); or across to the bread bin, enamel, sure. They meet at a taller tin, its plate sticky with hundreds and thousands; then the tallest, a stack of pancakes on it with icing sugar on top (which gives a buttered landing its grip back); then the wall shelf, a jam jar on it to keep clear of; and home, the golden steamer, on the shelf above and along (nothing overhangs the way). No rim on home: come in badly and you go off.

Every way is made sure of (hop, from each spot to each it leads to), and played through: both dumplings get home both ways. There's no count of spots here, only the clock; home, it says the way you came, and keeps it, and the panel at the top left shows the last few ways taken and how long each took (tap it to fold it). A place says, for each spot, which to make for next (for the camera's look ahead and for playing itself), and the way the opening view goes over it.

The tops

The kitchen, from the stovetop on

From the stovetop on, a level is a run along a counter (the hob, on the stove) against a tiled wall with windows in it, made of pieces, each laid where the last left off: one thing at the height it stands, on what it stands on (below); a tiered cake stand, its upper plate to land on and its lower a ledge under it; a cooling rack with nothing on it, to land across its wires; a towel and a shelf (a bread bin out from the wall, the shelf above it out of reach of any flick, a towel hung over its edge to land against and climb); two jellies in a row, a mango pudding and a konjac, each on something, to bounce across; a baking tray on a rack, buttered in one corner; a folded cloth on cookbooks or a stool, where it starts. As in the sets, there's no safe ground: the counter's well below every top, and to touch it is to fall. What a level brings in (the honey jar on the stove's second level, the lids on its third, the towel on its fourth) comes early in it, for sure; no level has more than two climbs or two jars.

Now and then, from a place's second level on and all through the whole kitchen, the way parts: from one top, the sure way runs along the front of the counter, two broad tops one after the other (a tray, a rack, steamers on something, a loaf); and the short way along the back, one long hop, onto a small top (a tin, a cake stand, a spoon), to where the two meet again. Or the short way's a springboard: a konjac on a narrow pedestal straight on along the counter, bounced off on to where they meet, in line with it (a bounce keeps its heading, and the counter's not deep enough for one to slant), and the sure way goes round it by one broad top, to the back or the front. Both are made sure of, every way into every top, so wherever you've stood there's a way on home; and the short way's harder (played for real, most of its flicks make it, fewer than the sure way's). The camera, the autopilot and the par go the sure way; the short way's yours to find.

And from a place's third level on, and in the whole kitchen, a climb: two or three tops one after another up in the middle of the room, 35 to 45 cm off the counter, about as high as the windows' sills, on taller things (stools on cookbooks, crates stacked, tins on tins), a hop up to the first and down again after; between the counter's tops and the shelves on the wall, a middle height to be at.

A springboard (a konjac at a fork; the Breakfast Counter's, on its tall tin, up to the cake stand) is made sure of by bouncing off it onto the top after it, the aim's dots showing the bounce; stop on it instead and it's a top like any other, and on from it.

A level's laid whole or not at all: a piece that won't go anywhere, or no home at the end, and that layout's dropped and the level laid afresh (a dozen times; then plainly, steamers on things, which always fit); never a level short of a piece. Each says how it was laid (made), and the same level can be laid from another seed, to try many. Off a honey jar, a hop's made sure of from round either side of where it's landed against, and lower, as a splat never sticks just so; onto one, only at its front.

How well they hold, played for real (node cells/lab/devtools/squishy-seeds.mjs): for each level and seed, whether every hop's arc lands, whether the autopilot gets home in the real simulation, and for each hop, from where it settles, its own flick and others a little stronger, weaker and to either side, each played out to rest: how many end stood on the next top, how much stronger or weaker straight on still does, and where the rest end (fallen, back where they left, further on, or nowhere a top is: draped on an edge, clinging to a side). A hop whose own flick doesn't hold is unwitnessed; one where under half do, fragile. Its table goes to devtools/out/seeds.md.

What things stand on

A kitchen's things aren't stood on towers of tins. Each top stands on something with a shape of its own, from a small vocabulary (supports.ts), each built from what it stands on up to its seat:

What's met is kept simple and what's drawn is what it is; but where it would be played with, what's met is what's drawn: a stool's legs and rungs, a cake stand's thin neck, a rack's wires, an upturned bowl's shoulders (a sheet, so you slide off them). A support too short of itself for where it's wanted is stood on another: a bowl on a crate, a rack on cookbooks. Any top can go on any support that can hold it (a steamer on a stool or a rack, a pudding on a cake stand, the butter dish on a crate, a pan on a board across jars), and now and then it's set off to one side of a broader seat, the rest of the seat a lower ledge. The room has its say: on the stove, crates, racks, boards across jars, tins, little stools; past it, anything. ?bench=supports is one of each, in a run over a table.

The stovetop

From level 13 the course is on the hob: brushed steel, burners under the steamers, the tiles behind. A pot, a pan or a jar is the size it is, and where it's wanted higher it stands on a stand: a wooden board on a stack of tea tins, now and then a celadon jar among them.

Every level is made from its number, so level 8 is always the same level, and every hop in it is checked when it's made: from the middle of each top there is a flick that lands on the next; onto a lid, at some moment of its cycle; from a honey jar, from a little lower on it too, and on forward, away from the jar; up to a shelf, a flick against its towel and a climb from there. Playing itself, it waits out a lid's rattle before it flicks from it or onto it.

Jellies

A jelly gives, and what it does with a landing is set by what it should do, not left to come out of how it wobbles. The dumpling sinks into a jelly's top as into a bed: a damped spring under the whole of it that firms up the further in it goes (k x (1 + (x/x0)²) − c v), measured on its middle from where its middle was as its foot touched (so its own squash, or tack drawing its foot down, can't pump it). Each jelly is three numbers for that: how much of a landing it gives back (its restitution), how far into it (of its height) a gentle landing goes (from 10 cm), and how far a hard one (from 50 cm). From those, the spring and how it firms; and it's damped as stiff as it is where it is, so it gives back as much of a hard landing as of a gentle one. Of a gentle landing (from under about 20 cm) it gives back less, so a bouncing dumpling goes boing, boing, and settles. It pushes it out of its top as its top is there (dented, domed), and it's glossy: it holds the dumpling from sliding only as much as its slipperiness and the push allow (a konjac hardly at all, a mango pudding a little more, a panna cotta, matt, more again; bread and a sponge as anything does), so a slanting landing skids and bounces on, and what its grip does take off the slide sets the dumpling rolling, so later bounces lose less. Land steep to stay; land slanting on a konjac and it carries you on, maybe off its far side, maybe on to the next; catch its rounded near shoulder and it throws you back the way you came. The aim's dots follow it all: up, on, and down again, bounce after bounce, to where it settles; the autopilot and every hop laid are made sure of the same way, and onto a jelly only by a band of strengths that holds, not one lucky strength among the skids. A flick off a jelly goes as aimed: it lets go, and doesn't throw it harder for what it had sunk in.

Its top is a membrane: nodes on rings and spokes out from its middle, each held to its height by a spring, damped, and drawn toward its neighbours. While the dumpling's in it, the top is held to the dumpling's foot, flat under it and falling away round it; when it leaves, it's let go with some of the speed it had, and wobbles on and ripples.

Each is lit as a jelly is: glowing through, brightest where it's thinnest as seen (its edges), the mango pudding flecked with bits of fruit under its caramel top, the konjac seen partly through, a few small bubbles held in it. Three kinds, by how they give: a panna cotta (cream, under a berry coulis) is soft and keeps a landing (it gives back a fifth of it, or nothing of a gentle one); a mango pudding gives most of it back (about three quarters: from 25 cm, up 13); a konjac jelly (clear pink) is firm and gives nearly all of it back (about nine tenths: from 25 cm, up 21; from 40, up 33), dented a centimetre and a half by a gentle landing and three by a hard one. A loaf and a sponge are soft and dead. The aiming line, landing on a jelly, goes on up in fainter dots as high as it'll be thrown.

?bench=jelly is the jelly bench: the three of them in a row on a table, between the cloth and home, and a panel to try them: pick one, change how much it gives back, how far in a gentle and a hard landing go, and how its top wobbles, as you watch, and drop the dumpling on it from so high, again and again. node cells/lab/devtools/squishy-drops.mjs measures them: each dumpling, with and without sprinkles, dropped on each from 10, 25 and 50 cm: how long it's in, how fast it comes in and leaves, how high it comes back up and so its restitution, how far in it goes.

What gets on it

Some tops have something on them that comes off on the dumpling where it touches, and stays there, on that part of it, wearing off in time and shaken off by a hard landing; while it's on, it has its say in how it lands:

It's picked up where it touches, and a hard landing into it splashes it up its sides, as far up as it came down hard: set down gently, only its bottom is floured; dropped from a height, most of it. You can see all of it: the flour's dusting, whiter and chalkier than the dough, in clumps, thicker in the creases, butter's yellow sheen, crumbs stuck on in lumps, pepper's specks, the sprinkles' coloured rods, each on the part that touched, riding its wobble. The first of each is named at the bottom when you pick it up.

The dumpling

It is soft for real: a skin of particles in its shape (562 for the jelly's gumdrop, broad on a flat bottom and drawn up into its tip; 450 for the dough's xiaolongbao, twelve pleats twisting up to a knot), held to that shape by shape matching (Müller et al. 2005: each step, the rotation that best fits where the particles are, from Müller, Bender et al.'s 2016 iteration, and the particles drawn back toward the rest shape so turned, partly allowed to stretch). It isn't fitted only as a whole: twelve overlapping patches of it are each fitted on their own as well, and each particle drawn toward a blend of the whole's fit and its patches', so a part of it can bend, droop and dent while the rest keeps its shape. Hanging, it goes limp (its pull back to shape eased, more of it left to the patches), which is the droop. Its volume is kept as a constraint of its own, so a hard landing squashes it wide and flat rather than smaller, and it bulges at the sides. It's stepped ten times a frame (position-based dynamics: move, fit, keep the volume, push out of what it touches, and take the velocities from where everything went).

The two are made differently: the jelly springs back faster and keeps more of each wobble, so a landing squashes it to under half its height and it jiggles back; the dough is slower and deader, and plops.

Where it touches, there's friction (Coulomb, from how hard it was pushed out; it holds where it touches, so it sits on a slope as long as the slope's grip will hold it, on a ramp of 20° or a tipped plate, and slides off a steep one), bounce where the surface has any, and tack: dough is sticky, and the jelly nearly as much, so it holds to what it touches, a wall included for a moment, and the tack tires on a wall so it slides down. A towel's grip lasts longer and tires too, so a throw at the towel hangs a moment or two before it lets go. As it's flicked off something, what it's leaving hardly grips it, for a moment, so an edge can't snag it and tip it over as it goes. Butter has no tack to give. Honey has more than the dumpling's own, and it never tires: a particle that touches honey is held where it touched, the whole body is slowed hard so its momentum doesn't tear it off the patch that's stuck, and each step the rest of it is drawn back up so that it hangs from the patch rather than sagging off it.

Spin is what you gave it at the flick, spent as it lands: with topspin it really rolls, the roll is let live and the grip eased for a moment; with backspin the grip is doubled, the tack quick to hold and the roll killed, so it plants. Its wobble is damped against its moving as one body (its middle's motion and its turning), so it jiggles and settles rather than ringing. On the ground its roll dies and it rights itself like a roly-poly: tipped over, on its side or its head, it rolls back over the edge it's lying on onto its flat bottom, its bottom flat to whatever it's on (a slope's up, not the world's: righted to the world's on a slope, it would crawl down it); a small lean it leaves alone. Sat still, it shuffles round to look at you.

The face is drawn on its rest shape, so it turns, squashes and stretches with it: round eyes with a shine that blink, red cheeks, squeeze shut > < while you wind up, an o in the air, a happy ^ ^ at home.

The kitchen round it

The course is on a counter in a kitchen, not in an empty room. Under the counter, sage-painted cupboards to the floor, a drawer over each door, shaker panels, bar handles, the kick board; over it, on the tiled wall, wall cupboards with tall windows between them, each with its sill and herbs in terracotta pots. At one end of the run, a range: its hob's four burners, its oven door with a window in it and a handle across, a row of knobs, a hood up the wall; at the other, the counter runs on with a microwave on it, then a tall cream fridge, its freezer over it, long handles, magnets. Behind you, against the wall, a kitchen table with a gingham cloth, its chairs pulled up; underfoot, cream and sage checks. At the table, the same kitchen runs along the room's back wall (room.ts).

What's over the counter is solid, as drawn (the same layout makes both): the wall cupboards stop a high arc and can't be clung to, nor the fridge; a window's sill can be landed on, among its pots, though it isn't a top (it's not where you start again from); the microwave, the hood. The aim's dots meet them as the dumpling does, and every hop's laid round them. Where the course has something of its own on the wall (a rail, a little oven, a towel's shelf, a sill), the kitchen leaves that stretch of wall to it.

Now and then a wall cupboard over the course is open shelves instead, cookbooks on them: stood up, spines out, a gap where one's been taken down, a few lying flat at a row's end. Every window sill has a few too, between its pots or at an end, a short row leant on the glass or a little stack; the towel's shelf runs on a little back the way you've come, cookbooks on that end, out of the way on; and home on the sill has a cookbook or two past it. All of them solid: in the way, not landed on. Every cookbook, on a shelf or in a stack something stands on, is one of a catalogue of forty-eight, made up by a grammar out of what the kitchen reads and has looked at (Tanizaki's praise of shadows, Alexander's pattern language and timeless way, Dunlop's grains, Julia Child's mastering, Totoro's neighbour, the animators' squash and stretch, ways of seeing), none quite any of them, each with its author: lettered once in the browser onto an atlas (books.ts), its cloth, its cover (four ways of being a cookbook: foil on cloth, a band, a paperback's blocks of colour, gingham with a label) and its spine, read head to tail. The cover's on top of a stack's top book; the pages' edges, between the boards, on its other sides.

Drawing

Light is worked in linear values: the scene's drawn into a multisampled target of its own, in half floats where the card can draw into them, and tonemapped once, at the end, onto the glass, what's brightest of it (a glint, the sun in glaze, what glows through jelly; not a white plate in the sun) blooming a little first. The jelly sees through to that light, not to finished pixels. A card that can't draw into floats (or ?ldr) draws as before, each thing tonemapped as it's drawn.

As a level's laid, the light its things give each other is baked into it, once: the course is seen from forty-eight ways round, its depth and colour, and each vertex adds up how much of all round it is shut off by what's near it (nearer counts more) and the colour of what does it. So what stands on something sits down into it: the dark under a cake stand's plate and round its foot, between a crate's slats, at the foot of a stack of cookbooks, under a stool; and the light off what's near comes onto it in its colour (the wood's amber up into a plate, a pudding's orange onto its saucer). The room itself (the counter, the table's top, the walls) takes it but shuts nothing off, and its top is drawn in small cells so there's somewhere for it to go. It dims the room's light most, and the sun only where a thing's well shut in. Under the dumpling, a soft dark, and where it's touching, a tighter, darker core as wide as what of it touches, wider as it squashes.

The dumpling knows how thick it is at each point (measured once through its rest shape, along its inward normal) and how stretched or squashed its skin is there now (the skin about each point against at rest). The dough: where it's thin, the sun from behind comes through it warm and milky and the room's light gets into it; squashed, its creases close and darken and less gets through; stretched, it's thinner, milkier, its wet sheen narrower; a broad low steamed sheen and a smaller wetter one over it, not one plastic glint. The jelly: its far side drawn first (how far from the eye, the farthest wherever it's seen), so how thick it is where you look is how thick it is, squashed or stretched: colour taken out by that thickness (pink deepening through its middle, clear at its thin edges), what's seen through it softer the thicker, and three bubbles held in it, set when it was made and going with it, each a bright ring; its glitter turned down, so its depth holds the eye.

Bread is shaped as it was proved and baked: round, a long oval, a flat slab with soft corners, its foot tucked in where it sat, its top domed and its edge rolled over, met as it's drawn. Its crust is golden, deepest on its crown, paler down its side, finely crackled and blistered; its cuts opened as it rose, thin pale gold in them and their edges risen and dark. ?bench=breads sets each out on a board.

How things are pressed shows, from the simulation itself, so it comes and goes with it: the dumpling keeps how hard each point of it is pressed against what it's on (touching; more as it comes in hard or sinks into a jelly's bed; let go of within a tenth of a second as it comes away), and a jelly's top how far each point of it is pressed in or bulged up and how fast it's moving. Pressed, the dough is shut in and darker there, its creases closing the more, its gloss spread flat; the jelly dumpling loses its gloss where it's flat against something, wet against it with no air between. A pudding's top, pressed in, is shut in by the dumpling in it, its gloss spread wider; bulged up round it, thicker, a clear layer's colour denser; moving, a little sheen; and rings spread out from where the dumpling came down, as hard as it came, fading. And anything near the dumpling is shut in by it as by a ball, the more the nearer and the more it faces it, the light that gets in there what's come off the dumpling: a tight contact shadow where it sits, on a cloth, a board, a pudding. ?nodef leaves all this out, to compare. Porcelain is a satin body with a few iron specks fired into it under a clear hard glaze, pooled a little at its rim and over its painted band; enamel, glass fired on steel, is glossier and flat in colour, and chipped only now and then, the steel showing there.

Puddings are set in moulds: each its own, from where it stands, a flan's straight taper, a bell's flare, a drum, a dariole a little in at its top; round, or fluted (rounded ribs), or a flower (petals pinched between), or a square with soft corners; its top's edge rounded over, more or less; domed on top or not. It's met as it's moulded: its side as wide as its mould is so far up and so far round, sloped as it tapers, so a bell's flare is something to slide off and its top's give follows its outline.

And each was set from a recipe, its layers poured one on another, each its own colour and its own clearness (a cream is opaque; a jelly is clear, seen into, deeper low down), meeting crisply or run into each other where they met, a little wavy. A mango pudding is graded mango under caramel run over its edge, or mango on coconut cream; a ring of dark berry jelly, cream and clear pink in a shallow fluted mould; a strawberry slab, clear pink, cream, clear pink, in a square mould, pieces of strawberry set in it and a strawberry on top; a vanilla panna cotta under clear raspberry jelly with whole raspberries in it and three on top, and bubbles; blackcurrant mousse run into white chocolate, a sauce pooled on top and a blackcurrant on it; a clear red jelly in a deep fluted mould with a flat crown; a rainbow of thin stripes in a flower mould, pink hearts piped round its white top; a panna cotta under a coulis run over its edge; a konjac pink, or on a lychee-white layer. The panna cottas, the mango puddings and the konjacs each have their own of these. ?bench=puddings sets every recipe out in a row, to look at.

Cloth has no glint, but a soft sheen at a glance, in its own colour; its pattern (the gingham's checks, the towel's weave) and the wood's fine grain fade as they get too small to see, so nothing shimmers far off. The counter's oiled, a faint sheen over it the dry chopping boards haven't; steel is crisper.

?bench=look is a still life to judge all this by (the dumpling on a cloth on cookbooks, a mango pudding on a cake stand, a konjac on a crate, a plate on a stool, the painted bench and its towel; and round them what's live, wet or clear: the honey jar with its runs and pool, the soap dish's bubbles, a buttered tray, the butter dish, a pot and its lid, a pan, a loaf, a sponge); ?light=morning|noon|shade sets the light (low and warm, the default; high and white; the sun off the window, the room's light only); ?view=ex,ey,ez,tx,ty,tz holds the camera; ?bakeview shows only what's baked (?bakeview=colour, its colour too), ?nobake leaves it out; ?perf shows how long a frame takes, the card's own time for it where it'll say, what it's drawing into, and how long the bake took.

WebGL2. The light is a window's: a soft shadow map (the shadow sharper near what casts it), the course in its materials (woven bamboo with its rims, glazed porcelain, a pudding with a caramel top, lacquer, painted tins, a chopping board's grain, chopsticks with lacquered ends), the tiled wall with its windows behind (subway tiles in a brick bond, a warm white glaze, pale grout, the room's light bounced up onto them), steam in the air, in wisps that thin out at their edges and never come close enough to blur the glass.

The jelly is seen through. What's behind it is copied and drawn again through it, bent as a lens of jelly bends it (refracted, from how far through it the eye looks at each point) and tinted the deeper it goes (red comes through; green and blue are taken), with a little of the light caught inside it, pinker at its thin rim and glowing where the window is behind it. In it, a thousand flakes of glitter, each carried by the four nearest particles of the skin so they squash and wobble with it, each a tiny mirror turned its own way: one flashes when it catches the window, as the jelly turns or jiggles. Over it all its gloss (the room in it, the window sharp) and the printed face. Where the window's light comes through it to the ground, a pink light gathers in its shadow.

The dough is lit as dough: thick, the light wrapping round it and glowing a little through its thin edges, darker in its pleats, faintly floury, with a dark under it on whatever it's over.

A level, the first time it's played, opens on the way over it: from high over home, back along the course top by top, coming down to where the dumpling sits at the start, so you've seen where you're going before you go (a touch, or a key, cuts it short; started over, it doesn't come again; the clock waits for it).

Home, in every level, is the golden steamer, steam always rising from it, and on it a paper serviette folded square, white with a red printed border and a peach in one corner: small enough to lie within the top (none of it overhangs, so it catches nothing), and paper, so it grips a little.

The camera follows easily, but if the dumpling nears the edge of the glass, or leaves it, the camera catches up at once. Winding up a flick (pulled back: a drag that goes up the glass is a push, a roll, not a flick), it follows where it'll land: it looks between the dumpling and the landing and stands back, easing, till both, and the top of the way there, are on the glass. It doesn't turn while you wind up, so the aim under your finger stays put. Sat still on a top, it stands back and looks a little toward the one that comes after that top (the top it's on, not the last it sat on: gone on along the ground past some, it isn't turned back to them; on the ground, or hanging on something, it doesn't look ahead, it only follows), far enough off to have both in view, so you can judge the flick; once it's flown, it comes back in. Along a counter it looks down on the counter more than across it at the wall. Whatever rises between it and the dumpling (a loaf, a jar), anywhere on the glass, is screened: drawn at about half, a fine checker of it there and not, so the dumpling's never lost behind something and the something's never gone; not what it stands on, nor anything lower, and easing in over the first few centimetres in front of it. It never goes behind a wall: if the way out from the dumpling to where the camera would be meets the tiled wall, it comes in short of it, and while it's held in like that it turns back round to the room's side, against a finger turning it too; so turned toward the wall, by mistake or on purpose, it slides along it and comes back round. (The walls run well past the course each way, and high, so it can't go round their ends or over their tops.)

The lids move: they're drawn where the steam has them, with a puff of steam out from under at each jump and a rattle you hear when you're near. The honey jar is glass, drawn after everything else and seen through, the honey in it lit from within.

?level=5 starts a level (1 to 4 the table, 5 to 8 the counter, 9 to 12 the sink, 13 to 16 the stove); ?bench=jelly the jelly bench; ?bench=supports what things stand on; ?bench=coats a row of each thing that comes off on it, to land in; ?skin=dough the dough; ?auto lets it play itself; ?view=ex,ey,ez,tx,ty,tz holds the camera at an eye looking at a point (for a look at a place).

What's seen through

After everything solid, what's seen through is drawn over a copy of the scene: the jelly; the films (butter melted on a top, honey's pool round a jar's foot, its drips); the honey in a jar; the glass; the bubbles. One copy serves the films and the jar's honey; where honey's run down a jar, its drips take a second (the jar's honey first, keeping its depth, so the drips have it behind them); a bubble takes a fresh copy only if something see-through has drawn since. On a phone each copy is a whole screen's worth, so they're kept as few as that.

The skin: how far it stretches, how honey holds

While honey has hold of it, each edge of the dumpling's skin may stretch so far and no further (1.85× for dough, 2.05× for jelly); squashing is free. That's what stops the needles a body stuck to honey used to grow (2–3× before). Only then: everywhere else the body's as it was, which every way through the levels was laid and tested against (with the limit on everywhere, a dough leaving the buttered tray on the breakfast counter missed its next spot every time). A radial cap behind it is a safety net only: tight (1.6×) while honey holds it, loose (1.95×) otherwise, so splats keep their spread (about 1.7). The correction moves the skin, not its speed: fed back as velocity, it kept a body hanging on honey jittering.

Honey holds by spaced sites over the skin, not every point that touches: each a compliant bond, creeping down with the honey, that peels when it's overloaded and can't take again for a moment; a rail's hold is still whole; it oozes down at the honey's own creep (2 cm/s). ?nostrain turns the edge limits off, to compare.

Quality, by frame time

What it's drawn at follows how long frames take. Short of the display's 60 (under about 52 a second, for a second and a half), it steps down: fewer samples smoothing its edges first (4, then 2), then the resolution (to 0.85, 0.72, 0.6 of the screen's), then no smoothing at all. Each step down is a try: if over its next two seconds frames aren't some 7% quicker than before it, what held them back wasn't the drawing (the game's own work, or a display capped at 30, an iPhone saving power), so it goes back, stays, and doesn't try again unless frames get slower still. Quick again, at the display's own rate for 8 s, it steps back up one; a step up that's taken back within ten seconds isn't tried again. A level's first moments, while it's baked and first drawn, aren't counted. ?perf shows where it's got to: frames a second and their time; how much of that is the page's own work (sim: the game's steps and the camera; draw: telling the card what to draw); samples, size, the step and scale (settled, fixed); the level's triangles. ?scale=, ?samples= or ?quality=fixed fix it.

The cost is in shading, not geometry: a level is 15 to 35 thousand triangles; it's the pixels, each of them shaded through the lit, see-through, glowing passes, that make a frame heavy.

Pictures

Every picture here is made by playing the page: node cells/lab/views.mjs squishy (or name some), from the views registered in client/squishy/views.mjs. Each is fast-forwarded (?fast=) and drawn at full size; a flick's taken with the finger still down, or the moment it's off the ground. The whole set is under pictures at the top of this page; here, each is where it's talked about. (The benches: ?bench=jelly, coats, look, breakfast.)

Before a deploy

node cells/lab/devtools/squishy-smoke.mjs (about a minute): the title, the first level of every place (the flythrough cut short, the dumpling at rest on its start, on the screen, able to be flicked) and a bench, each opened and nothing thrown. Then, when the physics or the page has changed, the two below.

Tests

node cells/lab/devtools/squishy.test.mjs: the dumpling and the course on their own, no browser (about 10 minutes: every level played home by the autopilot, both kinds). node cells/lab/devtools/squishy-shot.mjs --test: the page in a browser (about 2 minutes). Without a graphics card a frame takes a second or more, so every page there is fast-forwarded: ?fast=N plays N whole steps of the game (the dumpling, the camera, everything) a drawn frame, drawn small and plain, with a rougher bake and shadow; so what takes a player ten seconds takes the test ten frames. Each check prints when it was made, so a slow one shows.

The code

client/squishy/. Pure and tested on their own: the dumpling (body.ts), the course and its generator (level.ts, course.ts, supports.ts, room.ts, kitchen.ts), the jellies (jelly.ts), the meshes (mesh.ts, honey.ts, honeyfield.ts). The page: main.ts is the game (its state, the levels and the title, the aim and the flick, the camera, the hands, each frame drawn); beside it the GLSL (shaders.ts), the context, programs and meshes on the card (gpu.ts), the targets it's drawn into and the finish (post.ts), the bake drawn (bakegl.ts), quality by frame time (quality.ts), the sounds (sound.ts), small maths (vmath.ts) and the page's switches (env.ts).

Probes

The lab's server-side probes are deterministic trials on Squishy's own generator and physics, answered as JSON: /_probe lists them, /_probe/<name>/<args> runs one (spatial, fork, jar-strain, body, optics). They live in client/squishy-lab/probes.ts; a new one is an entry there, not a new route. The devtools/ harnesses are local and never reach the cell.

Every picture (15)

The title

A flick

The places

Benches