8 ms·
Bevy 0.3: game engine built in Rust
- dang 6y agoRelated threads from recent months: https://news.ycombinator.com/item?id=24123283 https://news.ycombinator.com/item?id=24123283 https://news.ycombinator.com/item?id=24334307 https://news.ycombinator.com/item?id=24334307 https://news.ycombinator.com/item?id=24123283 https://news.ycombinator.com/item?id=24123283
- victoriasun 6y agoMan, you guys really kill it with blog/changelog announcements. Great job!
- mrmonkeyman 6y agoNice engine, but Rust's edit-compile-test-cycle is more like 5 minutes than 5 seconds which, to me, is ridiculous for game dev which by its nature demands more and faster experimentation than other lines of work.
- jokethrowaway 6y agoThat's a great pace of changes! For my use case, Bevy web (and mobile is nice too) support would mean switching from Godot, 100%. It will be interesting to see if cross platform support will trickle down to amethyst (I think they share the gfx upstream), who is currently migrating to a faster ECS library (legion). Exciting times!
- runevault 6y agoIsn't Legion more different then just faster? Last I heard the big change was switching to an archetype based ECS which gains speed in some scenarios but does worse if you regularly add/remove components (so temporary effects are just a component you add for a brief time then remove).
- barnabees 6y agoHow does this compare to Amethyst or Piston?
- _cart 6y ago(author here) Here is a link to a conversation we had about this in the Amethyst community: https://community.amethyst.rs/t/bevy-engine-addressing-the-elephant-in-the-room/1645 https://community.amethyst.rs/t/bevy-engine-addressing-the-e...
- adamnemecek 6y agoYou guys should also check out rg3d https://github.com/mrDIMAS/rg3d https://github.com/mrDIMAS/rg3d Join the discord channel https://discord.gg/xENF5Uh https://discord.gg/xENF5Uh
- _cart 6y agoAuthor here. I'm happy to answer any questions you have about Bevy!
- Vermeulen 6y agoAny plans for scripting/logic other than Rust? I can't imagine it working well to quickly iterative on gameplay
- gameswithgo 6y agoThe developers of EVE Online had this same thought, about C++, so they used python as the gameplay scripting language. A few years later faced with unsolveable performance issues with large scale battles they had to resort to slowing down time by a factor of 4, during large scale battles. Just a single anecdote but can be important to keep in mind. As well, some types of scripting languages can have their own productivity problems as projects get large. Lack of types making code hard to follow, bugs harder to track down, refactors riskier etc.
- pjmlp 6y agoThe difference is that Rust is still quite far to support the dynamic capabilities and code reloading of C++.
- gameswithgo 6y agoPeople have been doing hot code reloading with rust for years now. I'm not sure what are all the pros/cons and limitations with each today. I wouldn't think there are fundamental differences.
- _cart 6y agoRust isn't inherently slow to iterate, its just easy to write code that compiles slowly if you aren't careful. One of Bevy's primary focuses is to have fast iterative compile times. Changes to our examples can be recompiled in ~0.8-3 seconds (according to your hardware, os, and linker). We have a "fast compiles" configuration that works quite well. First we do plan on exposing hooks to allow scripting languages to be plugged in to Bevy. We actually already have a pull request out for that. However my default answer to the scripting question is that it is a non-goal for Bevy, and is in fact maybe even an anti-feature. I want Rust to be the "one language" people use to build Bevy games. I think a cohesive ecosystem is an incredibly important part of an engine's success. If half of Bevy devs use rust and the other half use C#, then compatibility and interop become a huge problem. The Rust language choice does set a high bar, but Bevy doesn't need to be all things to all people. Additionally, the Bevy API is a Rust API. Defining FFI on top means we need a second api surface that is the "lowest common denominator" (aka a C api). This both increases maintenance burden and creates the "rust experience" and the "everyone else" experience. In the near future 3rd party Bevy scripting plugins will start popping up, but I doubt I will ever officially endorse them.
- mden 6y agoPlaying with Bevy and its ECS made me shocked (in a really nice way) how much like a dependency injection framework it worked. Writing a system and simply specifying what resources and queries it needs as function arguments and it magically getting them for me makes it really quick to get to the fun part of writing game code. Are other ECSs this ergonomic? Still struggling to really get in the flow of where what data should live, but with time it's getting easier. The realization that you don't need all data to be in components also really helps. For example for my game grid I store it as a Resource and inside I store entities I care about such that I can run a normal path search algo. Overall very impressive and fun project and the discord community is active and friendly.
- _cart 6y agoFlagrant brag: I think we've advanced the state of the art when it comes to ECS ergonomics and (according to my taste) I think we're the most ergonomic ecs in existence. That being said, Legion (another rust ECS framework) recently added a similar approach. But they use macros instead of pure Rust, which is slightly more verbose.
- k__ 6y agoI had the impression macros are used to make code less verbose.
- _cart 6y agoIn legion the macro attributes are used as "labels" for parameters to configure resource types. Theres also the additional boilerplate of annotating the function with a `#[system]`. Bevy ECS relies solely on the type system, which means these additional annotations are not necessary.
- Buttons840 6y agoMacros or pure Rust is more verbose? I could parse your last sentence either way.
- nikki93 6y ago
- Jakobeha 6y agoIt's really nice that this has Android and iOS support. I think the main problems for Rust game development are that and stability.
- offtop5 6y agoThanks for posting this. I really want to learn low level programing, but I learn best when building a project. Does it have networking support ?
- _cart 6y agoWe don't (yet) have official networking apis, but there are a number of 3rd party plugins: https://github.com/bevyengine/awesome-bevy#networking https://github.com/bevyengine/awesome-bevy#networking
- offtop5 6y agoAny Xbox controller support And even Unity uses 3rd party networking solutions, so I wouldn't sweat it that much
- deleted 6y ago[deleted]
- mastrsushi 6y ago_______________ BUILT IN RUST!
- _cart 6y agoI totally get that Rust is sometimes over-hyped. But I'm not sure what you want here. Do you want me to stop building things in Rust? Or is it ok to build things in Rust, but I shouldn't share them? Or is that ok, but if people like it enough to reach the top of hacker news, its just another RIIR (rewrite it in rust) project? The anti-rust backlash is so interesting to me because the Rust community is by far the friendliest programming community I've been a part of. And theres so much high quality new and interesting work being done. Trivializing that really rubs me the wrong way.
- rustfatigue 6y agoBevy 0.3: game engine
- swsieber 6y agoI care about what language I use to interact with engines or libraries. For me, that's objectively worse than Game Engine XXX in language XXX
- mastrsushi 6y agoI want you to define a title that lets readers know it's more than just any old game engine. Being written in Rust doesn't change that.
- _cart 6y agoI'd like to call out that the title _was_ longer with more description, but the mods (understandably) trimmed it down.
- skavi 6y agoWhat graphics backend does this use? I can’t seem to find one listed after a quick search.
- _cart 6y agoOur main backend is wgpu, which is backed by Vulkan, DX11, DX12, Metal, and WebGPU (according to whats available on each platform). We also have a work-in-progress WebGL2 backend (which will eventually become a desktop OpenGL backend too).
- reitzensteinm 6y agoIf you can nail WebGL, this project becomes so tempting. There's basically nothing out there that gives you good cross platform. We're using Unity, and optimizing for wasm performance and size is so awful (they don't have a good solution for streaming). Our parent company uses a js engine, which has meant a far better story on the web, but porting successful games to mobile is awful. You could quite easily become the natural choice to develop a decent cross platform game in.