totb

The Typing of the Bed. A typing game for winding down instead of speeding up: count sheep over a moonlit fence by typing the word each one carries.

Type: Cozy Typing Game / Single Page Application (SPA)
Domain: Typing Practice / Wind-Down

Purpose & Origins

totb is a typing game built to be played at the end of a day rather than against a clock. The genre's landmarks are speed tests and shooters: type fast, get scored, be told your words per minute. The Typing of the Bed takes the same input and points it at the oldest sleep aid there is. Sheep drift across a moonlit fence in four lanes, each carrying a word. Type the word above the lead sheep and it hops the fence and is counted. The name is a nod to The Typing of the Dead, which bolted a keyboard onto a light-gun game; this one bolts it onto counting sheep.

Architecture & Technology

A single self-contained page drawing to one canvas. The fence posts and rails, the wool, the blanket and pillow and the night sky are generated as procedural textures when the page loads rather than shipped as image files, so the whole thing carries no assets at all.

The soundtrack is synthesized the same way: thirty-three public-domain classical pieces, including Brahms' Lullaby, Chopin's Op. 9 No. 2, Satie's first Gnossienne and Ravel's Pavane, re-voiced through Web Audio as music boxes, harps, lofi keys and warm pads, with an option to shuffle a new one every minute.

Two meters drive the play. Drowsiness dims and softens the screen, and in Endless Challenge it climbs while correct keystrokes push it back down, so a run ends when you finally nod off; in the three-minute Timed Zen it drains on its own and nothing can end the session early. Difficulty runs cozy, gentle, normal, brisk and nightmare, and scales how fast the night closes in. Words come from a picker over twenty-four themed lists, from cozy and sleepy through rainy windowpanes, tea ceremony and garden, and late-night hacker, plus a shuffle across all of them. Difficulty, mode, word list, track, volumes and the last fifty runs are kept in localStorage on your own machine.

Version 2.0 adds a small-screen layer over the same simulation, which still runs at its original 1280 by 720. On a phone or any coarse-pointer screen the scene is laid out as HTML instead of being drawn to the canvas, a hidden text field raises the device keyboard so words can be typed, and the title screen's settings become real select controls and sliders. The desktop game is unchanged.

Scope & Uniqueness

Typing practice is normally framed as a test, and a test is a poor thing to sit down to before bed. totb still takes the measurements, reporting sheep counted, words per minute, accuracy and longest streak with a personal best beside them, but it files them at the end of a run instead of flashing them at you throughout. There is no account, no leaderboard, no daily streak to protect and no network call of any kind. The one thing in it that rewards typing hard is the occasional golden sheep, which carries a longer word and counts triple.

Screenshots