A high-speed, infinite 3D racing game built with Three.js and the Cannon.js physics engine. Dodge obstacles, collect powerful upgrades, and push your car to its limits on a dynamically generated road.
You can play the game live in your browser by clicking here: Click Here
- Infinite Road Generation: The road is procedurally generated as you drive, creating a unique and endless experience every time.
- Physics-Based Gameplay: Powered by Cannon.js for realistic car handling, collisions, and obstacle interactions.
- Dynamic Upgrade System: Collect four types of upgrades to enhance your vehicle:
- 🚀 Max Speed: Permanently increases your car's top speed.
- 🛡️ Resistance: Withstands higher speed collisions before losing upgrades.
- 🏎️ Better Tires: Improves turning speed for more agile handling.
- 🛑 Better Brakes: Increases braking force for quicker stops.
- Intelligent Collision Penalties: The number of upgrades you lose upon crashing depends on your speed at impact—a minor bump is forgiving, but a high-speed collision is devastating!
- Responsive Controls:
- PC: Use
WASDor Arrow Keys for precise control. - Mobile: Utilizes device gyroscope for intuitive tilt-to-steer controls.
- PC: Use
- Pause Menu: Pause the game at any time by pressing
Escto see your current stats, resume, or return to the main menu. - Detailed Game Over Screen: Get a full breakdown of your performance, including final score, max speed reached, and total upgrades held.
- Accelerate:
WorUp Arrow - Brake/Reverse:
SorDown Arrow - Steer Left:
AorLeft Arrow - Steer Right:
DorRight Arrow - Pause Game:
Escape
- Steer: Tilt your device left and right.
- Accelerate / Brake: Use the on-screen touch buttons.
- Rendering Engine: Three.js
- Physics Engine: Cannon.js
- Core Logic: JavaScript (ES6)
- Platform: HTML5 Canvas & CSS3
To run this project on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/kndnsow/Car_Simumator.git
-
Navigate to the project directory:
cd Car_Simumator -
Open
index.html: Since this project does not require a complex build setup, you can run it by opening theindex.htmlfile in your web browser. For best results and to avoid potential CORS issues with file loading, it is recommended to use a simple local server.
This project is licensed under the MIT License. See the LICENSE.md file for details.