본문으로 건너뛰기
cccskills
무료GitHub에 공개

godot-multiplayer-networking

Expert multiplayer for desync, rollback, dedicated --headless servers, interest culling, and bandwidth spikes: ENet/WebRTC choice, authority, secure RPCs, client prediction/reconcile, and adaptive sync. Trigger on rubber-banding, cheat-able clients, peer floods, late join, or profiler Network spikes — not only greenfield online games. Keywords: multiplayer, RPC, ENetMultiplayerPeer, MultiplayerSynchronizer, authority, client prediction, rollback, interest management, headless, desync.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(26)

  • SKILL.md12.6 KB
  • references/migration-notes.md2.6 KB
  • references/rpc-lobby-and-sync.md3.1 KB
  • scripts/client_network_setup.gd1.5 KB
  • scripts/client_prediction_synchronizer.gd2.6 KB
  • scripts/game_state_sync_manager.gd1.2 KB
  • scripts/multiplayer_spawner_manager.gd1.4 KB
  • scripts/net_adaptive_sync_throttle.gd1.4 KB
  • scripts/net_anti_desync_reconciler.gd1.6 KB
  • scripts/net_custom_id_mapper.gd1.4 KB
  • scripts/net_enet_expert_config.gd1.7 KB
  • scripts/net_headless_server_auto_start.gd1.5 KB
  • scripts/net_heartbeat_monitor.gd1.6 KB
  • scripts/net_lan_discovery.gd1.5 KB
  • scripts/net_packet_bit_packer.gd1.7 KB
  • scripts/net_packet_rate_limiter.gd1.5 KB
  • scripts/net_rollback_helper.gd3.0 KB
  • scripts/net_visibility_grid_culling.gd1.5 KB
  • scripts/network_error_handler.gd1.3 KB
  • scripts/network_input_synchronizer.gd1.4 KB
  • scripts/networked_interpolator.gd1.4 KB
  • scripts/packet_peer_latency_test.gd1.5 KB
  • scripts/secure_variable_synchronizer.gd1.4 KB
  • scripts/secured_rpc_pattern.gd1.6 KB
  • scripts/server_authoritative_controller.gd3.6 KB
  • scripts/server_dedicated_host.gd1.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

NEVER Do (Expert Networking Rules)

Core Architecture

  • NEVER use Reliable for high-frequency data (Position/Movement) — Reliable packets block all following packets until acknowledged (Head-of-Line blocking). Use UnreliableOrdered.
  • NEVER trust the client for shared state (Health/Money/Inventory) — Clients should only suggest actions. The Server MUST validate and broadcast the result.
  • NEVER hardcode the Server IP — Always allow for discovery (net_lan_discovery.gd) or pass the IP via CLI/UI.

Performance & Bandwidth

  • NEVER send the same data every frame — Use net_adaptive_sync_throttle.gd to only send updates when state changes significantly or at fixed Hz intervals (e.g., 20Hz).
  • NEVER use JSON for high-speed synchronization — String serialization is massive over the wire. Use bit-packing (net_packet_bit_packer.gd) to keep packets under 100 bytes.
  • NEVER broadcast to all peers if it's not needed — In large worlds, use Interest Management (net_visibility_grid_culling.gd). A player in the forest doesn't need the position of a player in the city.

Security

  • NEVER allow unlimited RPC calls per second — An attacker can flood the server with 1,000 "Attack" RPCs to crash the game. Use net_packet_rate_limiter.gd.
  • NEVER expose PeerIDs to the end-user — PeerIDs are internal. Always map them to persistent UserIDs (net_custom_id_mapper.gd) from a database.
  • NEVER run a dedicated server with a GUI enabled — Use --headless (net_headless_server_auto_start.gd) to save resources and ensure stability.

Decision Tree (transport / authority / sync Hz)

QuestionPreferScript
Desktop/console LAN or dedicated UDPENetMANDATORY net_enet_expert_config.gd
Browser / NAT-hostile peersWebRTC (or WebSocket fallback)Official Docs + peer wrappers; still use secure RPC scripts
Who owns gameplay truth?Server-authoritativeMANDATORY server_authoritative_controller.gd
Dedicated host without GUI--headlessMANDATORY net_headless_server_auto_start.gd / server_dedicated_host.gd
Position @ 10–20 Hz, not every frameAdaptive throttleMANDATORY net_adaptive_sync_throttle.gd

Do NOT Load lobby/RPC beginner recipes from memory — use the golden path below and open only matching scripts.

Golden Path

  1. Host / dedicated → server_dedicated_host.gd + net_headless_server_auto_start.gd; clients → client_network_setup.gd.
  2. Secure RPC → secured_rpc_pattern.gd + net_packet_rate_limiter.gd + secure_variable_synchronizer.gd.
  3. Prediction / reconcile → client_prediction_synchronizer.gd + net_anti_desync_reconciler.gd; fighting/rollback → net_rollback_helper.gd.
  4. Interest culling → net_visibility_grid_culling.gd before broadcasting positions.

Available Scripts

Transport & host

Authority, RPC, sync

Desync / rollback / interest

Expert Pointers

  • Position/movement: UnreliableOrdered + throttle — never reliable every frame.
  • Clients suggest; server validates and broadcasts results.
  • Large worlds: cull with visibility grid before adding more sync Hz.

Deep dives (on demand)

  • RPC modes, lobby handshake, puppet interpolation → rpc-lobby-and-sync.md
  • Delta-compression + network simulator concepts live in that reference (LLM-ignorance: unreliable vs reliable HoL blocking is NOT generic knowledge).

Reference

Progressive disclosure: open Official Documentation links only when researching a specific API; load Related Skills when routing to a peer domain — do not preload the whole lattice.

Official Documentation

  • High-level multiplayer — RPC modes, authority, and peer lifecycle for host/join lobbies and server-validated actions.
  • Networking — Transport map (ENet / WebSocket / WebRTC / HTTP) so peer choice matches platform and NAT constraints.
  • MultiplayerAPI — multiplayer singleton: peer IDs, connection signals, and rpc / rpc_id entry points.
  • MultiplayerPeer — Transfer modes (reliable / unreliable / unordered) and connection status shared by every backend.
  • ENetMultiplayerPeer — UDP host/client peer used for LAN, dedicated servers, and most action games.
  • SceneMultiplayer — Default MultiplayerAPI: root path, auth callbacks, and scene-tree RPC routing.
  • MultiplayerSpawner — Spawn/despawn replication so late joiners share the same networked scene graph.
  • MultiplayerSynchronizer — Property replication, on-change deltas, and visibility filters that replace ad-hoc position RPCs.
  • Node — set_multiplayer_authority / is_multiplayer_authority ownership rules for input vs shared state.
  • PacketPeerUDP — Raw UDP send/receive for LAN discovery broadcasts outside the high-level multiplayer peer.
  • WebRTC — Browser-friendly P2P path when ENet UDP cannot punch through firewalls alone.
  • Command line tutorial — --headless and CLI flags for dedicated-server launches and multi-instance tests.

Related Skills

Prerequisites

  • godot-project-foundations — Project layout, Autoloads, and export/feature flags that host/join and dedicated-server builds depend on.
  • godot-gdscript-mastery — Typed @rpc annotations, Callables, and PackedByteArray patterns used by secure RPCs and bit-packers.
  • godot-input-handling — Split InputMap reads from simulation so clients send intents and the authority owns outcomes.

Complements

Downstream / consumers

Master

  • godot-master — Library router and mirrored module entry; open when discovering which Domain Skill owns a cross-cutting networking concern.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Bevy ECS skill for 2D sprite animation. Keywords: Bevy, sprite, animation, AnimationPlayer, AnimationClip, 2D.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8782026년 10월 17일 업데이트

Spawn and tune Bevy 0.20 directional, point, and spot lights, cascade shadows, distance fog, and a nearest-light shadow budget. Use when a 3D scene needs a sun, local lights, or fog on the camera. Keywords: DirectionalLight, PointLight, SpotLight, CascadeShadowConfig, DistanceFog, bevy_light.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8782026년 10월 17일 업데이트

Bevy ECS skill for PBR materials. Keywords: Bevy, StandardMaterial, PBR, material, ExtendedMaterial.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8782026년 10월 17일 업데이트

Bevy ECS skill for 3D level assembly. Keywords: Bevy, level, scene, mesh, world, ECS.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8782026년 10월 17일 업데이트

Bevy ECS skill for abilities. Keywords: Bevy, ability, cooldown, ECS, gameplay.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8782026년 10월 17일 업데이트

Rewrite Bevy 2D actors and cameras into 3D meshes and Camera3d while keeping gameplay components. Use when a Bevy 2D game should gain a perspective camera, mesh draw, and a planar velocity lifted onto XZ. Keywords: Camera2d, Camera3d, Sprite, Mesh3d, StandardMaterial, WishVelocity.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

thedivergentai/Game-Dev-Agentic-Skills8782026년 10월 17일 업데이트

thedivergentai의 스킬 모두 보기

이 스킬의 문제 신고