Godot Genre Rts logo

Godot Genre Rts

Community
thedivergentai
godot-genre-rts

Expert blueprint for real-time strategy games including unit selection (drag box, shift-add), command systems (move, attack, gather), pathfinding (NavigationAgent2D with RVO avoidance), fog of war (SubViewport mask shader), resource economy (gather/build loop), and AI opponents (behavior trees, utility AI). Use for base-building RTS or tactical combat games. Trigger keywords: RTS, unit_selection, command_system, fog_of_war, pathfinding_RVO, resource_economy, command_queue.

Overview

Publisherthedivergentai
RepositoryGD-Agentic-Skills
Skill namegodot-genre-rts
Stars
727
Forks
43
Bundled files
19
LicenseLGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 19 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by thedivergentai on GitHub. Read the source before you install it.

Installation

Install the Godot Genre Rts AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/thedivergentai/GD-Agentic-Skills.git /tmp/GD-Agentic-Skills
mkdir -p .claude/skills
cp -r /tmp/GD-Agentic-Skills/skills/godot-genre-rts .claude/skills/godot-genre-rts
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Godot Genre Rts in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Godot Genre Rts on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Godot Genre Rts is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

NEVER Do (Expert Anti-Patterns)

Unit Logic & Pathfinding

  • NEVER allow pathfinding "Jitter" when moving group units; strictly stagger path queries and enable RVO Avoidance only when units are in motion to save CPU cycles.
  • NEVER update RVO avoidance every frame for all units; strictly use Avoidance Threading (Project Settings) and replace static units with NavigationObstacle.
  • NEVER let units get stuck in infinite path loops; strictly implement a timeout and IDLE state if a destination is unreachable.
  • NEVER use _process() on hundreds of individual units; strictly use a central UnitManager or _physics_process only when required.
  • NEVER calculate unit visibility manually for Fog of War; strictly use a Shader-based mask (SubViewport + ColorRect) for GPU efficiency.
  • NEVER process unit AI or pathfinding synchronously for mass groups; strictly offload to WorkerThreadPool and stagger path updates.
  • NEVER use high-poly visual meshes as NavMesh source geometry; strictly use simplified Collision Shapes for baking.

Interaction & Commands

  • NEVER forget Command Queuing (Shift-Click); strictly store an Array[Command] and implement a "Force Move/Attack" bypass.
  • NEVER create excessive micromanagement; strictly automate low-level tasks like auto-aggro range and auto-return for resource gathering.
  • NEVER use exact floating-point equality (==) for grid or timers; strictly use is_equal_approx() for deterministic triggers.
  • NEVER rely on the visual SceneTree for selection data; strictly maintain a Typed Selection Set of RefCounted or Resource objects for deterministic serialization and netcode.
  • NEVER forget Command Queuing; strictly implement a Command Pattern using serializable Dictionary or JSON states for save-game and multiplayer playback.
  • NEVER forget to duplicate_deep() globally shared Resources; otherwise, modifying one unit's data (e.g., stats) affects all.

Performance & Simulation

  • NEVER render thousands of units using separate MeshInstance3D nodes; strictly use MultiMeshInstance with INSTANCE_CUSTOM data to drive unique GPU-side state animations (walking/attacking/color).
  • NEVER calculate transforms for mass units on the main thread; strictly use WorkerThreadPool to push buffers to RenderingServer.multimesh_set_buffer().
  • NEVER update every unit's navigation path in the same frame; strictly use random timers to stagger updates.
  • NEVER use standard Strings for high-frequency AI state identifiers; strictly use StringName (&"harvesting") for pointer-speed comparisons.
  • NEVER allow simulation coordinates to exceed 8192 units without float-precision management; strictly use world-origin shifts.
  • NEVER use CSGShape3D for building placement ghosts; strictly use optimized static ArrayMesh geometry.

🛠 Expert Components (scripts/)

MANDATORY: Read the script for the workflow you are implementing — do not re-inline selection/fog recipes in the agent body.

Selection / commands

Units / navigation / army

Economy / build / fog / ghosts


Core Loop

  1. Gather: Units collect resources (Gold, Wood, etc.).
  2. Build: Construct base buildings to unlock tech/units.
  3. Train: Produce an army of diverse units.
  4. Command: Micromanage units in real-time battles.
  5. Expand: Secure map control and resources.

Skill Chain

PhaseSkillsPurpose
1. Controlsgodot-input-handling, godot-camera-systemsSelection box, camera pan/zoom/edge-scroll
2. Unitsgodot-navigation-pathfinding, godot-state-machine-advancedPathfinding, RVO avoidance, Idle/Move/Attack
3. Systemsgodot-shaders-basics, godot-tilemap-mastery, godot-economy-systemFog masks / TileMap fog, gather-spend ledger
4. AIgodot-ai-navigation, godot-autoload-architectureEnemy commander routing + army/economy Autoloads
5. Polishgodot-ui-containers, godot-particlesStrategic UI chrome, battle feedback
6. Balancegodot-monte-carlo-balancerBuild-order policies vs extracted AI orders

Decision Tree: NavigationAgent+RVO vs MultiMesh+server sim

Active units (order of magnitude)Simulation / pathingRenderingLoad
< ~80Per-unit NavigationAgent2D/3D + RVO; set_velocityvelocity_computedMeshInstance / Sprite nodes OKMANDATORY rts_unit.gd, crowd_navigation_unit.gd
~80–400Stagger path queries; RVO only while moving; static → NavigationObstacle; central commanderStill node visuals; pool path queries+ rts_path_query_pool.gd, rts_army_manager.gd, Batch 09 COM formation
> ~400 / thousandsServer sim: logical transforms on WorkerThreadPool; few NavigationServer map queries (COM / squads), not one agent per soldierMultiMeshInstance + INSTANCE_CUSTOM; push buffers off main threadrts_army_manager.gd + MultiMesh path in Batch 09; Do NOT Load per-unit _process agents

Rule: Keep NavigationAgent+RVO while units need individual collision avoidance and micromanage feel. Switch to MultiMesh + server-side transforms when draw-call/node cost dominates — path as squads, not as thousands of agents.

Architecture Overview

1. Selection Manager

MANDATORY: selection_manager_marquee_2d.gd (2D) or selection_manager_raycast_3d.gd (3D). Maintain a typed selection set (not SceneTree-only) for netcode/save. Overlay: rts_selection_overlay.gd.

2. Unit Controller (State Machine)

MANDATORY: rts_unit.gd for Idle/Move/Attack/Hold + NavigationAgent. Deep state graphs → godot-state-machine-advanced. Always duplicate_deep() shared stat Resources (rts_unit_stat_duplicator.gd).

3. Group Movement & Formations

Avoid clumping on one click target: compute center of mass, apply relative offsets, issue per-unit destinations. For hundreds of units, use one NavigationServer path for the COM (Batch 09) plus rts_group_commander.gd / rts_path_query_pool.gd.

4. Fog of War

MANDATORY for tile/grid fog: fog_of_war_tile_mask.gd. SubViewport mask + shader overlay is valid for soft vision — implement via docs (Using Viewports) + godot-shaders-basics; Do NOT paste long fog shaders into this skill body when the tile-mask script covers the grid path.

Key Mechanics Implementation

Command Queue

Shift-click chains: store Array of serializable commands; pop on finish; draw queued path lines. Pair with selection scripts' issue-command hooks.

Resource Gathering

ResourceNode → work timer → DropoffPoint → bank update. Wire bank through global_economy_manager.gd / godot-economy-system.

Common Pitfalls

  1. Pathfinding jitter — Enable RVO; call set_velocity + move on velocity_computed; stagger group path queries.
  2. Too much micro — Auto-aggro / auto-return gather; command queue for force-move/attack.
  3. Node explosion — Past a few hundred units, follow the decision tree (MultiMesh + army manager), not per-unit _process.

Godot-Specific Tips

  • Avoidance: NavigationAgent* RVO requires set_velocity() + velocity_computed for the actual move.
  • Server architecture: Central UnitManager / rts_army_manager.gd for 100+ units.
  • Groups: Units, Buildings, Resources for selection filters.

🚀 Elite Technical Implementations (Batch 09)

1. Center-of-Mass Formation Movement

For large selections, one NavigationServer path from COM → target, then offset each unit (see decision tree). Keep the algorithm in project code or formation helpers; pair with rts_path_query_pool.gd so path objects are pooled.

gdscript
# Sketch only — prefer pooled queries from rts_path_query_pool.gd
static func move_group_to_target(units: Array, target: Vector3, map_rid: RID) -> void:
    if units.is_empty():
        return
    var com := Vector3.ZERO
    for u in units:
        com += u.global_position
    com /= units.size()
    var path: PackedVector3Array = NavigationServer3D.map_get_path(map_rid, com, target, true)
    if path.is_empty():
        return
    var dest: Vector3 = path[path.size() - 1]
    for u in units:
        u.set_movement_target(dest + (u.global_position - com))

2. MultiMesh armies (when decision tree says so)

Pre-allocate instance_count, drive visible_instance_count, push transforms (optionally via WorkerThreadPool → RenderingServer.multimesh_set_buffer). No per-soldier MeshInstance3D. See Official Documentation → Using MultiMesh.

3. Fog — script first

Prefer fog_of_war_tile_mask.gd. SubViewport vision masks: docs + godot-shaders-basics (do not duplicate long shader bodies here).

MANDATORY for depth beyond decision trees and script catalog: rts-mass-army-deep.md. Do NOT Load on first-pass wiring — use bundled scripts/ first.

Reference

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

Official Documentation

  • Navigation (tutorial index) — Entry map for agents, servers, meshes, layers, and obstacles before wiring army movement.
  • Using NavigationAgentsset_velocity / velocity_computed RVO loop that stops crowd jitter and stuck IDLE timeouts.
  • Using NavigationServers — Direct map path queries for center-of-mass formation moves without per-unit agent spam.
  • Using navigation path query objects — Pooled NavigationPathQueryParameters* patterns for mass move orders without heap churn.
  • Optimizing navigation performance — Staggered queries, avoidance budgets, and obstacle swaps when hundreds of units path each tick.
  • Using MultiMesh — GPU instance buffers for thousands of units instead of one MeshInstance per soldier.
  • Using multiple threadsWorkerThreadPool contracts for army AI batches off the main thread.
  • Ray-casting — Direct space-state picks for 3D selection and ground click targeting.
  • Using Viewports — SubViewport vision masks that feed fog-of-war shaders without CPU tile floods.
  • Mouse and input coordinates — Screen-to-world mapping for marquee boxes, unproject selection, and shift-queued orders.
  • AStarGrid2D — Fast grid pathing for building footprints and base placement checks.
  • Resources — Why unit stats must duplicate(true) so health/armor never mutate a shared template.

Related Skills

Prerequisites
  • godot-project-foundations — Physics ticks, navigation/avoidance project settings, and input map actions before selection and pathing stay deterministic.
  • godot-input-handling — Mouse buttons, shift-modifiers, and physics-step sampling that drive marquee select and command queuing.
  • godot-navigation-pathfinding — NavigationAgent RVO, maps, layers, and query-object pools this genre's army movement builds on.
Complements
Downstream / consumers
  • godot-monte-carlo-balancer — Build-order policies, unit cost curves, and AI opponent strength — simulate win% instead of gut-tuning gather rates.
  • godot-performance-optimization — Escalate here when MultiMesh buffers, avoidance, or WorkerThreadPool still dominate the profiler.
  • godot-combat-system — Hit/hurt and targeting contracts once move/attack commands need damage resolution.
Master
  • godot-master — Library router and mirrored module entry; open when discovering which Domain Skill owns a cross-cutting RTS concern.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Godot Genre Rts AI skill do?

Expert blueprint for real-time strategy games including unit selection (drag box, shift-add), command systems (move, attack, gather), pathfinding (NavigationAgent2D with RVO avoidance), fog of war (SubViewport mask shader), resource economy (gather/build loop), and AI opponents (behavior trees, utility AI). Use for base-building RTS or tactical combat games. Trigger keywords: RTS, unit_selection, command_system, fog_of_war, pathfinding_RVO, resource_economy, command_queue.

Why use Godot Genre Rts on TypingMind?

Because you install it once and use it with any model. Godot Genre Rts is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Godot Genre Rts in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/thedivergentai/GD-Agentic-Skills/tree/main/skills/godot-genre-rts. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Godot Genre Rts?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Godot Genre Rts?

As many as you like. As long as a model supports skills, you can use Godot Genre Rts with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Godot Genre Rts AI skill free?

Yes. It is published on GitHub by thedivergentai under the LGPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇