godot-genre-rts
Installation
SKILL.md
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_processonly 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
WorkerThreadPooland 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
RefCountedorResourceobjects for deterministic serialization and netcode. - NEVER forget Command Queuing; strictly implement a Command Pattern using serializable
DictionaryorJSONstates 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.