Skip to content

Osaidgit/2d_Cargame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚗 2D Car Game

A simple 2D car racing game built with Pygame.
This is my first Pygame project — created to learn game development concepts like movement, collision, world design, and rendering.


📌 Features

  • 🎮 Player-controlled car with movement & steering
  • 🛣️ Road/track system built with nodes and world logic
  • ⚡ Real-time game loop with smooth frame updates
  • 💥 Collision detection with boundaries/obstacles (if implemented)
  • 🌍 Modular code (world.py, node1.py, etc.) for easier expansion

🗂️ Project Structure

2d_Cargame/
│── main.py          # Entry point of the game
│── world.py         # Handles track/world design
│── node1.py         # Node system (road/track navigation)
│── decorators.py    # Helper decorators (if used for functions)
│── test.py          # For testing functions/modules
│── assets/          # Sprites, car images, background, etc.
│── README.md        # Documentation

🎮 Controls

(Default — update if different in your code)

  • ⬆️ Up Arrow / W – Accelerate
  • ⬇️ Down Arrow / S – Brake / Reverse
  • ⬅️ Left Arrow / A – Steer Left
  • ➡️ Right Arrow / D – Steer Right
  • Esc – Quit game

🚀 Installation & Setup

  1. Clone the repository

    git clone https://github.com/Osaidgit/2d_Cargame.git
    cd 2d_Cargame
  2. Install dependencies Make sure you have Python 3.x installed. Then:

    pip install pygame
  3. Run the game

    python main.py

📸 Screenshots

(Add screenshots of your game here — you can take them while playing and save in /assets or /screenshots folder.)

Example:

Gameplay Screenshot


🔮 Future Improvements

  • Add AI opponent cars 🚘
  • Add scoring & lap timer ⏱️
  • Create multiple levels / tracks 🌍
  • Add background music & sound effects 🎵
  • Improve graphics with animations & particle effects ✨

🛠️ Built With


👤 Author

Osaid Ali


👉 Feel free to fork this repo, raise issues, and contribute improvements!

About

This is my first pygame project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published