[HN Gopher] Bevy: A data-driven game engine and app framework bu...
       ___________________________________________________________________
        
       Bevy: A data-driven game engine and app framework built in Rust
        
       Author : adamnemecek
       Score  : 200 points
       Date   : 2020-08-11 17:44 UTC (5 hours ago)
        
 (HTM) web link (bevyengine.org)
 (TXT) w3m dump (bevyengine.org)
        
       | _cart wrote:
       | Creator 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!
        
         | [deleted]
        
         | mrec wrote:
         | Great start here and a very compelling intro post. A couple of
         | things I wondered about and didn't see answers to:
         | 
         | 1. How ambitious is Bevy as an engine? Do you see it as aimed
         | squarely at the casual-game space like ggez, or do you think it
         | could eventually compete with Godot, growing more advanced
         | features like GI? (I appreciate that competing with Unreal is
         | probably, well, Unrealistic for the forseeable future.)
         | 
         | 2. You talk a lot about keeping the build light, which is great
         | to hear. Does this extend to deployment too? What kind of
         | binary filesizes are you looking at for a "hello, world" game?
        
           | Thaxll wrote:
           | Video games don't really care about binary size.
        
             | mrec wrote:
             | Some don't, some do. Users living out in the sticks with
             | poor satellite connectivity care about binary size. The
             | HTML5 platform, which I see becoming increasingly important
             | as things like wasm and webgpu mature, cares about binary
             | size because you're potentially downloading it every time
             | you play. It's slightly surreal poking about on itch.io
             | where practically every game is 50 MB, even when most of
             | them are simpler than a 4k demo.
        
           | _cart wrote:
           | 1. I want to be ambitious while also being realistic. AAA
           | studios won't even consider using Bevy until it has more
           | features and has stood the test of time. So in the short term
           | our market is essentially "indies and enthusiasts". I want
           | Bevy to cater to those people, but with an eye toward larger
           | projects. We don't want to design ourselves into a "locally
           | optimal" corner that prevents us from appealing to large
           | studio. That being said, even in the short term I am
           | extremely interested in advanced rendering techniques and
           | will be investing a good portion of my time on adding things
           | like GI and PBR.
           | 
           | 2. Small binaries is absolutely something I care about. Last
           | time I checked we could produce a "hello world" game with
           | windowing + rendering thats just a little bit over 1 MB. I
           | think we could probably make that smaller with some effort.
           | 
           | edit for some additional clarity: this involved running a
           | post-processing "strip" process on the binary.
        
             | guscost wrote:
             | As someone who may be tinkering with a game this decade,
             | one big factor which favors "use prebuilt engine" in my
             | thinking is that some of them abstract away the work
             | required to port between different systems. Is this really
             | a very big hurdle in your opinion? And do you see console
             | ports being part of this engine in the future?
             | 
             | The API looks great in any case, and I'll try it out, at
             | least as a starting point to get back into Rust and ECS.
             | Nice work!
        
               | meheleventyone wrote:
               | Console adoption and porting essentially require a game
               | or games that need to be ported. Typically this happens
               | through third party companies for games built on open
               | source projects.
        
         | giancarlostoro wrote:
         | Everything 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 wrote:
           | Hey! An editor is definitely on the roadmap. Bevy want's to
           | dogfood here and make the editor using bevy!
        
             | giancarlostoro wrote:
             | That'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/
        
               | Xevi wrote:
               | Bevy 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 wrote:
               | I 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
               | 
               | It looks like a lot of fun honestly!
        
         | andrewmcwatters wrote:
         | Hi _cart, creator of Planimeter's Grid Engine (a Lua game
         | engine) here. Congratulations on your phenomenal work! I'm very
         | familiar with the fact that posts like these on HN that help
         | drive adoption, so thanks to adamnemecek as well.
        
       | GabLotus wrote:
       | This is awesome! The focus on productivity really sets this
       | apart.
        
       | adamnemecek wrote:
       | Also, I setup a discord channel for Rust GPU programming.
       | https://discord.gg/YbawFYt
        
       | dgb23 wrote:
       | I 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 wrote:
         | That'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 wrote:
           | I 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?
        
       | rozgo wrote:
       | Got 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.
        
       | throw_m239339 wrote:
       | Purely a question. So why would I use rust instead of C++ or C#
       | to develop games? what are the potential advantages of that.
        
         | rainbow-road wrote:
         | Over 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.
        
         | implfuture wrote:
         | There 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.
        
       | kibwen wrote:
       | The 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/
       | 
       | Yesterday's thread on /r/rust:
       | https://www.reddit.com/r/rust/comments/i7bcwu/introducing_be...
        
         | dang wrote:
         | Ok, we'll change the URL to that from https://bevyengine.org/.
         | Thanks!
        
       | AbuAssar wrote:
       | Impressive!
       | 
       | this has the potential to be rust's flutter! (Bevy UI)
        
       | xfour wrote:
       | MIT 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 wrote:
         | Yep, it is so refreshing to have shareware and PD back.
        
       | adamnemecek wrote:
       | Github link https://github.com/bevyengine/bevy
       | 
       | dang, do you want to swap the link to github?
        
         | [deleted]
        
         | kibwen wrote:
         | Rather than the GitHub link, I would recommend this page:
         | https://bevyengine.org/news/introducing-bevy/
        
           | Keats wrote:
           | I've already posted it in
           | https://news.ycombinator.com/item?id=24121947 but it didn't
           | get traction :/ +1 on using that URL
        
       | donpdonp wrote:
       | I'd like to see how it compares to
       | https://github.com/amethyst/specs, a rust-based ECS engine, for
       | use in the multiplayer voxel world game Veloren
       | (https://veloren.net), or https://github.com/TomGillen/legion
        
         | meheleventyone wrote:
         | There's not a particularly thrilling benchmark here:
         | 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.
        
         | donpdonp wrote:
         | Here's a writeup comparing Specs (Amethyst sub-project) and
         | Legion ECS. https://csherratt.github.io/blog/posts/specs-and-
         | legion/
        
       | CraftThatBlock wrote:
       | What would be the difference between this (which looks really
       | cool!) and https://amethyst.rs ?
        
         | brundolf wrote:
         | From 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.
        
       ___________________________________________________________________
       (page generated 2020-08-11 23:00 UTC)