A Prompt for a Typing Race Game
One brief for a typing racer where cars move as players type, with the scoring math spelled out, then the next three prompts and what tends to break.

Key takeaways
- Spell out the scoring: words per minute as characters divided by five per minute, accuracy as correct keystrokes over all keystrokes.
- Decide how errors work (must be fixed before moving on) and block pasting, or the leaderboard means nothing.
- Rooms by link with a shared countdown are enough multiplayer for a first version; public matchmaking comes later.
A typing race game prompt needs the scoring formula, the error rule and the race flow written out, because those decide whether the game feels fair. This brief builds a browser racer where each player's car moves along a track as they type the same passage, with private rooms by link, a solo mode against your own best run, and the math that every typing test uses.
The typing racer brief
Build a typing race game for desktop browsers called Keyline. Players race by typing the same passage; each player has a small car on a horizontal track and the car's position equals the share of the passage typed correctly. Passages: 40 original passages of 30 to 60 words, a mix of short stories, facts and quotes you write yourself, plain punctuation only. Typing rules: show the passage with the current word underlined; correct characters turn dark, a wrong character turns red and the player must backspace and fix it before continuing; the input ignores paste and drag-and-drop. Scoring: words per minute = (correct characters typed / 5) divided by minutes elapsed, updated live; accuracy = correct keystrokes divided by all keystrokes, shown at the end. Modes: Solo (race against a ghost car replaying your personal best on that passage) and Room (one player creates a room, shares the link, up to five players join, the host presses Start, and everyone sees the same 3, 2, 1 countdown driven by the server). In a room, show each car with the player's chosen nickname and live WPM, and finish places 1st to 5th with time, WPM and accuracy; Rematch picks a new passage. Results screen: WPM, accuracy, the three words with most mistakes, and a personal best badge. Save personal bests per passage in the browser. Look: clean light theme, monospaced passage text at 22 pixels, cars as flat colored shapes, a subtle checkered finish line. Sound: soft key ticks off by default, a short engine rev at the start and a chime at the finish. On phones, show a message that the game is designed for a physical keyboard. First version: no accounts and no global leaderboard.
Why the details matter
- The WPM formula. Typing tests count a word as five characters, so long words and short words do not change your speed. Without the formula the agent may count spaces between words, and a passage of short words makes everyone look fast.
- Accuracy from keystrokes, not final text. If players must fix errors, the final text is always correct. Counting every keystroke, including the wrong ones, is the only way accuracy means something.
- Fix-before-continue. The alternative (errors allowed, penalized at the end) is fine, but you have to pick one. Fix-before-continue is easier to understand and makes the car position honest.
- Paste blocked. One paste wins every race. Blocking paste and drag-and-drop removes the laziest cheat; more serious cheating only matters once a public leaderboard exists.
- Server-driven countdown. If each browser runs its own countdown, the player with the slower connection starts late. The room server says "go" once for everybody.
- Original passages. Song lyrics and book excerpts belong to someone. Forty passages the agent writes are enough variety and avoid the question entirely.
- Phone message. Phone keyboards autocorrect and predict words, which breaks per-character typing. Saying so up front is kinder than a broken experience.
For more on typing game design (word lists, difficulty and teaching modes), see the round-one guide on how to make a typing game. For how rooms, shared state and reconnects work in general, building a multiplayer game is the background read.
The first three follow-up prompts
- 01"Add a practice mode that targets weak keys: track mistakes per character across all my races in this browser, show a keyboard heatmap, and generate short drills made of real words heavy in my three weakest letters."
- 02"In rooms, handle a player who leaves or refreshes mid-race: they rejoin at the position they had, their car shows as paused while disconnected, and the race does not wait for them. If the host leaves, the next player becomes host."
- 03"Add difficulty tiers for passages (easy: common words, no capitals; medium: normal prose; hard: numbers, symbols and capitals) and let the host pick the tier before Start."
Two variations
Typing defense for one player
Swap the race for survival: "Words fall from the top of the screen toward a castle. Typing a word fires an arrow that destroys it; the first letter you type locks onto the closest matching word. Waves get faster and words longer; three words reaching the castle ends the run." It reuses the same input and scoring, and plays well alone. If you go this way, a leaderboard of best waves gives people a reason to come back.
A code typing race
For developers, replace prose with short code snippets: "Passages are 10 to 20 line snippets in JavaScript, Python and SQL that you write. Preserve indentation; pressing Enter auto-inserts the indentation of the next line so players only type the code. Count brackets and symbols as characters." Code is much slower to type, so expect WPM in the 30s and 40s even for fast typists.
What usually goes wrong and how to ask for the fix
- WPM spikes to 300 in the first second. Dividing by a tiny elapsed time. Ask: "Do not show WPM until two seconds have passed, and compute it from the first keystroke, not from the countdown."
- Cars jump instead of driving. Positions arrive from the server a few times per second. Ask: "Smooth other players' cars between updates so they glide, and move my own car instantly from local input."
- Typing lags on long passages. The whole passage re-renders on every key. Ask: "Typing feels laggy after 40 words. Render each word once and only update the current word and the one before it on each keystroke."
- Accented letters and dead keys break input. Some keyboards compose characters from two key presses. Ask: "Handle composed input events so that a character produced by a dead key or input method counts once, and test with an accented letter."
- Two players finish at the same moment and both get 1st. Ask: "Decide finish order on the server by its own receive time and break exact ties by higher accuracy."
Publishing the racer
Test a room with two or three browser windows from the preview, including a refresh mid-race. Previews run the room server on every plan, and publishing it with the game is on paid plans, as the multiplayer docs explain. Solo mode needs nothing more than a normal publish.
A good first audience is a group that already types a lot together: a class, an office channel, a gaming server. Post a room link at a set time, run five races, and ask which passages felt unfair. Passages with rare words or awkward punctuation are usually the culprits, and swapping three of them out improves the game more than any new feature.
Frequently asked questions
How is words per minute calculated in typing games?
Correct characters typed divided by five gives standard words, and that number divided by the minutes elapsed gives WPM. Most tests count only correct characters for net speed.
Can a typing race game work on phones?
Poorly. Phone keyboards autocorrect and predict whole words, which fights per-character checking. Design for physical keyboards and show phone visitors a clear note.
How many players can race in one room?
The brief uses five, which keeps the track readable. You can raise it, but test the room with that many players before you share it widely.

