bevy-cheatbook
bevy
Our great sponsors
- SonarLint - Clean code begins in your IDE with SonarLint
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- Onboard AI - Learn any GitHub repo in 59 seconds
- Revelo Payroll - Free Global Payroll designed for tech teams
bevy-cheatbook | bevy | |
---|---|---|
4 | 557 | |
1,325 | 26,795 | |
4.1% | 4.7% | |
0.0 | 9.8 | |
2 days ago | 3 days ago | |
Rust | Rust | |
- | MIT OR Apache-2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bevy-cheatbook
-
New to Bevy, Migrating from Unity3D: Need Advice on 2D Game Dev Tools
You can see working examples of nearly everything you asked about in the Bevy Cheatbook
-
Survey: How have shader compilation messages been for you?
The biggest source of wasted time for me was finding out that my shaders which were working on native didn’t work on webgl. For one of the more perplexing error messages, I opened this issue in the cheatbook a while ago.
-
Bevy 0.5
wasm mostly works :) There's a nice PR open on the cheatbook that documents the process quite well that you can work off of.
-
Orthographic projection with top left origin
Great! Are you okay if I submit this to the Unofficial Bevy Cheatbook? This question comes up pretty frequently and this is a great little snippet.
bevy
- List of Unity alternatives
-
Can Godot screw us like Unity did?
This is something that can certainly happen. In fact, this is exactly what happened with the Bevy engine, in which a total of 246 contributors agreed to relicense the engine, as explained in this blog post. However, in this case it was done for the good of the engine and its users.
-
Godot is not the new Unity – The anatomy of a Godot API call
If you are using Rust, you should check out https://bevyengine.org which is a rust based game engine with a focus on ECS
-
Unity’s New Pricing: A Wake-Up Call on the Importance of Open Source in Gaming
I was crowing to my game dev buddy about how he (a Unity C-sharp developer) ought to check out Bevy and Rust because the Rust type system is friggin’ awesome!
Code examples: https://bevyengine.org/learn/book/getting-started/ecs/
License is Apache 2.0 OR MIT:
-
Unity plan pricing and packaging updates
For those who are more code centric and like rust, https://bevyengine.org/ is a good alternative to godot as far as open source goes.
-
Rust Cryptography Should Be Written in Rust
It's become rather popular in the graphics (e.g. https://wgpu.rs/) and game dev (e.g. https://bevyengine.org/ ) spaces.
It's pretty popular for AWS Lambda functions.
Pretty popular for terminal / shell applications.
Definitely a great way to write wasm for compute or graphics intensive browser/web apps.
-
How to implement multiple levels on WASM
It seems like the best way to approach levels for a desktop build is to save and load scenes as shown in this example (which seems pretty straightforward), but as noted in that file, this doesn't work on WASM since there isn't a file system.
-
Unix-like OS in Rust inspired by xv6-riscv
If you like you can copy what I did: https://github.com/tbillington/bevy_toon_shader, which I copied from https://github.com/bevyengine/bevy/ (just that my repo has was less stuff, so might be easier to copy from).
-
Egregoria is a city simulation with high granularity
I think Rust for games has come really far. I will cite https://arewegameyet.rs/ "Almost. We have the blocks, bring your own glue.".
All the blocks are there and the language is really well suited to games.
On top of my head:
The pros:
- The crate ecosystem and the package manager makes it really easy to integrate any useful component such as pathfinding, spatial partitioning, graphics backend, audio system.. Most crates take a lot of effort to be cross-platform so I can develop on linux and not spend too much time debugging windows releases.
- The strong typing and algebraic data types makes expressing the game state very pleasant. I also found I was able to develop a very big game without too many bugs even though I don't write many tests.
- Ahead of time compilation + LLVM guarantees you won't have to optimise for weird things around a virtual machine. Rust gives you more control to optimise hot loops as you can go low-level.
- I find wgpu to be the perfect balance between ergonomics and power compared to Vulkan. OpenGL support through wgpu is also a nice addition for lower end devices.
- The Rust community is very helpful, you can often talk directly to crate maintainers
The cons:
- Compilation times, when compared to JITed languages such as C# can be very painful. It can be alleviated by buying a 3950X but I still often get 10-30s iteration times.
- The static nature of Rust means you often need a dynamism layer above to tweak stuff that can be awkward to manage. I made inline_tweak for this purpose but it's really far from how easy Unity makes it. https://github.com/Uriopass/inline_tweak
- Since Rust feels very ergonomic, you are tempted to write almost all game logic within it, so mod support feels very backwards to implement as you cannot really tweak "everything" like in Unity games. Thankfully "Systems" game like Factorio or Egregoria can be theoretically split into the "simulation" and the "entities" so mod can still have a great impact. Factorio is built in C++ so has the same problematic. Their Lua API surface is quite insane to be able to hook into everything. https://lua-api.factorio.com/latest/
Now, I have to talk about Bevy: https://bevyengine.org/. It did not exist when I started but it is a revolution in the Rust gamedev space. It is a very powerful 100% Rust game engine that makes you write game code in Rust too. It has incredible energy behind it and I feel like if I'd used Bevy from the start I wouldn't have had to develop many core engine systems. Its modular design is also incredibly pleasant as you can just replace any part you don't like with your own.
-
Bevy 0.11
Learn how to draw sprites to the screen: https://github.com/bevyengine/bevy/blob/main/examples/2d/sprite.rs
What are some alternatives?
Amethyst - Data-oriented and data-driven game engine written in Rust
Godot - Godot Engine – Multi-platform 2D and 3D game engine
Fyrox - 3D and 2D game engine written in Rust
RG3D - 3D and 2D game engine written in Rust [Moved to: https://github.com/FyroxEngine/Fyrox]
piston - A modular game engine written in Rust
specs - Specs - Parallel ECS
ggez - Rust library to create a Good Game Easily
gdnative - Rust bindings for Godot 3
raylib - A simple and easy-to-use library to enjoy videogames programming
macroquad - Cross-platform game engine in Rust.
wgpu - Cross-platform, safe, pure-rust graphics api.
rust-sdl2 - SDL2 bindings for Rust