
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- Repository
- thedivergentai/Game-Dev-Agentic-Skills917
- 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
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. Do not invent a genre plugin.
Idioms
| Need | Bevy shape |
|---|---|
| Cards and zones | Entities with Card and InZone |
| Turn and catalog | Resources |
| End turn, draw, play | Messages consumed on one .chain() |
Routing
- bevy-turn-system - Turns.
- bevy-inventory-system - Zones as containers of card ids.
- bevy-ui-layout - Hand layout.
- bevy-data-resources - Card definitions.
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,
}
