Based off Sketchbook. Two tracks to try. The setup is for the car, but at some point need to adjust that per track. AI needs work for sure.
Try it here
Hello! I have got 12 fps
rad! car physics feel solid. would be sick multiplayer…
I get it that this is still in development but the wait time is big and when I click on “debug fps” the browser downloads a "scene.gltf"?
Edit: Got to load the game. Seems fun and nice. I’d like to play this game when it is done.
Thanks for feedback.
12fps is really slow, I am at 60fps avg.
Thanks, yeah I would like to get multiplayer. I have looked at some code around that. Might ditch AI, and just go for multiplayer.
debug fps - oops, yeah that is basically the scene that I can load up into Blender and use for debugging purposes. I build the track dynamically, all geo. I forgot to remove that. I’ll look into the load times, its fast for me, but I’ve got a pretty fast connection.
Come with us! Let’s make your mode part of a web3 game!
Write to me to contact me on telegram: @gevoy
one thing that might help is switching how collisions are handled
with a plain cannon setup you’re usually relying on broadphase plus triangle meshes or lots of bodies, which gets heavy pretty fast especially with big tracks
with BVH on the three.js side you can do really fast raycasts and spatial queries against the track mesh itself, so instead of feeding complex geometry into cannon you keep cannon simpler and let BVH handle the heavy lookup work
in my case it made a big difference because cannon didn’t have to deal with as many detailed collision checks, while BVH handled the precise surface hits way faster
so it’s kind of like
cannon alone = more physics workload per frame
BVH + cannon = split the work, faster queries and lighter physics
especially noticeable once the track geometry gets large or procedural
btw I tried a similar approach here https://theneoverse.web.app/#threeviewer&&redrock-ridge