Skip to content

Commit

Permalink
Merge pull request #4531 from shellyverma/car-racing-game
Browse files Browse the repository at this point in the history
Added Car Racing Game to GameZone
  • Loading branch information
kunjgit authored Jun 24, 2024
2 parents 1a590bf + e659b95 commit 6bba91b
Show file tree
Hide file tree
Showing 13 changed files with 453 additions and 3 deletions.
74 changes: 74 additions & 0 deletions Games/Car_Racing_Game/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# **Car Racing Game**
---

<br>

## **Description 📃**
<!-- Brief description of the game -->
Car Racing Game is an exhilarating 2D racing game where players control a red car and compete against a computer-controlled green car. The game features multiple levels with increasing difficulty, realistic collision detection, and smooth controls.


## **Functionalities 🎮**
<!-- List the key functionalities of the game -->
- **Player and Computer Cars**: Control the red car and race against the green computer car.
- **Levels and Progression**: Complete levels by reaching the finish line before the computer car. Each level offers more challenges and obstacles.
- **Collision Detection**: Realistic collision detection with track borders and other cars.
- **Speed Control**: Adjust the speed of your car using the arrow keys.
- **Direction Control**: Rotate your car left or right to navigate through the track.
- **Game Over and Reset**: The game ends if the player fails to beat the computer car. Reset the game to try again.

<br>

## **How to Play? 🕹️**
<!-- Instructions on how to play the game -->
1. **Start the Game**: Launch the game to begin.

### Controls:
<!-- List of game controls -->
- Use the **left** and **right arrow keys** to rotate the car.
- Use the **up arrow key** to accelerate forward.
- Use the **down arrow key** to slow down or reverse.

2. **Navigate the Track**: Avoid collisions with track borders and other cars.
3. **Complete Levels**: Reach the finish line before the computer car to advance to the next level.
4. **Game Over**: If the computer car reaches the finish line first, it's game over. Reset the game to try again.

<br>

## **Installation and Running the Game 🚀**
### Prerequisites
<!-- List of prerequisites -->
- Python 3.x
- Pygame library

### Steps
<!-- Step-by-step instructions to install and run the game -->
1. **Clone the repository**:
```sh
git clone https://github.com/shellyverma/game.git
```

2. **Navigate to the game directory**:
```sh
cd game
```

3. **Install the dependencies** (assuming you have Python and pip installed):
```sh
pip install pygame
```

4. **Run the game**:
```sh
python main.py
```

<br>

## **Screenshots 📸**
<!-- Add your screenshots like this -->
<!-- ![image](url) -->
![Game Screenshot](https://github.com/shellyverma/game/blob/ea66450ffb4afb9fb849ea685e39a131d5da8849/Screenshot%20.png?raw=true)

---

Binary file not shown.
Empty file added Games/Car_Racing_Game/git
Empty file.
Binary file added Games/Car_Racing_Game/imgs/finish.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/Car_Racing_Game/imgs/grass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/Car_Racing_Game/imgs/green-car.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/Car_Racing_Game/imgs/red-car.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/Car_Racing_Game/imgs/track-border.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Games/Car_Racing_Game/imgs/track.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6bba91b

Please sign in to comment.