Skip to content

Kelvin-Wepo/Racing_car

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Basic Racing Game

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.

Prerequisites

Installation

  1. Clone or download the repository:

    git clone https://github.com/Kelvin-Wepo/Racing_car
  2. Navigate to the project directory:

    cd basic-racing-game
  3. Make sure you have the required dependencies installed:

    pip install pygame
  4. Place your car image in the project directory and name it "car.png". You can use any car image you like.

How to Play

  1. Run the game by executing the following command:

    python racing_game.py
  2. Use the left and right arrow keys to move your car and avoid obstacles.

  3. The game keeps track of your score, which increases as you progress.

  4. The game ends when your car collides with an obstacle.

  5. After the game ends, a "Game Over" message and your final score will be displayed for a few seconds before the game automatically closes.

Customization

  • 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.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Enjoy the game, and happy coding!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages