← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

godot-gdscript-patterns

掌握Godot 4的GDScript模式,包括信号、场景、状态机和优化。在构建Godot游戏、实现游戏系统或学习GDScript最佳实践时使用。

person作者: jakexiaohubgithub

Godot GDScript Patterns

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

Use this skill when

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

Do not use this skill when

  • The task is unrelated to godot gdscript patterns
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

Resources

  • resources/implementation-playbook.md for detailed patterns and examples.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

Playbook samples are separate-file fragments; supply Input Map actions, scene nodes, Player/State subclasses, die() and other project-specific helpers before use. The pool requires a CanvasItem-compatible scene root and explicit physics/collision reset: disabling processing/visibility does not prevent every signal callback, so inactive objects must reject hits. Validate initial states and guard asynchronous scene loads/transitions against duplicate requests. Save files require schema/version/range validation and atomic replacement; a hardcoded encryption key in a distributed game is extractable and cannot protect secrets or establish anti-cheat trust. Check save/open/delete failures. Pin the Godot version and use the profiler before claiming gains. See Godot pause/process modes.