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.