Babylon Toolkit Speedway

Babylon Toolkit: Project Speedway Demo

Some Racing System Features:

  • AAA Driving Mechanics (Advanced Bullet Physics)
  • Skidmarks And Wheel Friction Smoke
  • Fully Baked Static Scene Lighting
  • Realtime Cascade Shadow Maps
  • Light Weight Driver AI Controllers
  • Local Multi Player Driver Support
  • Progressive Web App Support

And much more :slight_smile:

Still early development stages. I still need to get into HUD/GUI and some better AI driver recovery.
Please check out and let me know the kind of frame rates you are getting and running on what hardware and browser setup.

Please try to install the PWA version (Check browser for how to install PWA Apps)
Chrome pops up install icon in address bar at the farr right… Also the ‘Install Babylon Speedway’ option is available on the chrome menu and three dots option button.


Very cool!

Average 30 fps.
Some camera glitches.

WebGL 2.0 (OpenGL ES 3.0 Chromium) - ANGLE (ATI Radeon HD 4800 Series Direct3D11 vs_4_1 ps_4_1)

Yeah I may have to limit to two cars :oncoming_automobile: to get higher frame rate on low-medium class hardware.

Trying to squeeze every little bit of performance enhancers I can… if anybody has any tips on squeezing any more performance out out… please say so :blush:

Yo @JFerret … Can you try again… I removed the large background mesh and reduced the camera far plane to from 6000 to 2000. I also made the demo more of a HEAD TO HEAD racing game. It can physically instantiate as many as want … But trying to maintain the best possible frame rate with at least one AI or Human opponent. Once WebGPU is working i can try to get more AI drivers on the track.

Also i thew a couple more tracks in… they are NOT AI Driver ready… yet. So its solo driving for:

Track Two - Uses all real time shadow demo

Unity Motors - Uses unity racing demo terrain based track

Fiorano Track - A Commercial FBX Track Model From TurboSquid

Try em out and let me know the performance your getting… PLEASE :slight_smile:


Great work @MackeyK24! 120fps @ 120Hz x 5120 x 1440 full screen. Gotta love it.

LOL I somersaulted over the fence somehow and ended up between the grandstand and the barrier fence :sunglasses:

  • 120fps all tracks on my PC - liquid smooth and no rendering glitches, very immersive experience
  • 20-30fps for track 2 on my mac (2017 13" MacBook Pro) - some rendering glitches and stuttering
    • Frame rate dropped closer to 20fps in grandstand areas

Chrome both machines.

Great work. Very impressed.

Yo @inteja … What hardware are you using on your PC… How do get 120 FPS… is there a setting or something you are using to get 120 FPS ???

Yeah… I am using a Convex Shape Ray Cast on the wheels to get a much better and smoother driving surface… The problem is … it will drive over ANY static mesh collider… I need to setup collision filtering and set all GROUND mesh colliders to use a custom Bullet Collision Group/Mask for the wheels… Then i can tag all road as drivable surfaces by assigning to custom GROUND collision filter…

Then you cant DRIVE up the wall and shoot yourself over and end up on wrong side of fence…

These demos are still early stages… I am really trying to create a AAA Physics Based Driving system like you have in Unreal Engine And Unity (Ed’s Pro Physics).

And i am trying to develop smooth follow cameras with no glitches or stutters :slight_smile:

1 Like

Average 40 fps now and no camera glitches.

Pinging @PirateJC

1 Like

Nothing special I did. Just out of the box settings. AMD Ryzen 9 3900X + NVIDIA RTX 2080Ti. Maybe the FPS counter is not accurate with my hardware and config? I seem to recall that WebGL is supposed to be capped at 60fps?

Added to the community page!

1 Like

Yo @inteja and @JFerret… And everyone else really :slight_smile:

Can you please try and test out Track One in the various player modes again

I set the camera far plane to about 3000 and removed the large background ring mesh and removed the audience sound as you pass by the grandstands (for performance)

I also went back to a four car driving experience. It just makes for better gameplay with at least 4 four cars racing on the track. You can also have up to four players. Each can drive one of the four cars or set to auto and the computer AI will drive all four cars. If it just cant handle four cars without having to have a kray… Then ill guess ill go back to a head to head with a maximum 2 players :frowning:

I am trying to stress test this scene. See how much real gameplay scenarios i can throw at my babylon.js projects and see how it holds up. So please try and hammer at it as much as you can and report back your FPS and camera results (and what type of device or machine your running it on)

Please try as many players as you can. Each multiplayer requires an additional gamepad.

  • Player one always is the keyboard and first gamepad.
  • Players 2, 3 and 4 can only play with second, third and forth gamepads

Thanks :slight_smile:

@MackeyK24 at work but will retest when I get home.

@MackeyK24 This is so coooooooooooooooool I love seeing all of this coming together :slight_smile:

Hi @MackeyK24 this is a really great project. There seems to be a sound bug in Firefox. I tried this in Chrome as well, but the sound seems fine in Chrome. In Firefox there’s a continuous skidding sound which starts repeating as soon as the scene is loaded. It’s not related to movement, just a repeating skid skid skid sound :grin: It doesn’t happen in Chrome.

This was on Firefox 72.0.2 , windows 10. GTX 970, core i7 something…

@MackeyK24 Retested track 1, multiple modes:

  • Consistent 120fps on my PC (AMD Ryzen 9 3900X + NVIDIA RTX 2080Ti) - liquid smooth and no follow camera glitches
  • Fairly consistent 20-25fps on my mac (2017 13" MacBook Pro) - but follow camera glitches and stuttering all modes made it difficult to play
    • Follow camera glitches were worse / more pronounced on 4 split

Chrome both machines.

Yo @inteja … So how did your AMD Ryzen PC play with all four (4) simultaneous split screen using 4 gamepads… Still liquid smooth ???

Is there any way you can record some of your PC game play and post the video so i can see this thing run ANY other pc than mine :slight_smile:

Matter a fact… Any others… Please record your gameplay so i can see what it looks like outside my development environment :slight_smile:

Please :slight_smile:

Yo @Deltakosh

Do you know how or why @inteja is getting 120 fps ???

What is the deal behind how fast the browser runs your scene… 30, 60, 120 FPS… How is that selected ???

It is the frequency of your monitor :slight_smile: