Words fall out of the sky — type them before they hit the ground
← Back to Fun TimeStart wherever you like, and race on the everyday words or on a Classical Roots lesson. Pick one book, then tick as many lessons as you want.
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/wordfall-rules.js | The rules: the falling, the matching, the levels | speedForLevel, matchingWord, typeLetter, zapWord |
| lib/wordfall-draw.js | Painting the sky, the ground and the half-typed words | drawWord, drawGround, renderGame |
| lib/wordfall-main.js | The glue: the keyboard, the phone keyboard, the loop | doAction, connectKeyboard, gameLoop |
💡 The big idea: you never choose a target — the letters choose it for you. Six words are falling, you press one key, and the game works out which one you meant: of everything that starts with what you have typed, the one nearest the ground. That is the same idea behind a search box completing your sentence, and it is twelve lines of code.
🛠️ Want to be walked through it? Build Word Rain Yourself takes you through the key functions one step at a time and tests each one you write. There is a Python version too.