bevy-ecs-expert
FeaturedMaster Bevy's Entity Component System (ECS) in Rust, covering Systems, Queries, Resources, and parallel scheduling.
AI & Automation 49,938 stars
7238 forks Updated today MIT
Install
Quality Score: 99/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Bevy ECS Expert
## Overview
A guide to building high-performance game logic using Bevy's data-oriented ECS architecture. Learn how to structure systems, optimize queries, manage resources, and leverage parallel execution.
## When to Use This Skill
- Use when developing games with the Bevy engine in Rust.
- Use when designing game systems that need to run in parallel.
- Use when optimizing game performance by minimizing cache misses.
- Use when refactoring object-oriented logic into data-oriented ECS patterns.
## Step-by-Step Guide
### 1. Defining Components
Use simple structs for data. Derive `Component` and `Reflect`.
```rust
#[derive(Component, Reflect, Default)]
#[reflect(Component)]
struct Velocity {
x: f32,
y: f32,
}
#[derive(Component)]
struct Player;
```
### 2. Writing Systems
Systems are regular Rust functions that query components.
```rust
fn movement_system(
time: Res<Time>,
mut query: Query<(&mut Transform, &Velocity), With<Player>>,
) {
for (mut transform, velocity) in &mut query {
transform.translation.x += velocity.x * time.delta_seconds();
transform.translation.y += velocity.y * time.delta_seconds();
}
}
```
### 3. Managing Resources
Use `Resource` for global data (score, game state).
```rust
#[derive(Resource)]
struct GameState {
score: u32,
}
fn score_system(mut game_state: ResMut<GameState>) {
game_state.score += 10;
}
```
### 4. Scheduling Systems
Add systems to the `App` builder, defining ...
Details
- Author
- sickn33
- Repository
- sickn33/antigravity-awesome-skills
- Created
- 10 months ago
- Last Updated
- today
- Language
- Python
- License
- MIT
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
bevy-ecs-expert
Master Bevy's Entity Component System (ECS) in Rust, covering Systems, Queries, Resources, and parallel scheduling.
487 Updated today
aiskillstore Web & Frontend Listed
bevy-game-engine
Bevy game engine: ECS, rendering, input, and asset management. Use when building Bevy games, working with entities/components/systems, or mentioning Rust gamedev or 2D/3D games.
60 Updated today
laurigates Data & Documents Listed
bevy-ecs-patterns
Advanced Bevy ECS: complex queries, system scheduling, change detection, and performance tuning. Use when optimizing Bevy architecture or implementing complex game systems.
60 Updated today
laurigates