5 ms·
Author here. I'm happy to answer any questions you have about Bevy!
by _cart 6y ago
Author 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.
- _cart 6y agoI also think on of the major selling points of Bevy is that "bevy game devs" are actually "bevy engine devs" ... they just don't know it yet. Bevy is implemented using the same plugin interface that games use, which blurs the line between engine code and game code. Adding scripting languages into the mix removes this benefit and cuts down on the number of people capable of contributing back to the engine.
- nahuel0x 6y agowhat about using rust for scripting but compiled to wasm, so beavy can (hot-re)load wasm modules?
- _cart 6y agothats a scenario im definitely thinking about :)
- Danieru 6y agoWow you've got some good engine design sense. Have you by chance shipped a commercial game before? Most open source engines lak such concrete experience and sense.
- reitzensteinm 6y agoCan you easily serialize/deserialize the game state with your ECS system? I haven't looked closely at it. If it were possible, your iteration times could be ridiculously low. Play the game until the bossfight you're iterating on. Dump it out to disk. Edit the code, recompile and run from saved state in a couple of seconds? That sounds amazing. Unity has pretty good edit and continue for simple stuff, but it quickly falls apart once you start doing non trivial things.
- vlmutolo 6y agoNot sure about bevy specifically, but I know the rapier physics engine (which integrates with bevy) can serialize all of the physics state. Plus, in Rust, if you mark types as Serialize you can serialize nearly anything you want. And it seems like Bevy makes full use of the powerful Rust type system. So I’d guess “yes, you can probably easily serialize the game state in most cases”.
- kiliancs 6y agoI enjoyed reading this release announcement. Thanks for all the details.
- ffhhj 6y agoGreat work! I have developed games in several game engines, but I'm new to Rust. Can it run inside a WebView and communicate with Java (Android) thru a JS interface? That would be awesome.
- _cart 6y agoIt should be able to run in a webview via WASM, but im less certain about the java communication part. If its a normal JS interface then you can probably do it.
- feiss 6y agoHi! I just wanted to say that the sub-asset loading feature is really neat! Beautiful way to handle that use case. One question: if you load two sub-assets from the same gltf, is the gltf cached or loaded twice?
- _cart 6y agoThanks! It is cached. It will only reload if the asset hasnt been loaded yet or was previously freed.
- k__ 6y agoDoes it have any graphical editors?
- _cart 6y agoNot yet, but it's one of our current focus areas: https://github.com/bevyengine/bevy/issues/254 https://github.com/bevyengine/bevy/issues/254
- benecollyridam 6y agoIn your benchmarks of insertion/add/remove[1] you use different units of time for each of the three graphs. I didn't notice until staring at them for some time wondering what was up. Maybe you could make it clearer or use the same unit? I think it is an awesome project and I'm looking forward to trying it out soon! [1]https://bevyengine.org/news/bevy-0-3/#component-insertion-in-microseconds-smaller-is-better https://bevyengine.org/news/bevy-0-3/#component-insertion-in...
- _cart 6y agoSorry my benchmark test suite "fits" the units it reports to the duration. I totally get that its a bit confusing. I probably won't update them for this blog post because generating the graphs isn't fully automated yet (i manually theme the svgs to match the blog style). But for future releases ill keep that in mind.
- ww520 6y agoKudos for building a game engine, especially in Rust. What was the machine's spec to run the benchmark on the ECS? I don't mean to pour rain on the parade, but 1 millisecond to retrieve a component looks really slow. Was it mislabeled as in 1 microsecond? For a game with a 1000 entities, there would mean one whole second to process one component of all the entities.
- msvan 6y agoIt seems like there's a ton of interest in Bevy! You must be spending a lot of time discussing things, reviewing PRs, doing outreach and community building like here. Is there any time left for the hard feature work? Are there any core members apart from you? (Don't burn out!)
- _cart 6y agoI'll be honest: the success of the initial release totally blew me away (both in a good way and a bad way). It took me a little over a month to adapt and develop ways to manage all of the threads (prs, community, dev work) without feeling burnt out. Fortunately I've largely sorted out a workflow that works for my mental health, (i think) works for the community, and still leaves me plenty of time to do dev work. It helps that I can make this my full time job thanks to all of my awesome sponsors. I am currently the only member of the Bevy organization that can merge prs, but a number of people have stepped up to review prs which helps a lot. Eventually I do want to grant more people merge rights, but I'm holding off for as long as possible because I think having a single filter that ensures a cohesive vision is valuable.
- lewisinc 6y agoI'd be happy to hear more about this workflow you've set up for yourself. The more I do development work the more I've come to appreciate having a framework to offload mental overhead onto. I don't think I've found one that quite fits me quite yet, but hopefully soon :fingers_crossed:
- sigy 6y agoI want to second the request to learn more about your workflow. I shepherd OSS projects in addition to dev work, and striking a balance between outreach, admin, and getting things done is always a challenge.