Skip to content

About

2D car racing game built with Python & Pygame. Dodge obstacles, collect coins, and survive as long as possible!

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

🚗 Car Racing Game

A 2D car racing game built with Python and Pygame featuring obstacle avoidance, coin collection, score tracking, and flame effects.


🎮 Gameplay

  • 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

✨ Features

  • 🛣️ 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

🎮 Controls

Key Action
⬅️ Left Arrow Move left
➡️ Right Arrow Move right
⬆️ Up Arrow Accelerate (with flame!)
⬇️ Down Arrow Slow down

🛠️ Tech Stack

  • Python 3.x
  • Pygame

⚙️ Setup & Run

# 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.py

📁 Project Structure

car-racing-game/
├── Car_game_Project.py    # Main game file
└── README.md

🖼️ Game Elements

  • Red car — Player vehicle
  • Orange blocks — Obstacles to avoid
  • Yellow circles — Coins to collect (+1 score each)
  • Green background — Grass area outside road

About

2D car racing game built with Python & Pygame. Dodge obstacles, collect coins, and survive as long as possible!

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages