Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 2.5 KB

README.md

File metadata and controls

27 lines (21 loc) · 2.5 KB

The Reaction Speed Game

Motivation for Making This

I made a quick little game to measure you reaction speed. The point is the wait for the screen to be green and when it is, click it as fast as possible, once you do so, you'll get a score. If you repeat this process five times, you'll get your average score over the past five attempts (while showing each attempt's score along the way). I chose to do this on a "random" color because that matches real games and real life better than waiting on a screen to swap to a single other color like on humanbenchmark.com. I did make it so that it plays a "ding" sound when the green screen show so that you can compare pure sound reaction time versus sound and visual reaction time, or if you mute your sound, you can also compare against purely visual too.

How to Play

  1. Click start
  2. The goal is the click when the board is green, but you can click between any two colors.
  3. When the green area loads, a "ding" sound should play. This was implemented to replicate a game's sound cues. You can compare purely sound reaction speed versus purely visual reaction speed, if you want.
  4. When you click the green area, it will add that reaction time to a list that is shown above the reaction click area.
  5. After clicking the green area five times, you should see your reaction time average over the past five tries. After clicking reset again, your average is reset.

Play Game

Potential Future Update Notes

  • Line chart of attemtps
  • User accounts - Doing this allows for many more features like tracking reaction speed over a longer period of time.

The Algorithm Used to get Reaction Speed

Your score should be accurate because the algorithm is that every time a new color is generated, a start date object is created, and when you click the board, an end date object is made, and then I simply get the difference between the two dates and display it in milliseconds. This works much better than relying on setInterval/setTimeout/requestAnimationFrame as those methods are not 100% consistent.

How this App Looks

This app may look "ugly" to some as I'm not a designer, but this isn't about making it look good, it's about the core functionality.