Bevy: A Game Engine in Rust
bevyengine.org
bevyengine.org
I like the Rust book a lot but it's a bit too slow moving. It explains concepts I already know so I have to skim, but then I miss something.
Perhaps the best thing doesn't exist yet! Maybe I'll write it someday. But I thought I'd ask ;-)
There is also "Programming Rust", which you might like better.
After that I really like this resource, which gets much more practical about problem-solving borrowing issues and introduces some really important tools from the standard library: https://rust-unofficial.github.io/too-many-lists/
If the Book teaches you what features Rust has, this teaches you how to use Rust in practice. It also taught me that it was a fool's errand to go and try to implement all the core data structures as a part of my learning process, because that kind of pointer-twiddling is one of the hardest possible things to do in safe Rust :)
I still use the tool today (although I'm still not sure it's the most elegant solution :P), and I've taken that knowledge I picked up in the process for other projects I've since done in Rust.
If I were where you are, I'd do something similar: carve out a simple project that you could complete in a day (or two) in a language you're more familiar with, and try to do it in Rust.
I'd also recommend joining the Rust Discord channel to field any immediate questions you might have (and going to the Forums if there's something more involved you'd like opinions on).
Good luck :)
Even though the two concepts are intertwined, you'll master borrowing well before you master lifetimes. And that's okay.
Early on you'll probably not need to author many structs that require lifetime annotations. If you think you need to, you're either purposefully building something complicated and/or memory-limited, OR you're using the concept without understanding and not needing to do so.
If you can stay away from writing your own explicit lifetimes on structs and interfaces while you're learning, it becomes a much easier process.
Once you've mastered this stuff, Rust is seldom more difficult than any other language.
It's like that quote from the Matrix. You get used to it. Pretty soon you won't even see the borrow checker.
Is Bevy flexible enough to let you drop down into raw OpenGL?
I'm writing code that does a mix of point cloud rendering and traditional asset rendering (I'm new to all of this), and I'm wondering if I should adopt an engine instead of rolling everything myself with a mix of OpenGL, matrix math, and Imgui.
I'm trying to do due diligence, but I'm too new to games and 3D to know what to look for.
[1] https://github.com/amethyst/amethyst
While I haven't tried either of these engines seriously yet, I really enjoyed reading that thread.
At the very least, you should move to a more modern rendering api like vulkan, wgpu (though I'm biased), metal, or dx12.
On the page https://bevyengine.org/learn/book/getting-started/resources/ however I am not able to navigate to the next page after it on mobile, because the arrow linking to the next page is almost entirely off-screen and can not be touched. This is in Safari on iOS 13.6.1
“Bevy aims to be a general purpose game engine capable of handling any 2D or 3D workload. However Bevy is still in its infancy. We are currently in the prototyping phase: important features are missing and APIs will change constantly. If you are currently trying to pick an engine for your Next Big Project™, we recommend that you check out Godot Engine. It is currently much more feature-complete and stable. And it is also free, open-source, and scriptable with Rust!”
For example Unreal engine is a game engine. Not "a game engine written in C++".
I mean sure sometimes it is but show me a Rust software that didn't advertise itself being written in Rust.
I also dislike the emphasise on the programming language, but many people seem to find it important.
Presumably because I'm going to be writing the same language when I interface with it. Rust can export to a C API but if I'm using Rust myself the API is going to be better.
There are enough existing and new game engines and frameworks that if the title was simply “Bevy: A Game Engine”, then I might not have bothered to clicked on it only to find that it was written in C++ or Lua or Python or what have you. I use other languages too, mind you, it’s not that – it’s just that aside from Unreal, Unity and Godot, the only other game engine or framework that I am interested in knowing about at the moment is one that is written either in Swift or in Rust.
Conversely, stating it upfront also allows anyone that does not want to write in Rust to avoid this particular game engine at the moment.
I see only benefits of stating it.
It seems like you stop saying "made by Cows" when it's not surprising that the Milk you'd be buying is from cows.
A few years ago I saw a bunch about Go, too. That seems to have died down.
But I think the real reason is that people are excited to use Rust for "real stuff". And a lot of Rust fans don't get to use Rust at $dayJob or whatever. There's also a bit of naysayer criticism that it isn't a practical language, etc.
So, no, it doesn't really matter that something is written in Rust. It's just Rust fans being hyped up about it. It might be a little annoying, but replies like yours aren't really any better, honestly.
Unity and Unreal, for example, are not scriptable in Rust. Anyone interested in writing games in Rust would surely be more interested in an engine that supports it.
It might be possible to create language bindings for C or C++ (or whatever language you want to use), but the docs on the website seem specifically targeted to Rust users. So for now, the only people likely to be interested in using this are Rust developers (though people coming from other languages might find the general design interesting).