Professor Oops

Inside Professor Oops

Inside Professor Oops

A sheet of paper where everything follows the same rules

Professor Oops gives a child a sheet of paper and 83 real things to try on it: watercolour, ketchup, a match, a fan, a battery, ants. Every tiny spot of the paper keeps its own heat, its own water and what's dissolved in it, and every tool and animal reads and writes those same numbers. So a child can try something nobody planned for and still get a sensible answer. These pages show how that is built.

Painted illustration of the painter crouching by an oven, watching a crayon drawing toast golden inside, with an ice-cube tray and a lemon.

A child sees paper and a toolbox; underneath, every speck of the paper is a little world

Open Professor Oops and there is a sheet of paper on a table, with drawers full of things from the kitchen, the bathroom, the garden, the craft box, the toy box, the science shelf and the toolbox. There are no levels, no scores and nothing to win. A child paints, pours, squeezes, lights, bangs and waits, and watches what happens.

Every result is worked out as it happens. Drop water on a black marker dot and it opens into rings of blue, pink and yellow. Let a fire reach it and the fire is held back at the wet edge until its heat has boiled the water off. Roll a football past a candle and the candle goes out. Leave ketchup out for three days and it grows mould; leave honey out and it doesn't. Each of these comes from a small rule about one thing, such as heat or water or air, applied the same way to everything on the page.

That is why the game can surprise the people who made it. A child who combines two things nobody thought of still gets an answer that makes sense, because both things already speak the same language.

A sheet of paper where everything follows the same rules

For engineers

A sheet of paper where everything follows the same rules

A grid of up to 512 × 384 cells, each about half a millimetre, stepped at a fixed 1/60 s in a Web Worker. A type-checked TypeScript AST scan finds 33 systems sharing 55 per-cell and per-region layers through 689 read and write links, and no rule that names two substances. The busiest loops run as seven WebAssembly kernels, five of them tested bit for bit against their JavaScript twins. At the release the code held 2,614 tests in 270 files.

Under the hood
A child sees paper and a toolbox; underneath, every speck of the paper is a little world

Under the hood

A child sees paper and a toolbox; underneath, every speck of the paper is a little world

The sheet is a grid of up to 512 × 384 cells on a large page and 288 × 216 on a phone, each about 0.5 to 0.6 mm. Every cell keeps its own temperature, how wet it is and any water standing on it, its colour as the light it soaks up, the liquids lying on it and floating on them, and a dozen dissolved substances.

Air, smells and what animals sense live on a coarser grid (64 × 48 on a full page). Loose things such as balls, mugs and cars are 2.5D bodies that all follow the same rules for bumping and rolling.

The whole engine steps at a fixed 1/60 s in a Web Worker, away from the screen. The screen draws from a copy of the state and redraws only the parts of the page that changed.

Each of the 97 materials at the release is described by numbers in one shared table; the code that moves liquids reads those numbers and names no material.

The game's whole screen: a sheet of paper on a wooden table with a blue watercolour wash, a red ketchup zigzag and a lit birthday candle on it, and on the left the drawer tabs with the Garden drawer open.
In the game. The released game's screen, with a wash of watercolour, a ketchup zigzag and a lit birthday candle on the paper, and the drawers of tools beside it. Everything a child does lands on that one sheet.
In the game: on the right the paper has burnt away to the wooden table; its flames are held at the edge of a band of wet paper, faint grey patches, where a black marker dot has opened into a blue rim round an orange-brown middle.
In the game. The scene at the top of this page, in the released game, 40 s after the match: the fire has burnt the right of the sheet away and is held at the band of poured water, which it has to boil dry before it can burn on. Given long enough it does get through. In the band, a black marker dot has opened into a blue rim round an orange-brown middle.

Plain text

Every chapter's headings and captions tell the story on their own. Read only those and you know what's special.

+ Under the hood

The engineer's layer: the idea behind each rule, real units and grid sizes, the shortcuts we take and how a test holds each result.

The game's own rule

The game's own rule A live demo running the game's real rule and constants, only on a smaller grid. Illustration marks a sketch of the idea.

next update

next update Built and tested, coming in the next update. Everything without this badge is in the game you can play today.

Nothing in the code says a football can blow out a candle

In most games, a programmer decides what happens when two things meet: "if the ball touches the candle, put the flame out". Professor Oops almost never works that way. A rolling ball only pushes the air in front of it. A candle only checks how fast the air round its flame is moving. Neither knows the other exists. Roll the ball past fast enough and the flame goes out, because they share the air.

The same goes for heat, water, what is dissolved in the water, noise and shaking. Each tool writes into a few shared layers, and each thing on the page reacts to those layers by its own numbers. Built for surprises maps them all and lets you follow each one's connections.

Scientists call this emergence. The behaviour comes from parts that share one world, with no list of special cases behind it. It is also why the game can answer questions nobody wrote into it.

Under the hood
Nothing in the code says a football can blow out a candle

Under the hood

Nothing in the code says a football can blow out a candle

Systems never call each other. They write into shared layers: per-cell fields such as heat, wetness and acid, the air and the grids animals sense, and a few shared ways in for pressing, rubbing and knocks.

A TypeScript AST scan with the type checker over the whole simulation found 689 read and write links in the released game, between 33 systems and 55 layers, at 5,539 places in the code. In 882 of the 1,056 ordered pairs of systems, one writes something the other reads.

A second scan looked for any rule that tests one named material against another. Across the 5,356 pairs of substances in the released game it found none. Chemistry between dissolved substances is written once, as a table (vinegar fizzes on soda through a rule about acid and soda), and the tests check the other way too: an automated test fails if the speaker's code names the salt it moves.

The full map, the counts and the exceptions: Built for surprises

Shared: wind

Roll a football fast past a lit candle

The flame goes out from the ball's wind, with no rule about balls and candles (pinned by a test).

Air that really moves

Shared: CO₂ in the air

Fizz vinegar on baking soda near a candle

The heavy gas creeps along the paper and puts the candle out: one 26 cells away goes out, one 84 cells away doesn't (pinned by a test).

Chemistry and pH

Shared: carbonate (a base)

Burn a patch, then paint red cabbage juice over it

The juice turns blue in a thin ring round the burn and stays purple on clean paper, because burning leaves carbonate in the ash and the indicator reads pH (pinned by a test).

Heat and fire

Shared: acid

Clip a battery across salty water on cabbage paper

The water by the plus clip turns pink (pinned by a test).

Electricity

Shared: wet + water

Paint water across the path of a fire

A match won't light it, and the front stalls until the water has gone (pinned by a test).

Water in paper

97 materials, from ketchup to sand, and not one rule written for a pair of them

Every figure here comes from the released game's code, a test or a recorded measurement, and the chapters say which.

97
Materials in the released game, from ketchup and honey to sand and paint, each described by numbers in one shared table.
0
Rules that name two substances, across 5,356 pairs of them. Found by a scan of the code, then each candidate read by hand.
55 layers
Shared layers, such as heat, wetness, wind and noise, that 33 systems read and write through 689 links.
882 of 1,056
Ordered pairs of systems where one writes something the other reads. Nobody wired those pairs; the layers do.
2,614
Tests in 270 files at the release, with 8,933 assertions. Many of them step the real engine on a real page.
7 kernels
WebAssembly copies of the busiest loops. Five are tested to the last bit against their readable JavaScript twins.
2.9×
The most the paper kernel sped up its own simulation, 1.8 to 2.9× across scenes, timed on a desktop when it was ported. No tablet was timed.
4.6×
Less fire work on a warm dough page where most of the tiles have settled and sleep, with the result identical to the bit.

Sixteen chapters, from water and fire to animals and speed, all on the same sheet

Each chapter takes one part of the world on the paper: what a child sees, what is really computed, how it links to the rest, and where we simplify on purpose. Most have live demos running the game's own rules.

The world on the page

Thirteen systems, each with its own rules, all on the same sheet.

Engineering

How it stays fast on a cheap tablet, and how it stays right.

The game keeps what a child can see and test, and drops the rest of the physics on purpose

A tablet can't compute the real world, and a child doesn't need it to. The craft is choosing what to keep: the effect a child can see and test, at a cost a cheap device can carry. Here are six of the shortcuts, each explained in its chapter.

In real life. pH comes from the balance of ions in each drop of water

In the game. A rough reading from the amounts in a spot, anchored on vinegar's real pH; red cabbage's colour is looked up in a table blended from a few hand-picked colours

Why that's enough. The colours come in the order the printed charts give, at one lookup per spot. Chemistry and pH

In real life. The dyes in an ink separate by their chemistry

In the game. Each of a black marker's three dyes rides the water at its own speed, typed in like the Rf values of a school experiment

Why that's enough. The rings come out of the water's own movement, in the right order. Water in paper

In real life. Air is close to incompressible

In the game. Only part of the pressure correction each tick, on purpose

Why that's enough. Seen from above, a fan is a source of air and a fire a sink; a full solve made gusts weaker. Swirls are weaker than real ones. Air that really moves

In real life. An ant's scent trail lasts about 47 minutes

In the game. It fades within a minute or two, dozens of times faster

Why that's enough. A trail has to clear within one play session, so a child can watch it go. Animals with their own minds

In real life. Sound is a pressure wave that travels and echoes

In the game. No sound waves are computed. The speaker writes a steady shake map, a sum of a few hundred vibration shapes

Why that's enough. Salt finds the still lines all the same, on a full page, on a tablet. Sound and shaking

In real life. A mould colony spreads faster when it is warm and well fed

In the game. Its size is a formula of its age, with a cap

Why that's enough. Three days cost one sum, and it slows under a child's eyes. A warm room and a cold one give the same size. Dough, mould and time

179 sources on play, real science and selling to children, each labelled by what it really did

Four pages list every source we drew on, from fluid solvers and forensic drop stains to real ants and the rules on selling to children. Each one is labelled by what it really did: applied, shaped a rule of our own, or found later and consistent. We have run no learning study, and we don't claim one. The research behind it brings them together.