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
๐ Instructions
- ๐ข Start: Click the "START" button to begin the game.
- โซ Wait: The screen will turn black with the message "GET READY..." โ donโt click yet!
- ๐ด Click: When the screen flashes red and shows "CLICK!", click immediately.
- ๐ 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!
๐งช Just for fun โ but dangerously addictive!