Godot Gdscript Patterns
Unverified●30/40Claude Code◐PartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor◐PartialPlain prose you can paste in — but no Cursor rules file
Codex◐PartialPlain prose you can paste in — but no AGENTS.md
Gemini CLI◐PartialPlain prose you can paste in
Copilot◐PartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add godot-gdscript-patternsWho is stuck, and on what
Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization. Use when building Godot games, implementing game systems, or learning GDScript best practices.
The whole source
Frontmatter — 2 properties
| name | godot-gdscript-patterns |
|---|---|
| description | Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization. Use when building Godot games, implementing game systems, or learning GDScript best practices. |
| 1 | --- |
| 2 | name: godot-gdscript-patterns |
| 3 | description: Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization. Use when building Godot games, implementing game systems, or learning GDScript best practices. |
| 4 | ---A5 — No allowed-tools declared — no way to tell what this skill may touch |
| 5 | |
| 6 | # Godot GDScript Patterns |
| 7 | |
| 8 | Production patterns for Godot 4.x game development with GDScript, covering architecture, signals, scenes, and optimization. |
| 9 | |
| 10 | ## When to Use This Skill |
| 11 | |
| 12 | - Building games with Godot 4 |
| 13 | - Implementing game systems in GDScript |
| 14 | - Designing scene architecture |
| 15 | - Managing game state |
| 16 | - Optimizing GDScript performance |
| 17 | - Learning Godot best practices |
| 18 | |
| 19 | ## Core Concepts |
| 20 | |
| 21 | ### 1. Godot Architecture |
| 22 | |
| 23 | ``` |
| 24 | Node: Base building block |
| 25 | ├── Scene: Reusable node tree (saved as .tscn) |
| 26 | ├── Resource: Data container (saved as .tres) |
| 27 | ├── Signal: Event communication |
| 28 | └── Group: Node categorization |
| 29 | ``` |
| 30 | |
| 31 | ### 2. GDScript Basics |
| 32 | |
| 33 | ```gdscript |
| 34 | class_name Player |
| 35 | extends CharacterBody2D |
| 36 | |
| 37 | # Signals |
| 38 | signal health_changed(new_health: int) |
| 39 | signal died |
| 40 | |
| 41 | # Exports (Inspector-editable) |
| 42 | @export var speed: float = 200.0 |
| 43 | @export var max_health: int = 100 |
| 44 | @export_range(0, 1) var damage_reduction: float = 0.0 |
| 45 | @export_group("Combat") |
| 46 | @export var attack_damage: int = 10 |
| 47 | @export var attack_cooldown: float = 0.5 |
| 48 | |
| 49 | # Onready (initialized when ready) |
| 50 | @onready var sprite: Sprite2D = $Sprite2D |
| 51 | @onready var animation: AnimationPlayer = $AnimationPlayer |
| 52 | @onready var hitbox: Area2D = $Hitbox |
| 53 | |
| 54 | # Private variables (convention: underscore prefix) |
| 55 | var _health: int |
| 56 | var _can_attack: bool = true |
| 57 | |
| 58 | func _ready() -> void: |
| 59 | _health = max_health |
| 60 | |
| 61 | func _physics_process(delta: float) -> void: |
| 62 | var direction := Input.get_vector("left", "right", "up", "down") |
| 63 | velocity = direction * speed |
| 64 | move_and_slide() |
| 65 | |
| 66 | func take_damage(amount: int) -> void: |
| 67 | var actual_damage := int(amount * (1.0 - damage_reduction)) |
| 68 | _health = max(_health - actual_damage, 0) |
| 69 | health_changed.emit(_health) |
| 70 | |
| 71 | if _health <= 0: |
| 72 | died.emit() |
| 73 | ``` |
| 74 | |
| 75 | ## Detailed patterns and worked examples |
| 76 | |
| 77 | Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient. |
| 78 | |
| 79 |
Reviews
Installed this one?Write the first review and take the Trailblazer badge.
Alternatives
Subagent Driven DevelopmentUse when executing implementation plans with independent tasks in the current session◐◐◐◐◐●36/40Python Code Style & DocumentationPython code style, linting, formatting, naming conventions, and documentation standards. Use when writing new code, reviewing style, configuring linters, writing docstrings, or establishing project standards.◐····●35/40Competitor Price Analysis 💲Competitor pricing strategy analysis and market positioning. Price mapping, pricing gaps identification, elasticity signals evaluation, and strategic pricing optimization. Use when the user asks about competitor pricing, price analysis, pricing strategy, or co◐····●34/40Competitor Price Tracker 📊Set up competitor price tracking and monitoring workflows. Track price changes, detect promotions, analyze pricing patterns, and get alerts for competitive price movements.◐····●34/40