A 2D car racing game built with Python and Pygame featuring obstacle avoidance, coin collection, score tracking, and flame effects.
- Dodge incoming obstacles on the road
- Collect yellow coins to increase your score
- Game ends when you crash into an obstacle
- Press ENTER to restart after crashing
- 🛣️ Scrolling road with dashed lane markings
- 🌳 Animated trees on both sides
- 🔥 Flame effect when accelerating
- ⭐ Real-time score tracking
- ⏱️ Survival timer
- 💥 Crash detection with final score display
| Key | Action |
|---|---|
| ⬅️ Left Arrow | Move left |
| ➡️ Right Arrow | Move right |
| ⬆️ Up Arrow | Accelerate (with flame!) |
| ⬇️ Down Arrow | Slow down |
- Python 3.x
- Pygame
# Clone the repo
git clone https://github.com/yourusername/car-racing-game.git
cd car-racing-game
# Install dependency
pip install pygame
# Run the game
python Car_game_Project.pycar-racing-game/
├── Car_game_Project.py # Main game file
└── README.md
- Red car — Player vehicle
- Orange blocks — Obstacles to avoid
- Yellow circles — Coins to collect (+1 score each)
- Green background — Grass area outside road