Police Chase is a 3D arcade-style coin collection and chase game I built during 10th grade using Unity and C#. The objective is simple: collect coins while avoiding AI-controlled police cars.
UnityC#Game AIPathfindingSteering BehaviorsRigidbody PhysicsCamera SystemsLightingUI / HUDOptimizationBlenderPhotoshop / GIMPGitmacOSWindows

Features⌄
- Vehicle Physics: Acceleration, velocity, turning, drift, and friction all tuned in C#.
- Camera System: Third-person chase camera with smooth follow, rotation interpolation, and zoom scaling at high speeds.
- Lighting System: Full day/night cycle with a rotating directional light to simulate sun movement.
- AI Opponents: Police cars pursue dynamically with adaptive speed, steering, and randomness for unpredictability.
- Gameplay Systems: Coins, power-ups (Speed Boost, Shield, Multiplier), scoreboard, timer, and restart logic.
- Performance Optimization: Stable 60 FPS achieved on both Mac & Windows executables.

Technical Implementation⌄
- Vehicle Dynamics (C#): Custom acceleration curves and max velocity caps; force-based steering for smooth turning and drift mechanics; adjusted center of mass to stabilize car handling during sharp turns.
- Camera Controller: Smooth third-person follow using lerp interpolation; speed-based zoom and tilt to give a cinematic driving feel.
- Lighting & Environment: Rotating directional light to simulate a sun cycle; dynamic shadows and particle effects (collisions, sparks, coin pickups).
- AI Pursuit Logic: Waypoint navigation + real-time pursuit adjustments; randomized pursuit angles and speed boosts to prevent predictability.
- Game Systems: Modular scripts for UI states, scoring, and power-ups; power-up effects integrated directly into physics (speed multiplier, temporary invincibility).
- Performance & Stability: Reduced physics timestep for consistent performance; optimized colliders and limited AI spawn count.

Challenges & Solutions⌄
- Car flipping on sharp turns → Fixed by lowering Rigidbody.centerOfMass.
- AI too predictable → Added randomized pursuit speed and turn variance.
- Performance drops with too many AI cars → Reduced physics timestep + capped AI spawns.
- Camera jitter at high speeds → Implemented lerp smoothing and velocity-based camera offsets.
Technologies Used⌄
- Unity – Game engine for environment, physics, rendering.
- C# – Core scripting for vehicle physics, AI, camera, and UI.
- Blender / Free Assets – Models for cars, coins, and environment.
- Photoshop / GIMP – Textures and UI design.
- MacOS & Windows – Tested and built as standalone executables.
Instructions
- Objective: Collect coins while avoiding police cars.
- Coins spawn randomly around the map.
- Police cars chase the player with increasing aggressiveness.
- Power-ups (Speed Boost, Shield, Multiplier) give advantages.
- Game ends if the police catch the player.
Controls
W/UpAccelerate
S/DownBrake / Reverse
A/LeftSteer Left
D/RightSteer Right
ShiftActivate Power-Up
Download & Play
- Platforms: MacOS & Windows
- Status: Fully playable demo build