본문으로 건너뛰기
Skillpedia
일반 코딩41k · #6703

godot-gdscript-patterns

하는 일

이 AI 에이전트는 Godot 도구로 게임을 만드는 데 도움을 줍니다. 게임의 기본 요소(씬, 시그널)를 이해하고, GDScript로 코드를 체계적이고 효율적으로 작성하도록 돕습니다.

사용하는 경우

  • ✓Godot에서 게임을 만들 때.
  • ✓게임의 코드를 정리하고 싶을 때.
  • ✓Godot의 좋은 개발 방식을 배우고 싶을 때.

스킬 링크

https://github.com/wshobson/agents/blob/main/plugins/game-development/skills/godot-gdscript-patterns/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/game-development/skills/godot-gdscript-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Godot에서 움직이고 공격하는 캐릭터를 어떻게 만들 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Godot이 게임 요소(노드, 씬)를 어떻게 구성하는지, 그리고 GDScript로 게임이 작동하도록 코드를 어떻게 쓰는지에 대한 예제와 설명을 사용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Godot GDScript Patterns

Production patterns for Godot 4.x game development with GDScript, covering architecture, signals, scenes, and optimization.

When to Use This Skill

  • Building games with Godot 4
  • Implementing game systems in GDScript
  • Designing scene architecture
  • Managing game state
  • Optimizing GDScript performance
  • Learning Godot best practices

Core Concepts

1. Godot Architecture

Node: Base building block
├── Scene: Reusable node tree (saved as .tscn)
├── Resource: Data container (saved as .tres)
├── Signal: Event communication
└── Group: Node categorization

2. GDScript Basics

class_name Player
extends CharacterBody2D

# Signals
signal health_changed(new_health: int)
signal died

# Exports (Inspector-editable)
@export var speed: float = 200.0
@export var max_health: int = 100
@export_range(0, 1) var damage_reduction: float = 0.0
@export_group("Combat")
@export var attack_damage: int = 10
@export var attack_cooldown: float = 0.5

# Onready (initialized when ready)
@onready var sprite: Sprite2D = $Sprite2D
@onready var animation: AnimationPlayer = $AnimationPlayer
@onready var hitbox: Area2D = $Hitbox

# Private variables (convention: underscore prefix)
var _health: int
var _can_attack: bool = true

func _ready() -> void:
    _health = max_health

func _physics_process(delta: float) -> void:
    var direction := Input.get_vector("left", "right", "up", "down")
    velocity = direction * speed
    move_and_slide()

func take_damage(amount: int) -> void:
    var actual_damage := int(amount * (1.0 - damage_reduction))
    _health = max(_health - actual_damage, 0)
    health_changed.emit(_health)

    if _health <= 0:
        died.emit()

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

자주 묻는 질문

Godot의 '시그널'이란 무엇인가요?

어떤 일이 일어났을 때 객체가 보내는 알림입니다. 예를 들어 버튼이 눌렸을 때입니다. 다른 객체가 이 알림을 듣고 반응할 수 있습니다.

GDScript가 무엇인가요?

Godot의 주요 프로그래밍 언어입니다. Python과 비슷하며, 게임을 움직이게 하는 데 쓰입니다.

Godot의 '씬'이란 무엇인가요?

게임을 위한 재사용 가능한 구성 요소입니다. 캐릭터, 적, 아이템처럼 쉽게 추가하고 수정할 수 있는 단위로 생각하면 됩니다.

상세 정보

작성자의 원본 설명

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.

repo: wshobson/agents

인기도

GitHub 스타
41k
순위
#6703
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬