Skills

Bevy Genre Card Game

Bevy card-game router: zones, turn resource, deck order, catalog costs, EndTurn and...

Install

npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-card-game -g -a claude-code -y
Category
Engineering
Updated
19d ago
License
LGPL-3.0
Context cost
Mediumabout 2,395 tokens
Runs scripts
No, instructions only

What it does

Bevy card-game router: zones, turn resource, deck order, catalog costs, EndTurn and PlayCard messages. Use for a local hand, board, and seat order. Keywords: Bevy, card game, zone, turn, deck, energy, chain.

Bevy card game

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

When to use

Load this for a local card zone, hand, and turn order.

ECS shape

  • Components hold the genre's per-entity flags as plain data. This file does not name new engine types.
  • Resources hold the turn index, energy, and the card catalog 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. Do not invent a genre plugin.

Idioms

NeedBevy shape
Cards and zonesEntities with Card and InZone
Turn and catalogResources
End turn, draw, playMessages consumed on one .chain()

Routing

Scope

  • A card is an entity. Its zone is a component. Turn index and the definition table are resources.
  • Local play shuffles with rand. Online play stays on the networking skills.

Examples

[package]
name = "cards"
version = "0.1.0"
edition = "2021"

[dependencies]
bevy = "0.20"
rand = "0.9"

Zones and the active seat are plain data. Ending a turn advances the seat, then draws one card into that seat's hand.

#[derive(Clone, Copy, PartialEq, Eq)]
enum ZoneKind {
    Deck,
    Hand,
    Board,
}

#[derive(Component)]
struct Card {
    def: u32,
}
Read the whole SKILL.md on GitHub

More in Engineering