Godot Networkingのロゴ

Godot Networking

コミュニティ
EL4CTEO
godot-networking

Networking in Godot 4.7 - high-level multiplayer (ENet, WebSocket, WebRTC), server-authoritative design, @rpc / [Rpc] modes, MultiplayerSpawner and MultiplayerSynchronizer replication, authority, authentication, dedicated headless servers, interpolation, security rules, plus HTTPRequest/REST, raw TCP/UDP/WebSocket. Use for online or LAN multiplayer, co-op, lobbies, or calling web APIs.

概要

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

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

  • どのLLMでも利用可能

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

  • 1個の同梱ファイル

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

  • オープンソース

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

インストール

AIスキル「Godot Networking」を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-networking
  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-networking .claude/skills/godot-networking
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Networking (4.7)

Architecture first

  • Server-authoritative. The server (or listen host) owns game state. Clients send inputs and requests, never results ("I picked up item 42", not "my gold is 9999").
  • Peer IDs: the server is always 1. multiplayer.get_unique_id(), multiplayer.is_server(), multiplayer.get_peers(). Signals: peer_connected/peer_disconnected (all) and connected_to_server/connection_failed/server_disconnected (clients).
  • Transports (all are MultiplayerPeer, so swapping is trivial): ENetMultiplayerPeer (UDP, desktop and mobile, the default choice), WebSocketMultiplayerPeer (web clients; host needs TLS for https pages), WebRTCMultiplayerPeer (P2P, needs signaling), and Steam through the GodotSteam extension.
  • Dedicated server: export with the dedicated_server feature (Export → Resources → "Dedicated Server" strips visuals) and run with --headless. Branch with OS.has_feature("dedicated_server") or DisplayServer.get_name() == "headless".

RPCs

  • GDScript: @rpc("any_peer" | "authority", "call_local" | "call_remote", "reliable" | "unreliable" | "unreliable_ordered", channel). Call with rpc(&"method", args) (everyone) or rpc_id(peer, &"method", args). The default @rpc is authority-only, call_remote and reliable.
  • C#: [Rpc(MultiplayerApi.RpcMode.AnyPeer, CallLocal = true, TransferMode = MultiplayerPeer.TransferModeEnum.Reliable)], then Rpc(MethodName.Fire, dir) / RpcId(1, MethodName.Fire, dir).
  • The method must exist with the same RPC config on every peer, at the same node path. Spawn replicated nodes through MultiplayerSpawner so names and paths match.
  • Inside an RPC, multiplayer.get_remote_sender_id() tells you who called. Validate every any_peer RPC on the server: is the sender allowed, is the value sane, is it rate-limited?
  • Use unreliable for frequent state (positions), reliable for events (damage, chat, spawn requests) and unreliable_ordered for streams where old packets are useless. Use separate channels for unrelated reliable streams so they don't block each other.

Replication nodes (prefer them to hand-written RPC sync)

  • MultiplayerSpawner: set spawn_path (the parent node) and add_spawnable_scene("res://player.tscn"), or a spawn_function for custom data. Only the authority adds children (or calls spawn(data)), and clients get them automatically. The spawned signal fires on clients.
  • MultiplayerSynchronizer: set root_path and a replication config with properties such as .:position and Sprite2D:flip_h. Each property has a mode: spawn-only, ON_CHANGE (watch) or ALWAYS (sync). Tune replication_interval/delta_interval. Control interest with public_visibility = false + set_visibility_for(peer, true) or add_visibility_filter(callable).
  • Authority: call set_multiplayer_authority(peer_id) on a player's node (recursive by default) so that client's input synchronizer sends its data. Check is_multiplayer_authority() before reading local input. A common split is client authority over an input-only synchronizer node while the server keeps authority over state.
  • Smooth remote entities: interpolate received positions toward the latest snapshot in _process, or buffer two snapshots. Never snap.

Auth and safety

  • SceneMultiplayer.auth_callback + send_auth/complete_auth runs a handshake (version check, token) before a peer counts as connected.
  • Keep SceneMultiplayer.allow_object_decoding = false (the default). Never send Objects or Resources over the network.
  • Never load() paths or str_to_var data that came from peers. Don't call() method names received from the network.
  • Limit how many players can connect (create_server(port, max_clients)), and handle disconnects mid-game: despawn their nodes on the server.

HTTP and web APIs

  • HTTPRequest node: request(url, headers, method, body), then request_completed(result, code, headers, body). Parse with JSON.parse_string(body.get_string_from_utf8()). Use one request at a time per node (create more nodes for parallel requests), and set timeout.
  • TLS is automatic for https. For custom CAs use TLSOptions.client(trusted_cert).
  • Lower level: HTTPClient (streaming), WebSocketPeer (connect_to_url, call poll() every frame), StreamPeerTCP (4.6+: poll()/get_status() live on StreamPeerSocket), PacketPeerUDP and StreamPeerUDS (Unix sockets, 4.6+).
  • Never ship secret API keys in the client. Route them through your own backend.

Testing locally

Debug → "Customize Run Instances" in the editor can launch several instances with different arguments (--server, --client). From the CLI, start one headless server process plus GUI clients. run_godot.py smoke covers a headless server boot.

Lobby (ENet host/join), spawner + synchronizer player, validated RPCs, HTTP client, C# RPCs (compiled by the tests): references/patterns.md

同梱ファイル

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

よくある質問

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

Networking in Godot 4.7 - high-level multiplayer (ENet, WebSocket, WebRTC), server-authoritative design, @rpc / [Rpc] modes, MultiplayerSpawner and MultiplayerSynchronizer replication, authority, authentication, dedicated headless servers, interpolation, security rules, plus HTTPRequest/REST, raw TCP/UDP/WebSocket. Use for online or LAN multiplayer, co-op, lobbies, or calling web APIs.

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

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

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

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

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

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

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

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

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

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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