# Bevy Genre Fighting

Bevy genre router for fighting.

- 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-fighting -g -a claude-code -y`
Codex: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-fighting -g -a codex -y`
Cursor: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-fighting -g -a cursor -y`
Gemini CLI: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-fighting -g -a gemini-cli -y`

## Description

Bevy genre router for fighting. Keywords: Bevy, Fighting, genre, ECS, router.

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

# Bevy fighting

Genre router. Domain work lives in the Bevy skills below.

## When to use

Load this for local fighting: frame flags, hitboxes as your data, and a round state. Rollback netcode is out of scope.

## 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. Frame data below is components and one round resource.

## Examples

```toml
[dependencies]
bevy = "0.20"
```

Each fighter stores the frame index, advantage, and health. The round clock is a resource. Input, frame advance, and hit resolution share `Fighter`, so they chain on the fixed step.

```rust
#[derive(Component)]
struct Fighter {
    frame: u16,
    advantage: i16,
    health: i32,
}

#[derive(Component)]
struct Hitbox {
    active: bool,
    damage: i32,
    startup: u16,
    active_until: u16,
}

#[derive(Resource)]
struct RoundClock {
    frames_left: u32,
}

fn boot(mut commands: Commands) {
    commands.insert_resource(RoundClock { frames_left: 60 * 99 });
    commands.spawn((
        Fighter {
            frame: 0,
            advantage: 0,
            health: 10000,
        },
        Hitbox {
            active: false,
            damage: 400,
            startup: 4,
            active_until: 8,
        },
    ));
}

fn open_hitbox(mut fighters: Query<(&Fighter, &mut Hitbox)>) {
    for (fighter, mut hitbox) in &mut fighters {
        hitbox.active = fighter.frame >= hitbox.startup && fighter.frame < hitbox.active_until;
    }
}

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