Project Title: Turtle Race Game
Project Title: Turtle Race Game
Project Description
The Turtle Race is an engaging and interactive desktop application built using Python's Turtle graphics library. This fun game combines elements of chance and strategy, allowing users to bet on turtles racing to a finish line. The application also incorporates user authentication, enabling both new and returning users to manage their profiles and track their points.
Features:
1. User Authentication:
New Users: Prompted to create a username and password, with their details and starting points recorded in a CSV file (`usersdata.csv`).
Returning Users: Required to log in with their existing credentials, retrieving their saved points.
2. User Interface:
Full-screen mode for an immersive gaming experience.
Colorful and dynamic graphics created using the Turtle graphics library.
Text inputs for user interaction and bet placement.
3. Gameplay:
Four colorful turtles (blue, pink, yellow, and red) race on a defined track.
Users place bets on which turtle they think will win the race.
Turtles move randomly across the screen, adding excitement and unpredictability to each race.
The game declares a winner based on which turtle crosses the finish line first.
4. Scoring System:
Points are awarded or deducted based on the outcome of the race and the user's bet.
Scores are updated in real-time and saved to the user's profile for future sessions.
5. Visual and Sound Effects:
Eye-catching animations as turtles race and celebrate victory.
Visual feedback on successful login, betting results, and end-of-game messages.
Technical Details:
Languages and Libraries:
Python for the core logic.
Turtle for graphics and animations.
Pandas and CSV for user data management.
CSV Data File (usersdata.csv):
Stores user credentials and points.
Columns include `Name`, `Password`, and `Points`.
How It Works:
1. User Authentication:
On launch, users are asked if they are new or returning.
New users register with a username and password, starting with 5000 points.
Returning users log in, with their details verified against the CSV file.
2. Gameplay Setup:
Users are welcomed with a custom message and current score displayed.
The game screen transitions to the racetrack, setting up the turtles and the finish line.
3. Betting:
Users choose a turtle to bet on (options 1-4).
Users enter the amount of points they wish to bet, ensuring it does not exceed their current points.
4. Race:
Turtles race with random movements towards the finish line.
The race continues until one turtle crosses the finish line, determining the winner.
5. Results
If the user's chosen turtle wins, they gain points equivalent to their bet.
If another turtle wins, the user loses the bet amount from their score.
Updated points are saved to the CSV file.
6. Repeat or Exit:
Users are given the option to play again or exit.
On exiting, a thank-you message is displayed.
Usage:
Ideal for casual entertainment and as an educational tool for teaching basic programming concepts with Turtle graphics.
Encourages users to develop a strategy and manage their points effectively.
Conclusion:
The Turtle Race combines simple yet addictive gameplay with colorful graphics and user management features, making it an enjoyable experience for players of all ages. Whether you're a new user eager to start racing or a returning player looking to improve your score, this game promises hours of fun and excitement.
Here is GitHub Link of this project.