11 ms·
Bevy: A data-driven game engine and app framework built in Rust
- adamnemecek 6y agoGithub link https://github.com/bevyengine/bevy https://github.com/bevyengine/bevy dang, do you want to swap the link to github?
- deleted 6y ago[deleted]
- kibwen 6y agoRather than the GitHub link, I would recommend this page: https://bevyengine.org/news/introducing-bevy/ https://bevyengine.org/news/introducing-bevy/
- Keats 6y agoI've already posted it in https://news.ycombinator.com/item?id=24121947 https://news.ycombinator.com/item?id=24121947 but it didn't get traction :/ +1 on using that URL
- rozgo 6y agoGot the chance of running the examples and glance over the code. Also checked the book and docs. As I mentioned in another post about Bevy, it looks incredibly elegant and clean. Almost feels like this could make engine development fun again. And custom engines feasible. Contrary to popular belief, the need to build your own engine is real for a significant amount of projects. I look forward to being able to quickly put together a few building blocks, customize the renderer and experiment with new systems.
- kibwen 6y agoThe original link posted here (the homepage) doesn't really get in to what makes Bevy interesting, I would recommend this great blog post instead that introduces it: https://bevyengine.org/news/introducing-bevy/ https://bevyengine.org/news/introducing-bevy/ Yesterday's thread on /r/rust: https://www.reddit.com/r/rust/comments/i7bcwu/introducing_bevy_a_refreshingly_simple_datadriven/ https://www.reddit.com/r/rust/comments/i7bcwu/introducing_be...
- dang 6y agoOk, we'll change the URL to that from https://bevyengine.org/ https://bevyengine.org/. Thanks!
- xfour 6y agoMIT License, well done! It's so refreshing to see things released with no strings attached. Yes there is value being created, and the creator should be compensated. But, it's such a breathe of fresh air as a potential end user to not have to worry about intricacies of GPL etc. inclusion.
- pjmlp 6y agoYep, it is so refreshing to have shareware and PD back.
- dgb23 6y agoI have to say the API seems to be very pleasant and simple at a glance. Kudos to the author! > Being able to use Rust functions directly as systems might feel like magic, but I promise it's not! You may have noticed that we do this when registering systems in our App (...) > (...) This works because we implement the IntoQuerySystem trait for all functions that match a certain set of function signatures. This pattern is a great example of how Rust achieves to be both very ergonomic or dynamic (in the sense of expressiveness) and type safe at the same time.
- cthonicthulu 6y agoThat's pretty cool! Is there any material you'd recommend me reading that gives examples of these kinds of ergonomics with traits as they pertain to, say, vanilla web development?
- dgb23 6y agoI merely a beginner and learn the language on the side. Things that come to mind are (incomplete list): - From trait - derive - traits you can implement to convert a data structure into a iterator - Deref, Drop traits, MutexGuard These things appear magical at first but make for very expressive abstractions. In regards to web-dev: a framework that makes heavy use of traits and macros is Rocket. As for material: when I’m learning I typically have The Book, Rust by Example and some tabs of the standard library open. Then just go by curiosity. Perhaps not the best approach?
- adamnemecek 6y agoAlso, I setup a discord channel for Rust GPU programming. https://discord.gg/YbawFYt https://discord.gg/YbawFYt
- CraftThatBlock 6y agoWhat would be the difference between this (which looks really cool!) and https://amethyst.rs https://amethyst.rs ?
- brundolf 6y agoFrom my limited experience (doing Amethyst's Pong tutorial and glancing through Bevy's home page), Amethyst is more mature and also seems more complex (and presumably more powerful). There's quite a bit of boilerplate to get started, but it gives you very fine-grained control over everything like how assets are loaded, how components are laid out in memory, etc. It seems like it's aiming more for the "real game studio" market than for enthusiasts, although last I checked it's also mainly focused on 2D for the time being.
- _cart 6y agoCreator of Bevy here. I just announced Bevy yesterday and the response so far has exceeded my wildest expectations. I'm happy to answer whatever questions people have!
- giancarlostoro 6y agoEverything is beautiful so far, the website is nice looking, the overview is self-explanitory. If I wasn't so in love with Godot I would use this. I think one thing that would sell this would be an editor like Godot has, it's one of the strongest selling points with Godot for me.
- GabLotus 6y agoHey! An editor is definitely on the roadmap. Bevy want's to dogfood here and make the editor using bevy!
- giancarlostoro 6y agoThat's what I figure, I saw that Bevy does support UIs, which is how Godot makes their own UI, and how RPG In a Box[0] was born from Godot itself (I'm not affiliated with RPG In a Box nor Godot, just someone who is learning Godot). I think it's going to be wonderful to see a spawn of powerful and open source game engines in the coming years. [0]: https://www.rpginabox.com/ https://www.rpginabox.com/
- Xevi 6y agoBevy even mentions Godot as an inspiration for building the editor using Bevy itself. The creator of Bevy has a lot of experience with Godot, so I'd assume we're going to see bits and pieces resembling how Godot works.
- giancarlostoro 6y agoI realized that recently, the author is working on a game in Godot as you said. It makes a lot of sense. Godot is a good standard to look up to. I can't wait to see this project as it matures. For anyone curious this is the game from the author: https://www.youtube.com/watch?v=FxW4PcX0fa8 https://www.youtube.com/watch?v=FxW4PcX0fa8 It looks like a lot of fun honestly!
- GabLotus 6y agoThis is awesome! The focus on productivity really sets this apart.
- donpdonp 6y agoI'd like to see how it compares to https://github.com/amethyst/specs https://github.com/amethyst/specs, a rust-based ECS engine, for use in the multiplayer voxel world game Veloren (https://veloren.net https://veloren.net), or https://github.com/TomGillen/legion https://github.com/TomGillen/legion
- meheleventyone 6y agoThere’s not a particularly thrilling benchmark here: https://bevyengine.org/news/introducing-bevy/ https://bevyengine.org/news/introducing-bevy/ Basically an ECS is not really a secret easy pattern to cache coherent data access. This benchmark shows its fast for the easy cases but says nothing about typical game requirements.
- adamnemecek 6y agoECS has been used relatively heavily in game dev since like late 90's.
- meheleventyone 6y agoSo? That has nothing to do with the performance of an implementation which is what I commented on. Data oriented design is about managing data organisation to match access patterns in order to best exploit the hardware cache. That requires more design than simply using the ECS pattern. Which is why a lot of generic engines introduce other concepts like Grouping and Archetypes to try to alleviate this. And even if you do use a generic ECS engine with performance sensitive features it’s still perfectly feasible to end up thrashing. Also as a claim I also find this highly doubtful particularly as I’ve been working as a game developer for many years and not really seen it used on a single project in that time. There’s a reason why there are dozens of hobby implementations but no full scale games written using them.
- adamnemecek 6y agoSerious sam and a lot of bohemia interactive games are written with ECS.
- throw_m239339 6y agoPurely a question. So why would I use rust instead of C++ or C# to develop games? what are the potential advantages of that.
- implfuture 6y agoThere are many reasons, but to name a few important to me: rust gives performance on the level of C++, but with the memory safety of a garbage-collected language. It also provides protection against data races so that you can use concurrency with less chance of hard-to-debug issues.
- rainbow-road 6y agoOver C#: * Garbage collectors often scare game developers since they can lead to hard-to-fix latency spikes. * Rust has some cool libraries (specs, rayon, etc.) that let you safely parallelize computation. Over C++: * It's a memory-safe language, which instantly avoids tons of bugs. * Library interfaces are usually higher-level in Rust than in C++, for various reasons (sum types being a big one). * It's a much smaller language, so there aren't any dark corners that you'll randomly be forced to learn. * It has an easy-to-use package manager, and I'm not sure where C++ is on that front.
- PrototypeNM1 6y ago> * It has an easy-to-use package manager, and I'm not sure where C++ is on that front. In the inescapable hell of n+1 competing standards.
- adamnemecek 6y agoYou mean that every langauge has its own package manager?
- ashtonkem 6y agoI think they mean that C++ isn’t one thing, it varies a lot by the specific compiler and version you’re using.
- AbuAssar 6y agoImpressive! this has the potential to be rust’s flutter! (Bevy UI)
- emmanueloga_ 6y agoJust a note that data-driven is not the same as data-oriented-design [1]. I was trying to see how Bevy embraced data-orientation, but I think it doesn't necessarily do so, since data orientation is more about reducing indirection, for ex., reducing or removing excessive data hierarchies. I think dod is also related to "mechanical sympathy" [2]. Edit: maybe the ECS part is the dod part? I saw the tree demo and it did not look very ECS to me. Maybe it is just the UI? :-) 1: https://meetingcpp.com/mcpp/slides/2018/Data-oriented%20design%20in%20practice_Nikolov_MeetingCpp18.pdf https://meetingcpp.com/mcpp/slides/2018/Data-oriented%20desi... 2: https://mechanical-sympathy.blogspot.com/2011/07/why-mechanical-sympathy.html https://mechanical-sympathy.blogspot.com/2011/07/why-mechani...
- dgb23 6y ago> maybe the ECS part is the dod part? Yes, ECS' usually give you at least a good default that is data oriented. At a glance it seems like it does[0]. Notice how some systems (functions) iterate over components rather than entities, which implies a "struct of arrays" layout that benefits caching. [0] https://bevyengine.org/news/introducing-bevy/#bevy-ecs https://bevyengine.org/news/introducing-bevy/#bevy-ecs Also check here (in their book): https://bevyengine.org/learn/book/getting-started/ecs/ https://bevyengine.org/learn/book/getting-started/ecs/
- Groxx 6y agoI'm getting security warnings visiting the site, on both Firefox and Chrome (though chrome's could be due to an external check, redirects me to malware.opendns.com). "Error code: SEC_ERROR_UNKNOWN_ISSUER" on FF at least. edit: and seems like I'm not the only one, as there's at least one upvote already. probably worth checking!
- _cart 6y agoHmm I'm hosting this on github pages, so maybe its related to how they're issuing certs for my domain. I'll look into it. Thanks for the report!
- therockhead 6y agoSame here.
- Groxx 6y agoIt's working today! Did you have to make a change, or did some caches just get flushed or something? I've seen a couple other github-hosted-page issues like this, but I have no idea what the cause or fix is.
- _cart 6y agoNope no changes on our end. Very weird / makes me trust github pages a little less.
- skocznymroczny 6y agoIt's also blocked by my workplace's corporate firewall, possibly for the same reason.
- gitgud 6y agoFrom the docs [1] > "Bevy is a refreshingly simple data-driven game engine built in Rust." The strange use of the word refreshingly implies that "bevy" could be related to beverage ... (bevy is Australian slang for beverage). But apparently this is not the origin of the name... > A bevy is a group of birds! [1] https://bevyengine.org/learn/book/introduction/ https://bevyengine.org/learn/book/introduction/
- zengid 6y agoI’d love to see a deep dive on how the Trait extension methods work! Great job!
- atoav 6y agoThis is amazing. Seriously: I had a look at nearly every game engine/GUI solution in Rust and this is by far the most thought out, ergonomic and complete thing I found. Color me stoked!
- leshow 6y agoJust curious, have you seen amethyst? https://amethyst.rs/ https://amethyst.rs/ I'm wondering what you find not well thought out about it.
- NTARelix 6y agoI've tried using Amethyst a few times but never finished anything. Upon each attempt I ended up moving to another language/framework due to the frustration of horrible compile times. Also, while there are lots of comprehensive docs, but the docs were written for a variety of versions so there was a lot of friction to get something simple started. It has been several months since my last attempt, so perhaps Amethyst has improved since then. I do love the promises Amethyst makes and for the same reason I'm very interested in Bevy.
- atoav 6y agoI tried Amethyst but found the API had quite rough edges in practise, and there was too much boilerplate for my taste. I certainly had the feeling they did certain things in certain ways not because it was the best solution, but because they didn't find a better way. This was a while ago so it might not be fair as things probably improved since then and one should definitely give it a try as well. That being said the whole bevy way of doing things looks very well considered indeed — maybe both projects can profit from each others existence?
- master-litty 6y agoI gave Amethyst a serious try about a year ago. I even joined the Gitter intending to contribute, as I needed some more dynamic rendering features, and read the foundational research on the wiki that seemed to inspire the project. I found the application of the research -- the execution -- too early in development for my needs. I have the feeling it will grow into something more flexible with time, but at least back then, I wasn't able to render to a texture being applied to a mesh. Not being able to get around the deeply integrated ECS was hard, as well.
- sourceless 6y agoThis might be the killer app that finally gets me to use Rust. I've tried so many engine libs/frameworks in so many languages now, and none of them look nearly as complete and ergonomic as this. I don't really want to have to write my own 3d renderer or ECS because the engine's one is bad or nonexistent... this really scratches an itch for me. Clojure take note...
- prox 6y agoNot only that, but the way it is written draws you in. It tells you its scope, function and methodology right from the start. I kept reading but I know little of Rust.
- amelius 6y ago> This might be the killer app that finally gets me to use Rust. For me that would be a multiplatform GUI library.
- srikz 6y agoRelm looks promising. Actually there are a couple of promising GUI libraries coming up in Rust.
- amelius 6y agoYes. There's https://areweguiyet.com/ https://areweguiyet.com/ But I'm secretly hoping for a multiplatform GUI library that covers smartphones too. I realize that might be too much to ask though ;)
- raphlinus 6y agoThere are multiple projects which show significant promise to deliver this. In addition to Druid, I've been impressed by Iced, and there are several others that are seeing some development.
- 6d65 6y agoIt's funny, I've been doing something similar in Rust. A GUI framework that renders to Vulkan, and at the bottom is an ECS system(multiple systems) for rendering, layout, animation. But this one is very far ahead and looks very polished. Congrats to the author on great work.
- dingoegret 6y agoNot interested in a game engine but the way the site presents this with clear articulable points of what to expect what it does.. I wish everyone would present their stuff like this. Great job man!
- amelius 6y ago> Turtles All The Way Down Does Rust also compile to the GPU?
- Rhedox 6y agoFor now it isnt. There are people working on this. https://github.com/MaikKlein/rlsl https://github.com/MaikKlein/rlsl This is supposed to produce SPIRV though, Becy uses WebGPU which has a custom shading language.
- EamonnMR 6y agoHaving spent a good deal of time working in a dogmatic data driven entity component system very similar to this one, I'd like to point out that while it's very aesthetically pleasing to write code like that, it's not necessarily more productive or pleasant than a more conventional 'entity's behavior lives on the entity' approach.
- maps7 6y agoProbably a completely silly question but what is the difference between this and the Unreal engine?
- tpxl 6y agoThe size, complexity, feature set and language?
- maps7 6y agoI'm not sure if that is an answer or an additional question. If an indie game maker wanted to make a game, why would they use Bevy over the Unreal Engine? It it just because it's different or are there advantages?
- setr 6y agoRust, ECS-core, slimmer abstractions, less tooling (less to learn, but also less pre-built), less complex as a general rule since its less featureful, which also means less cruft/bloat; unreal engine also has a general preference towards "realistic graphics & FPS gaming", to whatever detriment this means for any other type of game (e.g. afaik 2D games are not well-supported or tooled, and probably never will be; graphics tooling can be dramatically overcomplicated when you're chasing something stupidly simple, like replicating King's Field style billboard-3D graphics), etc The big three specifically, which is pretty close to the reasoning for choosing any game engine thats not Unreal/Unity probably would be: 1. Rust 2. ECS 3. More likely to understand the damned thing
- tpxl 6y agoSorry, the sentence has a question mark at the end because basically everything is different. Size: Bevy is probably thousands of times smaller than UE. That is either a feature or a bug, depending on your needs. Complexity/feature set: Bevy is a lot simpler because it's simply smaller. This of course means it's less capable. Again, feature or bug, depending on needs. Language: UE is written in C++, so you can make games in C++ and its own language UnrealScript. Bevy is written in rust. Feature/bug depending on needs. License: UE has a source-available commercial license, while bevy is FOSS (MIT license). A more open license is obviously better, but the commercial licenses generally come with support. That said, I'm not a professional game developer, but am currently experimenting with the Godot engine (Also an indie FOSS engine, but a little older). I don't really like GDScript, but I can just use C++ bindings anyways.
- lilod 6y agoAlways want to create a game engine myself, do you know where to start?