TinyGames · how it works
Sixty seconds of moles. Tap them. Leave the bombs alone — one costs you five seconds. The crowned ones are worth three, and do not wait around.
Open index.html. No build step, no dependencies, no images.
burrow/
index.html markup
style.css the frame around the canvas
js/engine.js copied unchanged from Overdrive - the ninth game on it
js/moles.js the scheduler and the hit test - no pixels, no engine, no DOM
js/burrow.js the playable layer
test-moles.js node test-moles.js
Everything the player experiences — whether it feels fair, whether it feels random, whether it gets harder in a way they can rise to — is decided by which hole pops next, when, and for how long. Write that as pick a hole at random, show it a bit less time each round and you get three separate faults, none of which look like bugs:
The same hole pops twice running. It reads as the game glitching rather than as luck, because the player's eye is already leaving it. The picker never returns the hole it just returned — 20,000 draws, zero repeats.
Uniform random produces droughts. A hole that has not been used for twenty pops is not a surprise, it is an annoyance. Holes are weighted by how long they have waited, so nothing is starved. Measured against a uniform picker on the same seed, the longest any hole sits idle drops from 30 pops to 21, and use is even to within 1.25×.
Shrinking the up-time eventually shows a mole for less time than a human can react to. That is not difficulty. It is a broken game that looks like a hard one.
$ node test-moles.js
43 passed, 0 failed
Simple visual reaction time is about 250 ms — for someone expecting the signal, with no aiming involved. Add moving a finger to a target and 250 ms is the floor, not the average.
So up-time only tightens from 1.65s to 0.70s across the whole ramp, and the real difficulty knob is how many are up at once, which goes from one to five. The test asserts that relationship directly: density multiplies by more than speed divides by.
There is also a hard clamp at 0.62s that, as the tests confirm, never actually fires — the curve settles above it on its own. That is the point of it. If somebody later retunes the ramp and pushes it under a human's reaction time, the test fails and tells them, and the clamp means the game degrades safely rather than becoming unplayable while they work it out.
A mole is drawn into its hole. Everything below the rim is clipped away and the rim is painted back over the top, so it rises out of the ground instead of fading in above it. The test checks a half-risen mole draws nothing in the band above the hole — without the clip, a mole halfway up looks like a mole floating over a hole, and the whole illusion goes.
A bomb that gets away is not a miss. Not hitting it is the correct play, so letting it go must not break the chain. Only a mole that escapes does that.
Each kind differs in shape as well as colour — the bomb has a lit fuse, the golden mole a crown — so nothing depends on telling brown from gold. Verified by reading the rendered pixels back off the canvas.
Three bots over the same sixty seconds:
| score | |
|---|---|
| taps every mole, never a bomb | 6,414 |
| taps everything that appears | 2,623 |
| taps nothing | 0 |
The indiscriminate bot hit five bombs and lost 25 of its 60 seconds to them. Knowing what not to hit is worth more than reaction speed.
| Mole | 25 |
| Golden mole | 75 |
| Chain | +25% a hit, capping at twelve |
| Bomb | −5 seconds, chain broken |
Missing a mole breaks the chain too. Best score is kept in localStorage.
Tap, or click. That is the whole game. R starts over.
Config.COLS/ROWS and the picker both take any size.Advertisement