Car Demo 2.0 with a Mini Game and Tyre Marks

Car Visualizer with simple fun game https://hiteshsahu.com/BMW

The most interesting features of this demo are

  1. Use of Ammo JS for Physic simulation including collision detection
  2. On Smartphone you can test drive the car using the Accelerometer sensor.
  3. Real-time Tire marks on the wet ground.
  4. Breakable glasses, you can break all glasses: windscreen, rear glass, window glass, headlights, and tail lights.
  5. There is also a minigame in the demo where you can score by driving through rings. The score becomes zero when you fall into the valley.
  6. The best part of this demo is you can configure any car model in this demo, BMWi8 is just for demo.
  7. For Ambience I have made a tiny Soundcloud Radio which plays Soundtracks of NFS Most Wanted in retro MP3 Player.

Mobile Devices↶📱↷: Car Reacts to the orientation of your smartphone.

  • Horizontal Phone = Acceleration
  • Left or Right tilt your phone to Steers the Vehicle
  • Vertical Phone = Decelerate / Reverse

![1|690x388]

Controls PC :video_game:

  • W, S, A, D or ←, →, ↑, ↓ keys to Drive
  • Press SHIFT for NOS :red_car::dash:
  • L: Toggle Headlights :red_car::bulb:
  • F: Change Drive Camera

(upload://jP0DXO84SRRxj0nUxIRtqmqH8X0.jpeg) ![2|690x388]
(upload://ncDCxihkYiaF7jKsBxUNkKAIJlt.jpeg)

![6|690x388]

Fun Zone :checkered_flag:

  • Click/Tap: Throw Metal Balls (try Breaking all windows & Lights) :comet:
  • Change colors of Brand, Rim, Hood & Body :red_car::art:
  • Drive through Rings to Score :boom:
  • Enable/Disable Shadow option for Realistic/60FPS :bust_in_silhouette:
  • Mouse Drag and scroll to Zoom out Camera
  • Change songs on Radio :radio:

(upload://rW6m0bPCfOrKSzFaLZ7h2GW8MuA.jpeg)

4 Likes

Amazing!
Very good scene optimization, I didn’t notice any FPS drops even while driving like crazy :slight_smile:

1 Like

But performance is bad in Firefox - 30 fps. In Chrome - 60 fps. Same system.

OMG! :open_mouth:

1 Like

Not sure why it is happening :confused: . Even it run at 60 fps on smartphone

Thanks @labris

I have found that Physics simulations using Ammo/CANNON runs slower in Firefox as compared to chrome

Firefox on left Chrome on right side

Second run:

Third run:

It’s great! I want to know how is this achieved ?