Command Palette

Search for a command to run...

Back to skills
skill № 70934

bevy-genre-party

Bevy 0.20 party router: local seats, shared scores, and minigame swaps as ECS data. Use when routing a local party game. Keywords: Bevy, Party, minigame…

FreeNo executable scripts
thedivergentaiby thedivergentai★ 1,019 GitHub stars

Install bevy-genre-party in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

Bevy Party (thin router)

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

When to use

Load this for local minigame swaps and shared scores.

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. This file registers only seat scores and the minigame swap.

Routing

Scope

Local seats, the shared board, and the current minigame are plain data. Mode machines, devices, and timed rounds stay in the skills linked above.

Call Owner here Leave to the linked skill
One seat earns the round PartyBoard.award_pending, then clear it Input devices in bevy-input-handling
Hub opens a race CurrentMinigame on a just-pressed key The state machine in bevy-state-machines
Score mode ends bump round and the active seat, then return to hub The timer in bevy-game-loop-time-trial
[dependencies]
bevy = "0.20"
#[derive(Component)]
struct LocalSeat {
    index: u8,
    score: i32,
}

#[derive(Resource)]
struct PartyBoard {
    active: u8,
    round: u32,
    award_pending: bool,
}

fn award(mut board: ResMut<PartyBoard>, mut seats: Query<&mut LocalSeat>) {
    if !board.award_pending {
        return;
    }
    board.award_pending = false;
    for mut seat in &mut seats {
        if seat.index == board.active {
            seat.score += 1;
        }
    }
}

pub struct ScorePlugin;

impl Plugin for ScorePlugin {
    fn build(&self, app: &mut App) {
        app.insert_resource(PartyBoard {
            active: 0,
            round: 1,
            award_pending: true,
        })
        .add_systems(Update, award);
    }
}
#[derive(Resource)]
struct PartyBoard {
    active: u8,
    round: u32,
    award_pending: bool,
}

#[derive(Clone, Copy, PartialEq, Eq)]
enum Minigame {
    Hub,
    Race,
    Score,
}

#[derive(Resource)]
struct CurrentMinigame(Minigame);

fn open_race(keys: Res<ButtonInput<KeyCode>>, mut current: ResMut<CurrentMinigame>) {
    if keys.just_pressed(KeyCode::Digit1) && current.0 == Minigame::Hub {
        current.0 = Minigame::Race;
    }
}

fn advance_round(
    keys: Res<ButtonInput<KeyCode>>,
    mut current: ResMut<CurrentMinigame>,
    mut board: ResMut<PartyBoard>,
) {
    if keys.just_pressed(KeyCode::Digit2) && current.0 == Minigame::Score {
        board.round += 1;
        board.active = board.active.wrapping_add(1) % 4;
        board.award_pending = true;
        current.0 = Minigame::Hub;
    }
}

pub struct MinigamePlugin;

impl Plugin for MinigamePlugin {
    fn build(&self, app: &mut App) {
        app.insert_resource(CurrentMinigame(Minigame::Hub))
            .add_systems(Update, (open_race, advance_round).chain());
    }
}
#[derive(Component)]
struct LocalSeat {
    index: u8,
    score: i32,
}

fn join_seat(keys: Res<ButtonInput<KeyCode>>, mut commands: Commands, seats: Query<&LocalSeat>) {
    if keys.just_pressed(KeyCode::KeyJ) {
        let index = seats.iter().count() as u8;
        if index < 4 {
            commands.spawn(LocalSeat { index, score: 0 });
        }
    }
}

pub struct JoinPlugin;

impl Plugin for JoinPlugin {
    fn build(&self, app: &mut App) {
        app.add_systems(Update, join_seat);
    }
}

fn main() {
    App::new()
        .add_plugins(MinimalPlugins)
        .add_plugins(JoinPlugin)
        .run();
}

Expert Knowledge Delta

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.

Who owns state

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
Orde
Full SKILL.md on GitHub

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

  • references/ecs-ownership.md

FAQ

What does the bevy-genre-party skill do?

Bevy 0.20 party router: local seats, shared scores, and minigame swaps as ECS data. Use when routing a local party game. Keywords: Bevy, Party, minigame, score, ECS, router.

How do I install the bevy-genre-party skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the bevy-genre-party skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare bevy-genre-party with