I always wondered "What if I port my three.js game to Rust? Will it improve performance?"
I finally ported it to both Rust Desktop and Rust WASM (that runs on the browser)
Comparing the three.js version with the Rust desktop I had a clear winner: Rust desktop.
But now I took the time to port it to the web using Web Assembly (WASM)
And my conclusion is... A tie! Both versions averaged 42FPS (60FPS if running one at a time)
So if your goal is to ship a web game, it doesn't even matter the tech you use.
(Three.js is recommended because the ecossystem is huge though)
As long you optmize well (Web workers, reduce triangles, draw calls, etc) you should be good to go.
But in the event you want to ship a native game to publish on Steam a system language (Rust, C , etc) will be better for you.
Now I want to port the three.js game to Desktop using Electron and see the results.
I'll let you know.
Btw, I'm open to new freelance projects.
If you have anything for me, my DMs are open!
I tested Rust vs Javascript for games 🎮
I had this question recently and decided to port my Three.js game to Rust Desktop
I'm still not able to reproduce the same look on both games but I believe that codewise they are very similar
With both games running, the Rust version averages 37FPS while the Three.js version averages around 20FPS
If I'm running one game at a time the FPS goes up considerably (60 FPS on both with power on)
So the Rust version for Desktop has 85% increase in performance on my Macbook Pro M4
This comparision is basically comparing Browser vs Native, which is not completely fair
So that's why I want to port the Rust version to WASM on the browser and benchmark again soon