Skip to content

Instantly share code, notes, and snippets.

@Cantido
Last active September 24, 2021 17:31
Show Gist options
  • Save Cantido/81598231b87c687e5759d0eb63e4d7a1 to your computer and use it in GitHub Desktop.
Save Cantido/81598231b87c687e5759d0eb63e4d7a1 to your computer and use it in GitHub Desktop.
Bevy Notes

Bevy Glossary

Entity

A lightweight object that has Components attached to it to describe it. Using a Commands object received by a System, you can spawn a new entity by calling .spawn_bundle on it, which will return an EntityBuilder to allow you to attach components to it.

Component

Like a tag that goes on entities. They often do not need state of their own. It is common for a component to just be an empty struct. A System will usually operate on an entity that has a certain component attached to it.

System

Performs actions on Entities and Components. Systems are defined as functions, with the function arguments acting as a query. Bevy will call the system with any arguments that match the signature.

Resource

Data that is globally-set and unique to a certain Rust type. For example, you could initialize a Materials struct that contains colors for rendering different things in the world. A System then just needs to query for Res<Materials> in order to fetch that data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment