# Bevy Genre Metroidvania

Bevy genre router for Metroidvania.

- Repository: https://github.com/thedivergentai/Game-Dev-Agentic-Skills (917 stars)
- Category: Engineering
- License: LGPL-3.0
- Last updated: 2026-10-16
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-metroidvania -g -a claude-code -y`
Codex: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-metroidvania -g -a codex -y`
Cursor: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-metroidvania -g -a cursor -y`
Gemini CLI: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-metroidvania -g -a gemini-cli -y`

## Description

Bevy genre router for Metroidvania. Keywords: Bevy, Metroidvania, genre, ECS, router.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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 `Update` or 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

```toml
[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.

```rust
#[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,
    });
}

The rest: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/HEAD/skills/bevy-genre-metroidvania/SKILL.md
