Skills

Bevy Genre Idle Clicker

Route a Bevy 0.20 idle clicker: one Wallet resource, generator entities, click on...

Install

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

What it does

Route a Bevy 0.20 idle clicker: one Wallet resource, generator entities, click on Update, offline bank capped in hours. Keywords: Bevy, idle, clicker, Wallet, Generator, offline, chain, ECS.

Bevy Idle clicker (thin router)

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

When to use

Load this for currencies that tick while the app runs.

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. Do not invent a genre plugin.

Routing

Examples

[dependencies]
bevy = "0.20"
serde = { version = "1", features = ["derive"] }

The wallet is one resource. Generators add coins on Update from Time::delta_secs.

#[derive(Resource)]
struct Wallet {
    coins: f64,
    per_second: f64,
}

fn tick_income(time: Res<Time>, mut wallet: ResMut<Wallet>) {
    wallet.coins += wallet.per_second * f64::from(time.delta_secs());
}

fn click(
    mouse: Res<ButtonInput<MouseButton>>,
    mut wallet: ResMut<Wallet>,
) {
    if mouse.just_pressed(MouseButton::Left) {
        wallet.coins += 1.0;
    }
}

fn install_income(app: &mut App) {
    app.insert_resource(Wallet {
        coins: 0.0,
        per_second: 2.5,
    })
    .add_systems(Update, (tick_income, click).chain());
}
Read the whole SKILL.md on GitHub

More in Engineering