Tapper chapter opener illustration

Tapper

THE EVENT - *not all code runs top-to-bottom; some code is a rule that waits quietly and fires the exact moment a thing happens - 'WHEN the hero touches the coin, add one' - so the world can react instantly to whatever the player does.*

Tapper the Frog Waits for the Touch

Tapper is a bright, quick, wide-eyed frog who sits very still on a lilypad and looks, to anyone passing, like it is doing absolutely nothing. This is a trick. Tapper is not doing nothing. Tapper is waiting - and Tapper is the fastest reactor in the whole quest.

Most instructions in a program run in a line, one after another, top to bottom: do this, then this, then this. Tidy and predictable. But there’s a problem with a fixed line of instructions: it can’t handle surprises. It can’t know, ahead of time, the exact moment the player will steer the hero onto a coin, or a spike, or a door. Those moments happen whenever the player decides - not on any schedule.

So Tapper works a completely different way. Tapper doesn’t run in the line at all. Tapper is a rule that waits, and the rule has a shape: “WHEN this thing happens, do that.” WHEN the hero touches the coin - snap - add one to the score. WHEN the hero touches the door - snap - it opens. Tapper’s rule sits perfectly still, patient as a stone, until the very instant its trigger happens, and then it fires, quicker than you can blink.

“I don’t go looking for the coin,” Tapper explains, not moving a muscle. “I don’t march down a line checking, checking, checking. That would be exhausting. I just wait, and the moment the touch happens - I’m already reacting. That’s my whole job. Watch for one thing. Fire the instant it happens.”

This is called an event, and it is how games feel alive. Every time you press a button and something responds right now, every time you bump into a thing and it reacts, that’s an event: a “when-then” rule that was sitting quietly, waiting for exactly that. The world doesn’t run on a fixed script that ignores you. It’s full of little waiting rules, each ready to fire the moment you do something.

The clever part is that events let the code react to things it could never have predicted. The program didn’t know when you’d touch the coin - it just left a rule that says “whenever that happens, here’s what to do.” Waiting, it turns out, is a kind of superpower.

That is Tapper’s still, lightning-fast idea.

Some code doesn’t run in order - it waits, and fires the instant a thing happens. WHEN this, do that.

A grown-up can play too! Hunt for real “events” - rules that wait and fire on a trigger. A doorbell (when someone presses, it rings). A kettle (when the water boils, it clicks off). A high-five (when two hands meet, snap). None of these run on a schedule; each waits for its one moment. That “when-then” shape is exactly what Tapper is.

When the hero drifts onto a coin and Tapper’s waiting rule fires instantly - snap, score plus one - Tapper gives one crisp, satisfied blink and settles back to stillness, already waiting for the next touch. “Didn’t move till it mattered,” Tapper says. “Then I was faster than fast. That’s how you wait.”

Wait for the touch, fire in a flash. That’s Tapper.

The scriptquest ensemble

Tapper is part of scriptquest's distributed-narrative cast. Each character embodies a different curricular primitive; together they teach the full subject.