GitHunt
AL

aleena-zahra/reaction-time

My first game made using pygame Library. Checks and displays reaction time of the user

๐Ÿง โšก Reaction Time Game with Pygame

A fun and fast-paced reaction tester โ€” built using Python & Pygame.

๐Ÿš€ Overview

My first-ever game using Pygame!
This is a super simple game designed to test your reaction speed. Just click when you're told โ€” no earlier, no later! Itโ€™s quick to play and strangely addictive.

Can you break the 200 ms barrier? ๐Ÿ๐Ÿ’ฅ

๐ŸŽฎ Screenshots

Start
start

Wait
wait

Result
result

๐Ÿ“‹ Instructions

  1. ๐ŸŸข Start: Click the "START" button to begin the game.
  2. โšซ Wait: The screen will turn black with the message "GET READY..." โ€” donโ€™t click yet!
  3. ๐Ÿ”ด Click: When the screen flashes red and shows "CLICK!", click immediately.
  4. ๐Ÿ“ˆ Result: Your reaction time will be shown in milliseconds.

๐Ÿงฉ Game Logic

  • The game cycles through four states: Start โ†’ Wait โ†’ Click โ†’ Result.
  • A random delay (between 2โ€“12 seconds) keeps you guessing.
  • Your reaction time is measured from the moment the screen turns red to your click.
  • Everything resets with a new round โ€” try to beat your last score!

๐Ÿ’ป Controls

Action Input
Start Game Mouse Click
React to Prompt Mouse Click
Restart Round Mouse Click
Quit Game Close Window (X)

๐Ÿ›  Dependencies

Make sure you have Pygame installed. If not, install it via:

pip install pygame

๐Ÿง  Notes & Tips

  • This was built purely for learning โ€” but it works surprisingly well!

  • Great for improving focus or just killing time with a personal challenge.

  • Feel free to fork the project and add:

    • High score tracking ๐Ÿ†
    • Sound effects ๐Ÿ”Š
    • Background animations ๐ŸŒˆ
    • A leaderboard for friends to compete ๐Ÿ“Š

โค๏ธ Final Thoughts

Building this helped me understand event loops, state transitions, and basic UI rendering with pygame.
I hope it gives you a chuckle and a reason to double-click a bit faster today.

Got ideas or suggestions? PRs and feedback are more than welcome!

๐Ÿ”— Built with:
Python
Pygame

๐Ÿงช Just for fun โ€” but dangerously addictive!