Godot Performanceのロゴ

Godot Performance

コミュニティ
EL4CTEO
godot-performance

Find and fix performance problems in Godot 4.7 - profilers and monitors, frame budgets, MultiMesh and server APIs for thousands of objects, WorkerThreadPool and thread groups, GDScript/C# hot paths, draw calls, lights, LOD, physics cost, loading and memory leaks. Use when the game stutters, FPS is low, loading is slow or memory grows.

概要

公開者EL4CTEO
リポジトリgodot-skills
スキル名godot-performance
スター
60
フォーク
6
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    EL4CTEOがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Godot Performance」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-performance
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EL4CTEO/godot-skills.git /tmp/godot-skills
mkdir -p .claude/skills
cp -r /tmp/godot-skills/skills/godot-performance .claude/skills/godot-performance
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでGodot Performanceを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にGodot Performanceを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Godot Performanceは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Performance (4.7)

Measure first. Never optimize blind. A budget of 16.6 ms per frame (60 FPS) or 8.3 ms (120 FPS) covers script, physics, rendering on the CPU and GPU.

Tools

  • Editor Debugger: Profiler (script functions; start it, play, then sort by self time), Visual Profiler (CPU vs GPU per render pass), Monitors (FPS, process/physics time, objects, nodes, orphan nodes, draw calls, video memory), Network Profiler, and ObjectDB snapshots (4.6+: diff two snapshots to find leaks).
  • Code: Performance.get_monitor(Performance.TIME_PROCESS), RENDER_TOTAL_DRAW_CALLS_IN_FRAME, OBJECT_NODE_COUNT, OBJECT_ORPHAN_NODE_COUNT. Add your own with Performance.add_custom_monitor(&"game/enemies", callable).
  • Native profilers (4.6+): Tracy, Perfetto (Android default) and Apple Instruments can see GDScript, C# and GDExtension frames. Use them for frame-time spikes.
  • CLI: --profiling, --gpu-profile, --print-fps, --benchmark. Use --fixed-fps 60 --quit-after N for repeatable runs.
  • Leaks: orphan nodes are nodes removed from the tree but never freed. Node.print_orphan_nodes(), get_orphan_node_ids() (4.5+).

CPU: do less work

  • Disable processing you don't need: set_process(false)/set_physics_process(false) when idle. VisibleOnScreenEnabler2D/3D pauses off-screen actors. Timers beat per-frame polling.
  • Per-frame code is the hot path. Cache nodes in @onready/_Ready. Use StringName literals (&"jump") for actions, groups and method names. Don't call get_tree().get_nodes_in_group() every frame. Use typed GDScript (typed opcodes are faster).
  • Signals and call_group are cheap for events, but don't emit them per entity per frame for thousands of entities.
  • Thousands of things: stop using one Node per thing.
    • Visuals: MultiMeshInstance3D/2D (one draw call; write multimesh.buffer in bulk), or GPU particles.
    • Logic: plain arrays and structs in one manager script (data-oriented), not a script per entity.
    • Physics: PhysicsServer2D/3D bodies and areas without nodes, or one raycast batch per frame.
    • Rendering without nodes: RenderingServer instances and canvas items.
  • Physics: keep physics_ticks_per_second at 60 unless the game needs more. Use simple primitive shapes, and avoid ConcavePolygonShape3D on moving bodies. Layers and masks cut pair checks. Let bodies sleep (can_sleep).

Threads

  • WorkerThreadPool.add_task(callable) / add_group_task(callable, count) (parallel for), then wait_for_task_completion(id). That's better than raw Thread for most jobs.
  • Scene-tree rule: nodes inside the tree may only be touched from the main thread, unless they're in a thread group (process_thread_group = PROCESS_THREAD_GROUP_SUB_THREAD, which processes that subtree in parallel and uses call_deferred_thread_group for cross-group calls). From worker threads, hand results back with call_deferred / Callable.call_deferred(). Assert with Thread.is_main_thread() (4.7).
  • Shared data: guard it with Mutex, or give each worker its own slice and merge on the main thread.
  • Background loading: ResourceLoader.load_threaded_request(path, "", true) uses sub-threads for dependencies.

GPU and rendering

  • Draw calls: merge static meshes and share materials, because each unique material on a mesh surface adds calls. Use MultiMesh for repeats and texture atlases in 2D.
  • Lights and shadows are the usual GPU hogs. Use few shadowed omni and spot lights, keep directional_shadow_max_distance small, and bake static lighting (LightmapGI).
  • Overdraw: big transparent particles and full-screen alpha. Use alpha scissor or hash for foliage and smaller particle quads.
  • Scale detail: LOD (mesh_lod_threshold), visibility_range_*, occlusion culling, and resolution scaling (FSR, MetalFX) on weak GPUs. Pick the right renderer: Mobile or Compatibility for low-end (see godot-3d-rendering).
  • Shader hitches: shader baker (export option), fewer material variants.

Loading and memory

  • preload loads at script load and blocks. Use it only for small things you always need. load is lazy. Threaded loading suits levels.
  • ResourceLoader caches resources. Reuse them, and don't duplicate() shared resources unless you need per-instance state.
  • Textures: VRAM-compressed import (default for 3D; enable for big 2D). Mipmaps for 3D. Limit max size per platform. Audio: Ogg streams for long tracks.
  • Free what you spawn: queue_free() and pools for bullets. Watch the orphan count stay flat.

GDScript vs C#

  • GDScript is fine for gameplay. Move tight math loops (pathfinding, procgen, simulations) to C# or GDExtension, and still batch API calls.
  • C#: avoid per-frame allocations (LINQ, closures, string formatting, new Godot.Collections.Array). Every Godot API call crosses an interop boundary, so batch them. Packed arrays copy when they cross that boundary.

Platform budgets (rule of thumb)

Mobile: < 100–150 draw calls, 1 shadowed light, Mobile or Compatibility renderer, 30–60 FPS target. Web: Compatibility renderer, single-threaded unless the export uses threads (needs cross-origin isolation headers), and keep downloads small. Desktop or console: Forward+, profile on the minimum-spec hardware.

Perf HUD + custom monitors, MultiMesh crowd, parallel group task, server-side bullets (compiled by the tests): references/patterns.md

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Godot Performance」では何ができますか?

Find and fix performance problems in Godot 4.7 - profilers and monitors, frame budgets, MultiMesh and server APIs for thousands of objects, WorkerThreadPool and thread groups, GDScript/C# hot paths, draw calls, lights, LOD, physics cost, loading and memory leaks. Use when the game stutters, FPS is low, loading is slow or memory grows.

TypingMindでGodot Performanceを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Godot Performanceはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにGodot Performanceをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-performanceを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Godot Performanceを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Godot Performanceで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもGodot Performanceを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Godot Performance」は無料ですか?

はい。EL4CTEOがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇