npx skills add ...
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill bevy-ecs
Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems, and use the Time resource for frame-rate-independent motion. Use when building or debugging a Bevy game in Rust — when the user mentions Bevy, ECS, App::new, add_systems, Query, Commands, components/systems, or a Cargo.toml depending on bevy.
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill bevy-ecs
Structure a Bevy game in Rust around the Entity Component System: the App and
plugins, components and resources, systems with queries, scheduling, and
frame-rate-independent updates. New examples target Bevy 0.19. If the project
already pins another release, keep that release and use its matching migration guide.
App, defining Component/Resource types, writing
systems that query entities, ordering/filtering systems, or fixing
borrow-conflict panics and frame-dependent movement.Cargo.toml depends on bevy and code calls App::new(),
add_systems, Query, or Commands.When not to use: this is the ECS core. Deep rendering, custom shaders/
pipelines, UI layout, and audio are separate concerns. For engine-agnostic AI or
procedural algorithms, pair with game-ai / procedural-gen.
Cargo.toml and Cargo.lock first. For a
new project use bevy = "0.19"; never silently migrate an existing project
across a Bevy minor release. Treat the matching docs and migration guides as truth.App. App::new().add_plugins(DefaultPlugins) gives windowing,
input, rendering, time, etc. Register systems into schedules: Startup (once)
and Update (every frame).#[derive(Component)] for
per-entity data; #[derive(Resource)] for one-of-a-kind data (score, settings,
the Time clock). In 0.19 Resource extends Component, so do not derive both.Query<...>
for entities, Res<T>/ResMut<T> for resources, Commands for deferred
spawn/despawn. Systems run in parallel when their accesses don't conflict.time.delta_secs() so speed is frame-rate independent..chain() or explicit constraints;
gate systems with run_if. Group related setup into Plugins. Build with
cargo run and read the panics — Bevy reports conflicting queries at startup.delta_seconds() not found → it was renamed to time.delta_secs() (and
elapsed_secs()) in 0.16. Using the old name fails to compile.time.delta_secs(). Never assume a fixed frame time.Querys in one
system both write the same component, or one reads while another writes overlapping
entities. Make them disjoint with With/Without, or use ParamSet.Camera2dBundle/SpriteBundle not found → bundles were deprecated in 0.15 and
removed in 0.16.
Spawn the components directly (Camera2d, Sprite, Transform); required
components fill in the rest.Component is not implemented" → you forgot #[derive(Component)]
(or #[derive(Resource)] for a resource).Commands are
deferred and applied at the next sync point. Read the entity in a subsequent system,
not the one that spawned it.B must follow A, add (A, B).chain() or an explicit ordering constraint.Resource and Component in 0.19 → Resource now extends
Component; derive Resource alone to avoid conflicting implementations.SystemSet ordering, States/OnEnter/OnExit, change
detection, Commands lifecycle and sync points, ParamSet for conflicting
queries, and a version note on the events/observers API, read
references/queries-and-scheduling.md.game-ai — FSMs/behavior trees/steering as portable concepts to implement in ECS.procedural-gen — noise/RNG/generation algorithms to drive from systems.pygame-core / love2d-core — lighter-weight engines for smaller projects.