Skip to content

Farhanulhaq19/Car-Racing-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ๏ธ Car Racing Game

A simple 2D Car Racing Game developed using Python and Pygame. The goal is to dodge incoming enemy cars and survive as long as possible while your score increases.

๐ŸŽฎ Features

  • Player-controlled car using arrow keys
  • Enemy cars with increasing speed
  • Score counter
  • Collision detection & game over screen
  • Background music and crash sound effects (optional)
  • Smooth graphics and real-time updates

๐Ÿ“ฝ๏ธ Demo

(Add a screenshot or GIF here)
You can also upload a gameplay video to YouTube and link it here.


๐Ÿ› ๏ธ Technologies Used

  • Python 3
  • Pygame Library

๐Ÿš€ How to Run the Game

  1. Install Python
    Download from https://www.python.org

  2. Install Pygame
    Open terminal/command prompt and run:

    pip install pygame

Clone this repository

git clone https://github.com/Farhanulhaq19/Car-Racing-Game cd Car-Racing-Game Run the game

python main.py ๐Ÿ“ Folder Structure Car-Racing-Game/ โ”œโ”€โ”€ data/ โ”‚ โ”œโ”€โ”€ images/ # PNG or game graphics โ”‚ โ”œโ”€โ”€ jpeg/ # JPEG format images โ”‚ โ””โ”€โ”€ audio/ # Sound effects and music โ”œโ”€โ”€ Asphalt 8.py # Main game file
โ”œโ”€โ”€ README.md # Project documentation โ””โ”€โ”€ Highscore.txt # Python dependenciestxt

Python dependencies

๐Ÿง  Learning Objectives Practice game development with Python

Use of event loops and collision logic

Asset management (images, sounds)

Real-time rendering with Pygame

๐Ÿ’ก Future Improvements Add multiple levels or difficulty modes

Implement car upgrades or power-ups

Create a leaderboard or save high scores

Add menus and pause functionality

๐Ÿ“œ License This project is open-source and available under the MIT License.

๐Ÿ™Œ Credits Developed by Farhan ul Haq

Pygame documentation: https://www.pygame.org/docs/

Releases

No releases published

Packages

No packages published

Languages