A simple Python game where you control a car and try to avoid obstacles. The game is built using the Pygame library, and your objective is to navigate your car and achieve the highest score without colliding with obstacles.
-
Clone or download the repository:
git clone https://github.com/Kelvin-Wepo/Racing_car
-
Navigate to the project directory:
cd basic-racing-game
-
Make sure you have the required dependencies installed:
pip install pygame
-
Place your car image in the project directory and name it "car.png". You can use any car image you like.
-
Run the game by executing the following command:
python racing_game.py
-
Use the left and right arrow keys to move your car and avoid obstacles.
-
The game keeps track of your score, which increases as you progress.
-
The game ends when your car collides with an obstacle.
-
After the game ends, a "Game Over" message and your final score will be displayed for a few seconds before the game automatically closes.
- You can adjust the game's constants, such as the window size, car size, and speed, in the code to fit your preferences.
- You can replace the "car.png" image with your own car image.
This project is licensed under the MIT License. See the LICENSE file for details.
Enjoy the game, and happy coding!