A compact 3D Unity driving game where you steer through a low-poly road course, collect coins, avoid obstacles, and reach the finish line to win.
Third-person driving Β· Coin collection Β· Obstacle avoidance Β· Win / lose flow Β· Menu-driven scene progression
Replace
docs/gifs/gameplay.gifwith an exported gameplay GIF or short loop from the finished game.
- Overview
- Features
- Gameplay Mechanics
- Controls
- Technologies Used
- Unity Version Compatibility
- Folder Structure
- Scripts and Modules
- Installation and Setup
- How to Play
- Screenshots
- Future Improvements
- Contribution Guidelines
- License
- Author
Car Obstacle Game is a Unity-based obstacle driving game built around a simple and readable gameplay loop: drive forward, collect score pickups, avoid hazards, and hit the finish trigger to win. The project includes a menu scene, pause/resume flow, game-over handling, and scene restart logic, making it a solid example of core Unity gameplay systems working together.
The repository is especially suitable for a portfolio because it demonstrates practical use of Unity physics, trigger events, UI panels, scene management, TextMesh Pro, and chase-camera behavior in a small but complete game.
| Item | Details |
|---|---|
| Engine | Unity 2021.3 LTS or newer |
| Language | C# |
| Genre | Obstacle driving / arcade racer |
| Platform | PC / Desktop |
| Rendering | Universal Render Pipeline |
| License | MIT |
|
Responsive car movement with steering, forward motion, and a clean chase-camera setup. |
Collectible coins increase score through a lightweight TextMesh Pro-powered score system. |
|
Obstacle collisions trigger a game-over screen, while the finish line activates a win state. |
Pause, resume, restart, and menu navigation are supported through in-game UI controls. |
|
Built with imported low-poly road, vehicle, and obstacle assets for a polished arcade look. |
Designed to demonstrate Unity scripting, scene management, physics, and UI integration. |
- π Third-person car movement with steering and forward drive
- πͺ Coin pickups with score updates
- π₯ Obstacle collision detection with game-over state
- π Finish trigger with win screen
- βΈοΈ Pause, resume, and restart flow
- π₯ Simple camera follow system for gameplay visibility
- π₯οΈ Main menu with play and quit actions
- π¨ Imported low-poly road and vehicle assets
| Mechanic | Description |
|---|---|
| Movement | The player car uses the vertical axis for forward motion and the horizontal axis for rotation. |
| Collision | Colliding with objects tagged as Obstacle activates the game-over panel and pauses time. |
| Collectibles | Coins use trigger detection to increment score and are removed after pickup. |
| Win state | Entering the finish trigger displays the win panel and freezes the game. |
| Restart flow | Win and game-over states both support restarting the current scene. |
| Camera | The camera follows the car using a fixed offset to maintain a chase view. |
| Input | Action |
|---|---|
W / S or Up / Down |
Move the car forward or backward |
A / D or Left / Right |
Rotate the car left or right |
| Mouse / UI buttons | Navigate menu, pause, restart, and quit actions |
| Technology | Purpose |
|---|---|
| Unity | Game engine, scenes, physics, and UI |
| C# | Gameplay scripting and scene control |
| TextMesh Pro | Score and UI text rendering |
| Unity Input Manager | Keyboard input handling |
| Unity Physics | Collisions and trigger events |
| Universal Render Pipeline | Rendering pipeline setup |
Recommended for Unity 2021.3 LTS or newer.
This project uses the legacy Input Manager API (Input.GetAxis), standard Unity physics callbacks, scene loading, and TextMesh Pro. Those systems are broadly supported across LTS releases, so the project should open cleanly in modern Unity versions without a large migration effort.
| Path | Purpose |
|---|---|
Scenes/ |
Main menu, sample scene, and road demo scenes |
Resources/ |
Runtime and test metadata used by Unity |
ARCADE - FREE Racing Car/ |
Imported racing car and road environment assets |
BrokenVector/ |
Low-poly road pack content |
Obstacle Pack/ |
Obstacle models, prefabs, and materials |
SportCar/ |
Vehicle asset pack and related configuration files |
PolyKebap/ |
Additional asset-pack content used by the project |
SyntyStudios/ |
Imported Synty assets and metadata |
TextMesh Pro/ |
TMP resources and supporting files |
Root *.cs files |
Core gameplay scripts for movement, UI, scoring, and scene flow |
| Script | Responsibility |
|---|---|
playerMovement.cs |
Reads input and moves/rotates the player vehicle. |
cameraFollow.cs |
Keeps the camera aligned to the player with a fixed offset. |
PlayerCollision.cs |
Shows the game-over UI when the player collides with obstacles. |
Coin.cs |
Handles coin pickup scoring and destroys collected coins. |
CoinCollectible.cs |
Alternate collectible script for pickup interaction. |
ScoreManager.cs |
Singleton score system that updates the TextMesh Pro display. |
gameManager.cs |
Controls pause, resume, and scene restart actions. |
MainMenu.cs |
Starts the game scene or quits the application from the menu. |
WinCondition.cs |
Detects the finish trigger and shows the win panel. |
SportCar/Settings/Racing_Game.cs |
Asset-pack support script included with the imported vehicle content. |
- Clone or download the repository.
- Open the project folder in Unity Hub.
- Select a compatible editor version, ideally Unity 2021.3 LTS or newer.
- Let Unity import the project assets and resolve packages.
- Open
Scenes/Main Menu.unity. - Press Play to launch the game from the editor.
If references appear missing after import, verify that TextMesh Pro and the bundled asset packs are fully imported.
- Launch the game from the main menu.
- Use the keyboard controls to drive the car.
- Avoid obstacles tagged
Obstacle. - Collect coins to raise your score.
- Reach the finish trigger to complete the level.
- Use the on-screen restart button after a win or loss to play again.
Add exported screenshots here to showcase the game visually in the repository.
Use consistent image sizes and place the files under docs/screenshots/ so GitHub renders them cleanly.
- Add gamepad and touch input support
- Expand the game into multiple levels or courses
- Improve vehicle physics and steering feel
- Add music, sound effects, and feedback polish
- Introduce high scores and run statistics
- Unify collectible scripts into a single pickup system
- Add a settings menu for audio and graphics options
Contributions are welcome. If you plan to improve the project:
- Fork the repository.
- Create a feature branch.
- Keep changes focused and well named.
- Test the project in Unity before submitting a pull request.
- Match the existing scene, naming, and script conventions.
Please keep pull requests focused and include screenshots or short notes when changing gameplay or UI behavior.
This project is licensed under the MIT License.
You may use, modify, and distribute the project under the terms in the license file.
If you use this project in your portfolio or build on top of it, please keep the attribution and license notice intact.




