Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Car Racing Game to GameZone #4531

Merged
merged 7 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading