Typing Speed Test Game
A browser typing game that measures words-per-minute and accuracy on randomised text passages, with live highlighting of correct and incorrect characters.
How to build it β step by step
- 1Passage engine: Render a random passage and split into character spans for per-character feedback.
- 2Input tracking: Compare typed input to the passage, colouring correct/incorrect characters live.
- 3Metrics: Start a timer on first keystroke; compute WPM and accuracy on completion.
- 4Leaderboard: Store best scores in localStorage and show a personal leaderboard.
Key features to implement
- βLive character highlighting
- βWPM and accuracy
- βMultiple difficulty passages
- βPersonal best leaderboard
- βRestart with a new passage
π‘ Unique twist to stand out
Add a "code mode" with programming snippets (including symbols and indentation) to practise typing real code.
π What you'll learn
String comparison, keyboard events, timing, and computing performance metrics.