Agent skill

Godot Game Loop Waves

by thedivergentai in thedivergentai/GD-Agentic-Skills

Expert patterns for managing combat waves, difficulty scaling, and automated enemy spawning in Godot 4.

LGPL-3.0Auto-check passedGame Development

Install Godot Game Loop Waves

skills CLI
$ npx skills add thedivergentai/GD-Agentic-Skills --skill godot-game-loop-waves -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install thedivergentai/GD-Agentic-Skills godot-game-loop-waves --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/godot-game-loop-waves .claude/skills/godot-game-loop-waves && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
godot-game-loop-waves
GitHub stars
821
Token cost
~3.3k tokens
SKILL.md length
1,212 words
Files
8 (incl. scripts, references)
Skills in repo
98
Repo updated
First seen
Licence
LGPL-3.0

At a glance

Expert patterns for managing combat waves, difficulty scaling, and automated enemy spawning in Godot 4.

  • Works in 4 steps: The Async Wave Trigger → Composition-Based Spawning → Occlusion Culling for Swarms → …
  • Building wave-based shooters
  • SKILL.md covers Architectural Thinking: The…, Density Decision Tree (pick…, Composition Golden Path and Expert Code Patterns, plus 6 more sections
  • Tasks that involve Game development

What it does

Godot Game Loop Waves is an agent skill from thedivergentai/GD-Agentic-Skills. Expert patterns for managing combat waves, difficulty scaling, and automated enemy spawning in Godot 4. Use when building wave-based shooters, tower defense, or arena games.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and reference files (for example `references/migration-notes.md` and `references/wave-expert-patterns.md`).

It sits in Game Development, covering Game development and Game design. It works with Godot. The repository describes itself as: The official "Long-Term Memory" for Godot 4.7+ AI Agents. A high-density library of 99 expert skills and 27 genre blueprints, providing audited, strictly typed GDScript patterns… The licence is LGPL-3.0.

When your agent uses it

  • Building wave-based shooters
  • Tasks that involve Game development
  • Tasks that involve Game design

Example prompts

  • “/godot-game-loop-waves”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. The Async Wave Trigger
  2. Composition-Based Spawning
  3. Occlusion Culling for Swarms
  4. Wave UI Architecture

What it can do on your machine

Read from SKILL.md and the folder at commit 4c4d0ff. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/, which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.godotengine.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Godot Game Loop Waves loads about 3.3k tokens when it runs, and up to ~4.5k if it reads all its reference files. Until then it costs about 49 tokens; SKILL.md has 1,212 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from thedivergentai/GD-Agentic-Skills at commit 4c4d0ff, republished under its LGPL-3.0 licence (© thedivergentai). 1,212 words, ~3,343 tokens.

Download SKILL.mdSave it as .claude/skills/godot-game-loop-waves/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
godot-game-loop-waves
description
Expert patterns for managing combat waves, difficulty scaling, and automated enemy spawning in Godot 4. Use when building wave-based shooters, tower defense, or arena games.

Architectural Thinking: The "Wave-State" Pattern

A Master implementation treats waves as Data-Driven Transitions. Instead of hardcoding spawn counts, use a WaveResource to define "Encounters" that the WaveManager processes sequentially.

Core Responsibilities
  • Manager: Orchestrates the timeline. Handles delays between waves and tracks "Victory" conditions (all enemies dead).
  • Spawner: Decoupled nodes that provide spatial context for where enemies appear (wave_spawner.gd / wave_weighted_spawner.gd).
  • Resource: Immutable data containers that allow designers to rebalance the game without touching code.

Density Decision Tree (pick scale before coding)

Live densityApproachMANDATORY loads
Under ~80 SceneTree enemiesNode manager + Marker spawnerswave_manager.gd, wave_spawner.gd, wave_resource.gd
Swarm visuals / hundredsMultiMesh + weighted compositionwave_loop_patterns.gd (MultiMesh / async path), wave_weighted_spawner.gd
~10k bodiesPhysicsServer / NavigationServer RIDs (no per-mob Node)wave_loop_patterns.gd server-RID patterns; do not scale wave_manager node spawns

wave_manager.gd is the SceneTree golden path (deferred add_child, group/signal clear counts, optional pool). Treat it as prototype→mid-scale — for RID swarms, follow wave_loop_patterns.gd instead of instantiating thousands of nodes.

Composition Golden Path

  1. Author a wave_resource.gd composition table.
  2. Place wave_spawner.gd Markers (or wave_weighted_spawner.gd when variety weights matter).
  3. Point wave_manager.gd spawner at that Marker; manager defers spawn and clears via &"enemies" group + signals.
  4. When weights replace fixed counts, call WaveWeightedSpawner.spawn_enemy() from the composition loop (or set manager spawner to the weighted node).

Expert Code Patterns

1. The Async Wave Trigger

Use await timers in wave_manager.gd — MANDATORY read before writing a custom timeline. Spawns use call_deferred(&"add_child", …); clear via signals/groups (not get_children() scans).

2. Composition-Based Spawning

Define variety in wave_resource.gd; place units with wave_spawner.gd / wave_weighted_spawner.gd. Do not hardcode scene paths in the manager.

Master Decision Matrix: Progression

PatternBest ForLogic
LinearStory missionsHand-crafted list of WaveResource.
EndlessSurvival modesCode-generated WaveResource with multiplier math.
TriggeredRPG EncountersWave starts only when player enters an Area3D.

NEVER Do

  • NEVER iterate through get_children() to find all enemies — This is extremely slow. Always add enemies to an "enemies" group and use get_tree().get_nodes_in_group(&"enemies") for efficient access.
  • NEVER constantly instantiate() and queue_free() hundreds of enemies — This causes garbage collection stutters. Use an object pool to reuse existing enemy instances.
  • NEVER spawn thousands of separate MeshInstance3D nodes for swarms — This will tank your draw calls. Use MultiMeshInstance3D to batch thousands of meshes into a single GPU call.
  • NEVER calculate pathfinding for hundreds of agents on the main thread — This will freeze your game. Enable use_async_iterations on your navigation regions or use NavigationServer3D.query_path().
  • NEVER forget to check is_inside_tree() before adding a child — If the spawner is queued for deletion, adding a child will crash. Always verify the spawner is still active in the tree.
  • NEVER assign a preloaded resource (like stats.tres) directly to spawned mobs — They will all share the exact same health/stats. Always call base_stats.duplicate_deep() to give each mob its own unique data.
  • NEVER use standard strings for high-frequency group calls — Always use StringName (&"enemies", &"take_damage") for optimal hash performance and to avoid unnecessary string allocations.
  • NEVER spawn entities directly inside physics callbacks synchronously — Instantiating nodes during physics steps can corrupt the physics state. Always use call_deferred(&"add_child", enemy).
  • NEVER leave CollisionShapes on dead enemies active — Corpses will block towers and navigation. Use set_deferred("disabled", true) immediately upon death.
  • NEVER synchronize complex Object types via MultiplayerSynchronizer — It only supports primitive types. For complex data, sync a UID or ID and look up the data locally on the client.
  • NEVER auto-start waves without player feedback — Always provide a UI countdown, a visual "Wave Incoming" effect, or a start button to maintain player agency.
  • NEVER hardcode spawn positions at (0,0,0) — Use Marker3D nodes in the editor so you can visually adjust spawn points without digging into code.
  • NEVER check wave completion by counting children every frame — It's too expensive. Maintain a local counter or use a signal-based system to track active enemy counts.
  • NEVER use the same navigation map for every entity type — If you have flying and walking enemies, use separate navigation maps to prevent pathing issues.
  • NEVER scale collision shapes non-uniformly for spawners — This breaks the collision detection math. Adjust the shape resource properties instead.

Available Scripts

MANDATORY: Read the appropriate script before implementing the corresponding pattern.

wave_loop_patterns.gd

10 Expert patterns: MultiMesh swarms, async pathfinding, background preloading, and server-side physics mobs.

wave_manager.gd

Orchestrates the timeline, delays between waves, and tracks clear via group counts + signals. Uses call_deferred add_child; optional pool via use_pool / recycle_enemy.

wave_resource.gd

Data containers for wave compositions and difficulty settings.

wave_spawner.gd

Marker3D spatial portal — get_spawn_position() with optional radius jitter. Wire as WaveManager.spawner.

Show full SKILL.md (481 more words)Show less
wave_weighted_spawner.gd

Weighted random enemy selection at a Marker. Use when composition variety is probability-driven rather than fixed counts.


Expert Wave Patterns

1. Occlusion Culling for Swarms

To optimize performance with hundreds of enemies, enable Occlusion Culling.

  • Setup: Add an OccluderInstance3D to your arena and bake it.
  • Result: Enemies completely hidden behind walls/pillars won't be processed by the GPU, significantly boosting FPS.
2. Wave UI Architecture

Decouple your wave data from the UI using a CanvasLayer and signals.

  • Wave Counter: Display current/total waves.
  • Health Bars: Use a TextureProgressBar on a CanvasLayer for bosses, or Sprite3D with a viewport texture for individual enemy health bars.

Expert knowledge (on demand)

LLM-ignorance rule: If a general agent would not know it before reading, load the reference — never delete expert deltas.

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.

Official Documentation
  • Resources — WaveResource compositions and delays stay designer-editable without hardcoding spawn tables in managers.
  • Nodes and scene instances — PackedScene.instantiate() plus add_child / call_deferred is the safe spawn path for wave enemies.
  • Groups — track live mobs with StringName groups and get_node_count_in_group instead of scanning children every frame.
  • Idle and Physics Processing — keep pacing on timers/await; never instantiate mid-physics callback without deferring.
  • SceneTreeTimer — pre-wave delays and spawn-rate gaps via create_timer without a forever _process countdown.
  • Using signals — wave_started / wave_cleared / all_waves_complete decouple UI, audio, and combat from the manager timeline.
  • Background loading — ResourceLoader.load_threaded_request bosses/heavy waves so first spawn does not hitch.
  • Random number generation — weighted composition and spawn jitter with RandomNumberGenerator.rand_weighted.
  • Using MultiMesh — batch swarm visuals when hundreds of minions would explode draw calls.
  • Occlusion culling — hide off-camera arena mobs so dense waves stay GPU-affordable.
  • Navigation introduction (3D) — async agent paths and separate maps for flying vs walking wave units.
  • Using Servers — PhysicsServer3D/NavigationServer3D RID swarms when SceneTree nodes cannot scale.
Prerequisites
Complements
Downstream / consumers
Master
  • godot-master — library router and mirrored module entry for cross-skill discovery.

© thedivergentai, LGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references) in skills/godot-game-loop-waves of thedivergentai/GD-Agentic-Skills.

  • SKILL.md
  • references/migration-notes.md
  • references/wave-expert-patterns.md
  • scripts/wave_loop_patterns.gd
  • scripts/wave_manager.gd
  • scripts/wave_resource.gd
  • scripts/wave_spawner.gd
  • scripts/wave_weighted_spawner.gd

Open the folder on GitHubat commit 4c4d0ff

Compare with similar skills

Godot Game Loop Waves next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Godot Game Loop Waves compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Godot Game Loop Waves this skillthedivergentai/GD-Agentic-Skills821—~3.3kAutomated safety check: PassLGPL-3.0
Godot Gdscript Patterns925236118/AlphaAgent10310 repos~5kAutomated safety check: PassMIT
Godot Ability Systemjame581/GodotPrompter805—~3kAutomated safety check: PassMIT
Godot Camera Systemsjame581/GodotPrompter805—~2.8kAutomated safety check: PassMIT
Input MapperRandallLiuXin/GodotMaker5501 repos~727Automated safety check: PassCustom licence
Godotautonomous-ai/openharness1.2k—~570Automated safety check: PassMIT

Similar skills

  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 10 repos~5k tokens
    Game DevelopmentAuto-check passed
  • Godot Ability System

    jame581/GodotPrompter

    Builds a data-driven ability system in Godot 4 from Resources and a component node, with cooldowns, buffs, stat modifiers, gameplay tags and HUD binding.

    805 GitHub stars~3k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Godot Camera Systems

    jame581/GodotPrompter

    Shows how to build cameras in Godot 4.3 and later: smooth follow, trauma-based screen shake, camera zones and transitions, with GDScript and C# examples for 2D and 3D.

    805 GitHub stars~2.8k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Input Mapper

    RandallLiuXin/GodotMaker

    Manage Godot input action mappings in project.godot. An agent skill from RandallLiuXin/GodotMaker.

    550 GitHub starsUsed in 1 repo~727 tokens
    Game DevelopmentAuto-check passed
  • Godot

    autonomous-ai/openharness

    Build Godot games with GDScript, native gameplay assertions and sandboxed Web exports.

    1.2k GitHub stars~570 tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Game Design

    ericrisco/rsc-harness

    A skill your agent uses when designing or repairing what makes a game fun — verbs and mechanics, moment-to-moment/session/meta loops, progression, economy faucets and sinks, difficulty curves…

    180 GitHub stars~3.6k tokensUpdated yesterday
    Game DevelopmentAuto-check passed

More from thedivergentai/GD-Agentic-Skills

All 98 skills in this repo
  • Godot 2D Animation

    thedivergentai/GD-Agentic-Skills

    Expert patterns for 2D animation in Godot using AnimatedSprite2D and skeletal cutout rigs.

    821 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot 3D World Building

    thedivergentai/GD-Agentic-Skills

    Expert patterns for 3D level design using GridMap with MeshLibrary, CSG constructive solid geometry, occlusion, and runtime GridMap builders.

    821 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Adapt 2D To 3D

    thedivergentai/GD-Agentic-Skills

    Expert patterns for migrating 2D games to 3D including node type conversions, camera systems (third-person, first-person, orbit), physics layer migration, sprite-to-model art pipeline, and control…

    821 GitHub stars~4.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Adapt 3D To 2D

    thedivergentai/GD-Agentic-Skills

    Expert patterns for simplifying 3D games to 2D including dimension reduction strategies, 2.5D fake-depth, isometric ports, camera flattening, physics conversion, 3D-to-sprite art pipeline, and…

    821 GitHub stars~4.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Agent Vision

    thedivergentai/GD-Agentic-Skills

    Agentic eyes for Godot work: cross-platform screenshot CLI (asset/region/window/screen) to budgeted WebP, TEMP editor viewport bridge under .gdskills/, and Taste Receptor Atlas v2 (~237…

    821 GitHub stars~3.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Godot Animation Tree Mastery

    thedivergentai/GD-Agentic-Skills

    Expert patterns for AnimationTree including StateMachine transitions, BlendSpace2D for directional movement, BlendTree for layered animations, root motion, transition conditions, advance…

    821 GitHub stars~3.6k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Godot Game Loop Waves

What does Godot Game Loop Waves do?

Expert patterns for managing combat waves, difficulty scaling, and automated enemy spawning in Godot 4. Godot Game Loop Waves is an agent skill from thedivergentai/GD-Agentic-Skills. Expert patterns for managing combat waves, difficulty scaling, and automated enemy spawning in Godot 4.

When should I use Godot Game Loop Waves?

Godot Game Loop Waves fits situations like: building wave-based shooters; tasks that involve Game development; tasks that involve Game design.

How do I install Godot Game Loop Waves in Claude Code?

Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-game-loop-waves -a claude-code`. Or copy the skill folder (skills/godot-game-loop-waves in thedivergentai/GD-Agentic-Skills) into .claude/skills/godot-game-loop-waves in your project. Claude Code loads it when a task matches its description.

How do I install Godot Game Loop Waves in Codex?

Run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-game-loop-waves -a codex`. Or copy the skill folder (skills/godot-game-loop-waves in thedivergentai/GD-Agentic-Skills) into .agents/skills/godot-game-loop-waves in your project. Codex loads it when a task matches its description.

Can I use Godot Game Loop Waves in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thedivergentai/GD-Agentic-Skills --skill godot-game-loop-waves -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/godot-game-loop-waves, .gemini/skills/godot-game-loop-waves, .github/skills/godot-game-loop-waves and .opencode/skills/godot-game-loop-waves in your project.

What does Godot Game Loop Waves need to run?

SKILL.md names no scripts, command-line tools or credentials: Godot Game Loop Waves is instructions for the agent only.

Does Godot Game Loop Waves access the network?

SKILL.md names 1 domain. As links in the text: docs.godotengine.org. This is read from the text; nothing was executed.

Is Godot Game Loop Waves safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Godot Game Loop Waves use?

Godot Game Loop Waves is published under the LGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Godot Game Loop Waves use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.1k tokens, read only when the agent opens those files.

What are the alternatives to Godot Game Loop Waves?

Skills that share tags, products or a category with Godot Game Loop Waves: Godot Gdscript Patterns (925236118/AlphaAgent, 103 stars), Godot Ability System (jame581/GodotPrompter, 805 stars), Godot Camera Systems (jame581/GodotPrompter, 805 stars) and Input Mapper (RandallLiuXin/GodotMaker, 550 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Godot Game Loop Waves?

thedivergentai (a GitHub user) maintains it in thedivergentai/GD-Agentic-Skills, which has 821 GitHub stars. The repository holds 98 skills in this directory. The repository was last updated on September 9, 2026.

Source: thedivergentai/GD-Agentic-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.