Bevy ECS skill for 2D sprite animation. Keywords: Bevy, sprite, animation, AnimationPlayer, AnimationClip, 2D.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Bevy ECS hub for Bevy 0.20+. Use when starting a Bevy game, choosing ECS boundaries, or picking a Bevy skill. Keywords: Bevy, ECS, bevy-master, schedules, plugins.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
ECS hub for Bevy 0.20+. Start here to set up a Bevy app, decide which components, resources, and systems own each piece of state, and load the right Bevy skill for the job.
Target: Bevy 0.20+ (tested against 0.20.0).
For every piece of state, name:
Schedules replace a scene tree. Do not add an autoload, a signal bus, or a Node layer cake.
The Quick Start ECS page defines entities, components (Component), systems as functions, Query, Commands, Startup, and Update, plus .chain() for order. Messages, observers, resources, and app states are covered in their own skills. See those files before calling a type.
| Scenario | Route |
|---|---|
| New Bevy app, ECS boundaries, which skill to load | This hub, then the module directory below |
| New crate, Cargo features, feature folders | bevy-project-foundations |
| Artifact ledger into a Bevy crate | gdas-reader then bevy-rea |
| Entity composition, components, systems | bevy-ecs-composition |
| Messages, events, observers | bevy-events-messaging |
| Components and resources as data | bevy-data-resources |
| App states or a per-entity mode flag | bevy-state-machines |
| App-wide resources and schedules | bevy-app-resources |
| Character movement | bevy-character-movement |
| 3D physics | bevy-physics-3d |
| 2D physics | bevy-physics-2d |
| Ray, overlap, or physics pick | bevy-spatial-queries |
| Navigation mesh or path data | bevy-navigation |
| Chase, patrol, retarget | bevy-ai-navigation |
| Seeded level or loot layout | bevy-procedural-generation |
| Keyboard, mouse, gamepad | bevy-input-handling |
| 2D or 3D camera entity | bevy-camera-systems |
| Play or control a clip | bevy-audio-systems |
| Load assets or spawn a scene | bevy-asset-scenes |
| Player save slot | bevy-save-load |
| Logs and frame diagnostics | bevy-debugging-profiling |
| Parallelism, fixed step, handle lifetime | bevy-performance |
cargo test | bevy-testing-patterns |
| Clips, blend graphs, sprites, lights, materials, UI, or a genre loop | Module directory below |
Data that is not simulated can be a plain Rust struct or a resource. The Quick Start treats resources as app-wide data. A score or a seed is one Resource inserted at startup. Do not copy a Godot Object / RefCounted / Resource / Node table into Bevy.
(a) App scaffold. App::new(), plugins, schedules, and states. The plugins page documents Plugin, DefaultPlugins, MinimalPlugins, and add_plugins. The bevy 0.20.0 crate docs list a bevy_state feature ("built in global state machines"). States, init_state, and OnEnter are the state API. Do not invent a plugin list beyond DefaultPlugins / MinimalPlugins.
(b) Entity. Components plus systems. Movement belongs on a fixed timestep. bevy::time 0.20.0 documents Fixed ("fixed timestep game clock") and run_fixed_main_schedule (FixedMain). Do not invent a schedule label beyond those names.
(c) Data. Components and resources. Not .tres files.
(d) Performance. The ECS page states systems run in parallel by default when they can, and .chain() forces order. Frame-time diagnostics and handle lifetimes are on bevy-performance. No numeric budget is stated on those pages.
[package]
name = "bevy-app"
version = "0.1.0"
edition = "2021"
[dependencies]
bevy = "0.20"
A new app adds DefaultPlugins, inserts one resource, and spawns the player on startup.
#[derive(Resource)]
struct Score(u32);
#[derive(Component)]
struct Player;
fn spawn_player(mut commands: Commands) {
commands.insert_resource(Score(0));
commands.spawn((Player, Transform::from_xyz(0.0, 0.0, 0.0)));
}
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, spawn_player)
.run();
}
Input writes velocity. Movement writes Transform. They share Player data, so they are chained on FixedUpdate.
#[derive(Component)]
struct Velocity(Vec2);
fn read_input(
keys: Res<ButtonInput<KeyCode>>,
mut players: Query<&mut Velocity>,
) {
for mut velocity in &mut players {
let mut dir = Vec2::ZERO;
if keys.pressed(KeyCode::KeyA) {
dir.x -= 1.0;
}
if keys.pressed(KeyCode::KeyD) {
dir.x += 1.0;
}
if keys.pressed(KeyCode::KeyW) {
dir.y += 1.0;
}
if keys.pressed(KeyCode::KeyS) {
dir.y -= 1.0;
}
velocity.0 = dir.normalize_or_zero() * 4.0;
}
}
fn apply_velocity(
time: Res<Time<Fixed>>,
mut players: Query<(&Velocity, &mut Transform)>,
) {
let dt = time.delta_secs();
for (velocity, mut transform) in &mut players {
transform.translation.x += velocity.0.x * dt;
transform.translation.y += velocity.0.y * dt;
}
}
pub struct MovementPlugin;
impl Plugin for MovementPlugin {
fn build(&self, app: &mut App) {
app.add_systems(FixedUpdate, (read_input, apply_velocity).chain());
}
}
AppState is a global state. Entering Playing runs the spawn system once.
#[derive(States, Debug, Clone, PartialEq, Eq, Hash, Default)]
enum AppState {
#[default]
Loading,
Playing,
}
#[derive(Component)]
struct Player;
fn enter_playing(mut commands: Commands) {
commands.spawn((Player, Transform::from_xyz(0.0, 0.0, 0.0)));
}
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.init_state::<AppState>()
.add_systems(OnEnter(AppState::Playing), enter_playing)
.run();
}
Target: Bevy 0.20+.
Core ECS types: Component, Resource, Query, Commands, Startup, Update, Fixed / FixedMain (bevy::time), .chain(), Plugin, DefaultPlugins, MinimalPlugins. Messages and observers are an ownership slot. See bevy-events-messaging for their APIs. Systems run in parallel unless .chain() orders the ones that conflict.
| Piece | Owner | Who may mutate | Schedule |
|---|---|---|---|
| Data on one entity | Component | One system via Query | Update or FixedMain |
| One value for the whole app | Resource | One system | Startup to insert, then the schedule that reads it |
| Spawn | Commands | The spawning system | Startup for the initial world; later schedules for runtime spawn |
| Order that must not race | .chain() | The chained systems only | Same schedule |
| Plugin boundary | Plugin | build registers systems and resources | Before the app runs |
Borrow rule: two systems that both mutably query the same component must be ordered (.chain()) or split so only one writes. Unrelated systems stay parallel. That is the ECS page rule, not a guess at a system-set API.
| If you need | Do this | Do not |
|---|---|---|
| Per-entity data | Component + Query | A Godot node script |
| App-wide config or clock | Resource | Copy the value onto every entity |
| Stable simulation step | FixedMain and the Fixed clock | Tie simulation to raw frame Update |
| Startup spawn | Commands in Startup | Spawn from a render system |
| Cross-system notice that is not shared state | Message or observer slot in bevy-events-messaging | A new event type invented in this file |
| An API outside the documented set | Check the official docs first | A made-up crate or API |
Load references/ecs-ownership.md for the ownership table.
Do not pin /0.20.0/ in docs URLs. WHY: links stay on latest; the 0.20 target is stated once in prose.
Do not mutably query the same component from two unordered systems. WHY: the schedule runs systems in parallel unless .chain() orders them.
Do not invent a physics, navigation, networking, or XR crate here. WHY: this skill only names documented Bevy crates and modules.
No Godot or gdext type imports in Bevy code. WHY: Bevy code stays idiomatic ECS and uses only documented Bevy APIs.
No GDScript line-translate. WHY: Bevy code stays idiomatic ECS and uses only documented Bevy APIs.
No APIs that this file did not open. WHY: Bevy code stays idiomatic ECS and uses only documented Bevy APIs.
No Coil or Ouroboros UI. WHY: Bevy code stays idiomatic ECS and uses only documented Bevy APIs.
Domain skills:
Rendering and animation:
Gameplay:
UI, platforms, adapts, templates:
Genre routers:
bevy crate - Unversioned API index. Feature samples on the pinned page may still show older version strings.latest branch, not a release tag./learn/book/ path returned 404 on 2026-10-11.Query, Commands, Startup, Update, and .chain().Plugin, DefaultPlugins, MinimalPlugins, and add_plugins.bevy::time - Fixed and run_fixed_main_schedule (FixedMain)..chain().Message readers and Event observers.Component versus Resource.bevy::state and per-entity mode flags.Startup / Update.ButtonInput, mouse, and gamepad.Camera2d and Camera3d.AudioPlayer and AudioSink.AssetServer and spawn_scene.LogPlugin and diagnostics plugins.cargo test. Not GdUnit.Cipher rule titles only: runtime gameplay is Rust; do not pull Godot types into Bevy crates.
App docs for state-installation method names before writing them.bevy = "0.19" while crates.io latest is 0.20.0. Pin 0.20.0 from crates.io and the Bevy API reference, not from that stale snippet.version = "0.18" in one sample. That sample is not the pin.아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Bevy ECS skill for 2D sprite animation. Keywords: Bevy, sprite, animation, AnimationPlayer, AnimationClip, 2D.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Spawn and tune Bevy 0.20 directional, point, and spot lights, cascade shadows, distance fog, and a nearest-light shadow budget. Use when a 3D scene needs a sun, local lights, or fog on the camera. Keywords: DirectionalLight, PointLight, SpotLight, CascadeShadowConfig, DistanceFog, bevy_light.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Bevy ECS skill for PBR materials. Keywords: Bevy, StandardMaterial, PBR, material, ExtendedMaterial.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Bevy ECS skill for 3D level assembly. Keywords: Bevy, level, scene, mesh, world, ECS.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Bevy ECS skill for abilities. Keywords: Bevy, ability, cooldown, ECS, gameplay.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Rewrite Bevy 2D actors and cameras into 3D meshes and Camera3d while keeping gameplay components. Use when a Bevy 2D game should gain a perspective camera, mesh draw, and a planar velocity lifted onto XZ. Keywords: Camera2d, Camera3d, Sprite, Mesh3d, StandardMaterial, WishVelocity.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.