top | item 26131350

Bevy: A game engine built in Rust

173 points| yagizdegirmenci | 5 years ago |github.com

117 comments

order
[+] nindalf|5 years ago|reply
There are other attempts to build a game engine in Rust. In my opinion, what sets Bevy apart is the pace at which they’re developing. Look at the release notes for Bevy 0.4 (https://bevyengine.org/news/bevy-0-4/), released 6 weeks after Bevy 0.3 (https://bevyengine.org/news/bevy-0-3/). They have momentum, plenty of contributors (50+), improving the ergonomics of existing APIs, improving the performance of pieces already performing well.

If I was making a game today, I’d probably pick Unity. A year from now? I’d take a good look at where Bevy is then. Good luck to cart and the other contributors.

[+] rapsey|5 years ago|reply
Bevy has a full time developer working on it and has benefited from a whole lot of lessons learned from past attempts at building an engine in Rust.
[+] jokethrowaway|5 years ago|reply
I really like Bevy but I think that's a bit optimistic and based on the size of the studio.

Godot is in a much better spot at being the next Unity and it took a long time. It's still not there because of assets availability: you can find assets for anything for cheap on Unity.

For an indie developer with little budget and time to build complex features, it's a life saver.

For a mid-size studio (Embark?), happy to build their own technology, Bevy could be a great starting point, but the feature set is still not there.

As a solo developer trying to build a game, I tried going Bevy / Godot / tons of others and ended up back to Unity: I don't like it and it's a complete disorganised and buggy mess but it gets stuff done incredibly quick.

I didn't pick Unreal Engine because of the 5% cut over 3k. It's a marginally nicer environment to work in but I don't think it's worth the price tag over Unity (free under 100k revenue).

[+] k__|5 years ago|reply
From all the game engines I've seen in the last years, Bevy looks the most promising.

The API looks very clean and the development speed is outstanding for an open-source product.

After reading that Rust now plays in the C/C++ league I'm really excited about Bevy.

[+] JoeyBananas|5 years ago|reply
I certainly have nothing against this, but even at the pace they are going it will take a long time before this is anything but just another unnecessary "rewrite it in Rust" project to me. I think Godot engine is a lot more promising for general purpose use.
[+] _cart|5 years ago|reply
Hey we're back on HN. I'm Bevy's creator / lead developer. Feel free to ask me anything!
[+] ttymck|5 years ago|reply
I just recently started learning bracket-lib (fka rltk), and it's tutorials recommend Legion ECS, but I'm finding the macros and magic of Legion to be less ergonomic than what I've seen from bevy. Is it possible/advisable to use Bevy as a standalone ECS, that doesn't require owning the "main loop"?
[+] acpetrov|5 years ago|reply
Any current or planned VR features? Cheers
[+] openfuture|5 years ago|reply
Gamelisp is also a super cool rust game development project. You expose gamelisp runtimes in different parts of your program, then compile and run it with gamelisp programs going into the various runtimes. Now you can iterate on your gamelisp parts without recompiling.

The documentation is very good(!) and the approach is very interesting imo, iteration times disappear but you can keep all your performance (by moving the logic into rust as you settle on a design).

[+] kierangill|5 years ago|reply
Can anyone speak to their experience using Bevy on the web with WASM (related [1])? Are there other non-JavaScript game engines you’d recommend?

[1] https://github.com/bevyengine/bevy/issues/88

[+] lwansbrough|5 years ago|reply
Bevy currently works on the web with a separate WebGL 2 based renderer. WebGPU is the long term target so that the wgpu based renderer will work cross platform. I’m not sure of the status of single-threaded WebGPU rendering but Bevy will not fully support web likely until this issue [1] is addressed. It is unfortunately not a high priority for the Chrome/Firefox teams so will take some time. You need to be able to render WebGPU to a canvas from a worker before you can achieve multi-threading.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=116971...

[+] ncmncm|5 years ago|reply
Rust seems like an odd choice for game development: Given adequate runtime performance and expressiveness, perhaps the most valued quality in a language used for the purpose is minimal turnaround time in the edit-build-test cycle.

Here, Rust is, AFAIK, far behind other languages. C lacks expressiveness, but C++ and C# seem popular for the purpose, and their build time is good. Incremental compilation is sometimes available, potentially avoiding a slow, non-parallelizable link step.

Rust is promoted for security, but I have not heard of that as a criterion for game work, and it seems like the first criterion to be jettisoned vs. any other.

What makes Rust's slow build times tolerable for this use? Has it had more progress in incremental building than I know about?

[+] _cart|5 years ago|reply
Bevy has very fast iteration cycles and it has been a core "required" feature since the beginning. With our "fast compiles" config, compiling iterative changes to most of the examples takes less than a second. Changes to the "3d_scene" example compile in ~0.5 seconds on my machine.

Check out our most recent efforts in our last blog post, where we added easy dynamic linking for a massive compile speed boost: https://bevyengine.org/news/bevy-0-4/

I also discuss the perception that "Rust is slow to compile " in the original Bevy announcement post: https://bevyengine.org/news/introducing-bevy/

In short: fast compile times in Rust are possible. As long as your core libraries do the "right things" when it comes to design, writing user code can be extremely productive. The compiler has also gotten a lot faster over the last couple of years.

[+] pjmlp|5 years ago|reply
Security is relevant on server code and copy protection mechanisms, however modern game development is composed by multiple skillets, that join efforts across middleware like Unreal.

So I am with you that Rust has a very uphill battle for adoption in any game console devkit.

[+] iptq|5 years ago|reply
why does it feel like i'm seeing more rust game engines than actual games? (outside of toy 2048 clones)
[+] pacificat0r|5 years ago|reply
To make an engine it's ok just to gather a bunch of programmers.

To make a game (even a tiny one) you need artists, sound designer, designers and so on and that's what makes it significantly harder

[+] MaxBarraclough|5 years ago|reply
The Forth community takes this one step further: it's more common to see someone discussing their implementation of the Forth language, than to see someone discussing what they developed in Forth.
[+] steveklabnik|5 years ago|reply
This is a pretty common joke about all game development, not just Rust.
[+] echelon|5 years ago|reply
I'm about to build a stack on top of Unreal, but I don't really need the "game" parts, just the "real time rendering" ones.

I consider building on Unreal to be an (acceptable) risk, but I'd prefer to build on something not owned by another company.

I'm really hoping some of these Rust projects start to focus on rendering, not just the game pieces.

[+] JoeyBananas|5 years ago|reply
Have you considered Godot engine? Godot is free software, so legally you have the right to do basically anything with it that Godot engine's owners do. It's years ahead of the engine in the OP in terms of features+polish, and seems likely to continue being developed for a long time. I'd definitely suggest using Godot unless you really need a specific feature of Unreal engine.
[+] ratww|5 years ago|reply
How much of rendering you need? Are you providing the shaders yourself?

If you only need multi-platform rendering (including Emscripten, and a shader abstraction), have you looked into BGFX, or even Sokol GFX? They provide the bits you need to render. Unity is even using BGFX in its "Tiny" version. Sokol GFX is new but very easy to use.

I believe both have Rust bindings if this is important to you.

[+] Fred27|5 years ago|reply
I'm not sure using Unreal is a risk. It's used commercially by a lot of companies for much more than gaming. It's also open source. Obviously not written in Rust though, if that's important.
[+] prox|5 years ago|reply
Have you considered Godot? You can use wrappers.
[+] fctorial|5 years ago|reply
Build fails with 6 month old rust.
[+] pacificat0r|5 years ago|reply
It's not surprising that a project that's really early in development chooses to keep up with the latest rust as a min. reqirement.

Once it gets to a 1.0, that adoption of new features may slow down.

[+] rapsey|5 years ago|reply
Why would you use 6 month old rust?
[+] Macha|5 years ago|reply
It's competitor, Amethyst, fails to build on Linux with current Rust.

I think it's something to do with outdated dependencies of winit running into namespacing issues with macros that were added to the standard library

[+] lsmurray|5 years ago|reply
Does anybody know if bevy supports networking or multiplayer?
[+] lwansbrough|5 years ago|reply
There are a couple networking plugins in the works. They are focused on providing cross-platform UDP networking. But it’s still mostly roll your own.
[+] Angius|5 years ago|reply
Can't wait to use `player!.0.<>->move^([]->^t, Box<&loc, g*>)` to move player characters!
[+] _cart|5 years ago|reply
We've heavily invested in legibility and ergonomics in Bevy. I'd argue that our ECS is top tier in ergonomics and legibility across all engines / languages. Here is a gist of a fully self-contained Bevy App for player movement. Feel free to compare that to _any_ other engine / framework:

https://gist.github.com/cart/96b1d39cd04274da566dbf28bf87c2a...