
Bevy Genre Metroidvania
Bevy genre router for Metroidvania.
Install
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-metroidvania -g -a claude-code -y- Repository
- thedivergentai/Game-Dev-Agentic-Skills917
- Category
- Engineering
- Updated
- 19d ago
- License
- LGPL-3.0
- Context cost
- Mediumabout 2,216 tokens
- Runs scripts
- No, instructions only
What it does
Bevy genre router for Metroidvania. Keywords: Bevy, Metroidvania, genre, ECS, router.
Bevy Metroidvania
Genre router. Domain work lives in the Bevy skills below.
When to use
Load this for ability-gated exploration and a map of rooms.
ECS shape
- Components hold the genre's per-entity flags as plain data. This file does not name new engine types.
- Resources hold run-wide counters (score, wave index, seed) via bevy-data-resources.
- Systems read those components on
Updateor the fixed timestep from bevy-master. Order them with.chain()when a later system must see the result. - Schedule: gameplay mode changes go through bevy-state-machines. Ability flags, visited cells, and the map fog below are components plus one resource.
Examples
[dependencies]
bevy = "0.20"
Traversal is a set of flags on the player. A gate stores the flag it needs. The map stores which cells are revealed. Input, gate checks, and fog share AbilitySet and MapFog, so those systems chain.
#[derive(Clone, Copy, PartialEq, Eq)]
enum Ability {
Dash,
WallClimb,
DoubleJump,
}
#[derive(Component)]
struct AbilitySet {
owned: [bool; 3],
}
impl AbilitySet {
fn has(&self, ability: Ability) -> bool {
self.owned[ability as usize]
}
fn grant(&mut self, ability: Ability) {
self.owned[ability as usize] = true;
}
}
#[derive(Component)]
struct Gate {
requires: Ability,
open: bool,
}
#[derive(Component)]
struct MapCell {
x: i32,
y: i32,
visited: bool,
}
#[derive(Resource, Default)]
struct MapFog {
revealed: u32,
}
fn boot(mut commands: Commands) {
commands.insert_resource(MapFog { revealed: 0 });
commands.spawn(AbilitySet {
owned: [false, false, false],
});
commands.spawn(Gate {
requires: Ability::Dash,
open: false,
});
commands.spawn(MapCell {
x: 0,
y: 0,
visited: false,
});
}
