Skip to content

laneyweb/reaction-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Reaction Timer Game

A minimal, single-file reaction timer game built with HTML, CSS, and JavaScript. Test how fast you can react to a visual stimulus.

How to Play

  1. Open reaction_timer.html in your browser.
  2. Press the box to start a round.
  3. Wait for the box to turn red.
  4. Press down as fast as you can when it does.
  5. Your reaction time (in milliseconds) is recorded and displayed.

Don't press too early — you'll get a buzz and have to retry!

Features

  • Mousedown-based timing — uses mousedown event for more accurate reaction measurement (captures when you physically press, not release)
  • Web Audio sounds — synthesized sound effects via the Web Audio API:
    • Blip when a round starts
    • Blop when you react successfully
    • Burrb when you press too early
  • Persistent stats — best time, average, and last result saved to localStorage
  • Google Fonts — Oxanium for headings/timer, Rajdhani for body text
  • Dark theme — easy on the eyes

Files

File Description
reaction_timer.html The game — open this to play
font_preview.html Preview page comparing 5 Google Fonts in the game's UI

Stats

  • Last — your most recent reaction time
  • Best — your fastest reaction time
  • Average — mean of all recorded times

Press "Reset Stats" to clear your history.

Tech

Pure HTML/CSS/JS, no dependencies. Fonts loaded from Google Fonts, audio synthesized with Web Audio API.

About

A minimal reaction timer game with sound effects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages