Skip to content

0marii/unity-game

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏎️ Unity Car Racing Game

A 3D Mario Kart-inspired car racing game built in Unity with C#. Features AI opponents, combat mechanics, an open-world exploration mode, dynamic weather, a coin economy, player profiles, car selection, and map selection — all packed into one project.


🎮 Features

👤 Player Profiles

  • Create and manage multiple player profiles
  • Each profile tracks its own coins, unlocks, and progress independently
  • Switch between profiles from the main menu

🚗 Car Selection

  • Choose from a roster of cars before each race
  • Each car has unique stats (speed, acceleration, handling)
  • Cars can be unlocked through the coin economy
  • Selected car is saved per profile

🗺️ Map Selection

  • Pick from multiple race tracks and environments before racing
  • Each map has a distinct layout, difficulty, and visual style
  • Some maps may be unlockable via coins or exploration progress

🤖 AI Opponents

  • Compete against AI-controlled cars that race alongside you
  • AI follows the track using waypoint/pathfinding logic
  • Provides a real challenge — opponents adapt to the track layout

🔫 Combat — Shoot Other Cars

  • Players can fire projectiles at rival cars mid-race
  • Hit opponents to slow them down or knock them off course
  • Ammo and power-ups are collected around the track
  • Adds a Mario Kart-style combat layer on top of traditional racing

🪙 Coin System

  • Collect coins scattered across the race track during gameplay
  • Coins are earned through racing, placing well, and exploring
  • Accumulated coins unlock new cars, maps, or cosmetics

🌍 Exploration Mode

  • Once you've collected enough coins, an open exploration mode unlocks
  • Drive freely around open environments without racing pressure
  • Discover hidden areas, collectibles, and secrets in the world

🌦️ Dynamic Weather

  • Real-time weather system that affects racing conditions
  • Weather types include: clear, rain, fog, and storm
  • Rain and fog affect car handling and visibility
  • Weather can shift during a race or be selected beforehand

🛠️ Built With

Technology Role
Unity Game engine
C# All game logic — cars, AI, combat, UI, coins, weather (71.6%)
ShaderLab Custom visual shaders for environment and effects (20.8%)
HLSL GPU-level shader programming for weather and lighting (3.6%)

📁 Project Structure

unity-game/
├── Assets/
│   ├── Scripts/                    # All C# game logic
│   │   ├── CarController.cs        # Player car physics & input
│   │   ├── AICarController.cs      # AI opponent waypoint racing
│   │   ├── ShootingSystem.cs       # Projectile / combat system
│   │   ├── CoinManager.cs          # Coin collection & economy
│   │   ├── WeatherSystem.cs        # Dynamic weather control
│   │   ├── ProfileManager.cs       # Player profile management
│   │   ├── CarSelector.cs          # Car selection UI logic
│   │   ├── MapSelector.cs          # Map/track selection logic
│   │   └── ExplorationManager.cs   # Open-world exploration mode
│   ├── Scenes/           # Unity scenes (menu, car select, tracks, exploration)
│   ├── Prefabs/          # Car, projectile, coin, and environment prefabs
│   ├── Materials/        # Shaders and materials (weather effects, car skins)
│   └── ...
├── Packages/             # Unity package dependencies
├── ProjectSettings/      # Unity project configuration
├── .gitignore
└── README.md

Note: Script filenames above are illustrative — check Assets/Scripts/ for the exact names.


🚀 Getting Started

Prerequisites

  • Unity Hub installed
  • Unity Editor — check ProjectSettings/ProjectVersion.txt for the exact version used
  • Git

Installation

  1. Clone the repo:

    git clone https://github.com/0marii/unity-game.git
  2. Open in Unity Hub:

    • Launch Unity Hub → click Add → select the unity-game folder
    • Open with the correct Unity version
  3. Load the Main Menu scene:

    • In the Editor, go to Assets/Scenes/
    • Open the Main Menu scene and press ▶️ Play

🎯 How to Play

Before the Race

  1. Select or create a player profile
  2. Choose your car from the garage
  3. Pick a map and optionally set the weather
  4. Hit Race!

Controls

Key Action
W / Accelerate
S / Brake / Reverse
A / Steer Left
D / Steer Right
Space Shoot projectile at opponents
ESC Pause Menu

During the Race

  • Collect 🪙 coins on the track
  • Shoot rivals to disrupt them
  • Outrace AI opponents to finish first
  • Earn coins based on finishing position

After Enough Coins

  • Unlock Exploration Mode and roam freely
  • Spend coins to unlock new cars and maps

🌦️ Weather Conditions

Weather Effect on Gameplay
☀️ Clear Normal visibility and full traction
🌧️ Rain Reduced grip, slippery corners
🌫️ Fog Low visibility, harder to read the track ahead
⛈️ Storm Combined rain + severely reduced visibility

👥 Contributors


Built with Unity · Inspired by Mario Kart 🍄 · Race. Shoot. Explore. 🏁

About

Race, shoot, and explore — a Mario Kart-inspired 3D racing game in Unity with AI opponents, dynamic weather, a coin economy, and an open-world exploration mode.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C# 71.6%
  • ShaderLab 20.8%
  • Wolfram Language 4.0%
  • HLSL 3.6%