⚡ REACTION TEST

Wait for the black, then press. How fast are you really?

← Back to Fun Time
Last go
Average
Goes
0
Best

⌨️ Controls

  • SPACE or ENTER — that is the whole game
  • Clicking or tapping the panel works too
  • R clear the scores  •  P pause
  • The panel reacts the moment your finger goes DOWN, not when it comes up.
  • 🎮 Xbox controller? Just plug it in or pair it — the stick and D-pad are the arrow keys, A is SPACE, Menu pauses and View starts again

🎯 How to play

  • Press once to arm it. The panel says WAIT…
  • After a random pause the panel turns solid black. Press!
  • Press before it turns black and it does not count — that is a false start.
  • The bar chart shows your last eight goes, with your best one filled in.

🏆 What is a good time?

  • The average grown-up is about 250 ms.
  • Under 200 ms is genuinely fast.
  • Under 150 ms usually means you guessed — and got lucky.
  • Watch the panel, not your hand. And do not blink.

🧑‍💻 For young coders: build this game yourself

This game is split into small library files inside funtime/lib/, and every function has a comment saying exactly what goes in, what comes out, and the algorithm in plain English. Empty any function out, read its comment, and write it yourself.

File What it does Good functions to try re-writing
lib/reaction-rules.js The rules: the phases, the delay, the stopwatch randomDelay, updateGame, press, averageTime
lib/reaction-draw.js Painting the signal panel and the bar chart panelWords, drawPanel, drawHistory
lib/reaction-main.js The glue: the keyboard and the panel doAction, connectBoard, gameLoop

💡 The big idea: a phase. This game is always in exactly one of five states, and every single rule starts by asking which one. One button means five different things — and the code stays simple because each branch only has to worry about its own case.

🛠️ Want to be walked through it? Build Reaction Test Yourself takes you through the key functions one step at a time and tests each one you write. There is a Python version too.