What (dis)advantages does writing a game in Rust (with Bevy) have compared to other languages? Keen to hear about performance, safety, and dev velocity.
- Rust performance is comparable to C/C++, but Bevy has had much less time to get optimized than C/C++. Our ECS is fast, but slower than flecs, and our rendering performance is about Unity level IIRC.
- Safety / correctness is a huge benefit. Memory safety is obviously nice for reducing horrible segfaults, but ultimately I end up really loving enums, traits and the ease of unit testing to make refactoring games (and the libraries they rely on).
- Talking to experienced game devs, velocity is quite good! Once you're off the ground, a ton of your time comes from a) refactoring b) bug fixing c) adding bog-standard but tedious functionality like localization. I've talked about the first two, but Rust's first class packaging ecosystem (and Bevy's modularity) means that you can actually share work for that, rather than rewriting it at every company like you see in a lot of other game dev.
Gameplay features are wildly easy to write, but GUI creation is still miserably tedious with a fragmented ecosystem.
On development velocity, I will note that Linux's compilation times for Rust are meaningfully better than Windows, although M1 Macs are compelling too. The lack of visual editor tooling definitely slows things down too, even though good ecosystem options for that are emerging.
The console toolchains are proprietary and locked behind NDAs. An engine cannot be both open source and support consoles. What it can (and Godot does) is have a closed-source version of the engine (or just plugins) that you are only permitted to license once Sony/Nintendo/MS has approved you. That version or those plugins can then contain the code required for the consoles.
The biggest disavantage is that no one uses Rust to create games, it's all C++ or C#. So all the documentation, knowledge, libraries etc ... are missing and / or different.