Bevy is a game engine built in rust.
Bevy included an example project for the classic game of breakout here.
Bevy Breakout Refactored is an attempt to refactor the aforementioned implementation of breakout so that it is more readable/maintainable. It is also practice for me as I am comletely new to rust. This "refactor" should be taken with a grain (or two) of salt.
- Install rust.
- Clone this repo.
- Run the following
cd bevy-breakout-refactored
cargo build
cargo run
- automod is used in
mod.rs
module directories to generatemod <module_name>
for all files contained within those directories.- Typically, these
mod
are private. There is an implementation of a macro in this project calledautouse
which is used to createpub use self::<module_name>::*;
in themod.rs
files as well. This makes importing these modules much cleaner (in my opinion).
- Typically, these
- I wasn't able to build bevy on rust nightly. I used the stable release. I'm on Apple Silicon so my build target is
aarch64-apple-darwin
.- If you get this to build on nightly be sure to enable the rust flag
-Zshare-generics=y
in.cargo/config.toml
.
- If you get this to build on nightly be sure to enable the rust flag