godot-patterns

Installation
SKILL.md

Godot 4 GDScript Patterns

Idiomatic patterns for Godot 4.x projects written in GDScript. Verified against the Godot 4.7 documentation; most guidance applies to every 4.x release.

When to Activate

  • Writing or reviewing .gd files
  • Designing a scene tree or deciding which node owns what
  • Choosing between a signal, a direct call, an autoload, or a Resource
  • Debugging "node not found", freed-object, or signal-connection errors
  • Structuring a game so its logic can be tested without running the renderer

Core Principles

  1. Type everything. Typed GDScript catches bugs at parse time and speeds up the editor.
  2. Call down, signal up. A parent may call methods on its children. A child announces events with signals and never reaches up to its parent.
  3. Keep game logic out of Nodes where you can. Plain RefCounted or Resource classes can be tested headlessly. Nodes should draw and forward input.
  4. Data lives in Resources, not in scripts full of constants.
  5. Autoloads are global state. Use as few as you can and treat each one as a public API.
Installs
100
Repository
affaan-m/ecc
GitHub Stars
305.6K
First Seen
2 days ago