Skills

Bevy App Resources

Bevy ECS skill for app-wide resources and schedules.

Install

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

What it does

Bevy ECS skill for app-wide resources and schedules. Keywords: Bevy, Resource, App, Schedule, Plugin.

Bevy app resources

When to use

Load this when data or logic must exist for the whole app: one clock, one ruleset, startup spawn, or an ordered pair of systems. Pair with bevy-data-resources for the component-versus-resource split.

ECS shape

  • App. The Apps page: an App contains a World and the outer loop. It initializes resources (one copy), adds systems to a Schedule, and imports other App changes through plugins.
  • Resources. Resource, Res, ResMut, and insert_resource (Resources page). Time arrives from add_plugins(DefaultPlugins).
  • Plugins. The Resources page implements Plugin and inserts the resource inside build. DefaultPlugins is the plugin set that adds Time. Name only the plugins this page documents.
  • Schedules. add_systems(Startup, ...) runs once before other systems. add_systems(Update, ...) is the repeating schedule in the ECS page. .chain() orders systems that must see each other's writes. bevy::ecs::message names FixedUpdate only as the schedule after which signal_message_update_system runs. Fixed-timestep clock types stay in bevy-character-movement.
  • States. App-wide modes are bevy::state, not a global node. See bevy-state-machines.

App choices

NeedBevy idiom
One copy for the whole appA Resource inserted on the App
Logic that ticks every frameA system on Update (or a chained pair)
Boot setupA Startup system or insert_resource in a Plugin
One-shot noticeA message or event. See bevy-events-messaging.

Scope

  • Insert app-wide data with insert_resource inside Plugin::build, or from a Startup system.
  • Order two systems that both mutably use the same resource with .chain().
  • Save files are a Resource you serialize yourself. The running copy stays in the World.

Examples

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

[dependencies]
bevy = "0.20"
Read the whole SKILL.md on GitHub

More in Engineering