Agent skill

Multiplayer Sync

by jame581 in jame581/GodotPrompter

A skill your agent uses when synchronizing multiplayer state — MultiplayerSynchronizer, interpolation, prediction, and lag compensation

MITAuto-check passedGame Development

Install Multiplayer Sync

skills CLI
$ npx skills add jame581/GodotPrompter --skill multiplayer-sync -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jame581/GodotPrompter multiplayer-sync --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jame581/GodotPrompter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/multiplayer-sync .claude/skills/multiplayer-sync && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
multiplayer-sync
GitHub stars
795
Token cost
~2.7k tokens
SKILL.md length
904 words
Files
5 (incl. references)
Skills in repo
58
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when synchronizing multiplayer state — MultiplayerSynchronizer, interpolation, prediction, and lag compensation

  • Works in 8 steps: MultiplayerSynchronizer → Property Synchronization → Interpolation → …
  • Synchronizing multiplayer state — MultiplayerSynchronizer
  • SKILL.md covers 1. MultiplayerSynchronizer, 2. Property Synchronization, 3. Interpolation and 4. Client-Side Prediction, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Multiplayer Sync is an agent skill from jame581/GodotPrompter. Use when synchronizing multiplayer state — MultiplayerSynchronizer, interpolation, prediction, and lag compensation

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/bandwidth-optimization.md`, `references/client-prediction.md` and `references/interpolation.md`).

It sits in Game Development, covering Game development. It works with Godot and C#. The repository describes itself as: Agentic skills framework for Godot 4.x. Domain-specific skills for AI coding agents (Claude Code, Copilot, Antigravity, Cursor). The licence is MIT.

When your agent uses it

  • Synchronizing multiplayer state — MultiplayerSynchronizer
  • Lag compensation

Example prompts

  • “/multiplayer-sync”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. MultiplayerSynchronizer
  2. Property Synchronization
  3. Interpolation
  4. Client-Side Prediction
  5. Lag Compensation
  6. State vs Input Synchronization
  7. Bandwidth Optimization
  8. Implementation Checklist

What it can do on your machine

Read from SKILL.md and the folder at commit 1e7d79d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are gdscript and csharp).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Multiplayer Sync loads about 2.7k tokens when it runs, and up to ~7.3k if it reads all its reference files. Until then it costs about 33 tokens; SKILL.md has 904 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~33
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jame581/GodotPrompter at commit 1e7d79d, republished under its MIT licence (© jame581). 904 words, ~2,659 tokens.

Download SKILL.mdSave it as .claude/skills/multiplayer-sync/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
multiplayer-sync
description
Use when synchronizing multiplayer state — MultiplayerSynchronizer, interpolation, prediction, and lag compensation

Multiplayer Synchronization in Godot 4.3+

All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.

Related skills: multiplayer-basics for ENet setup, RPCs, and authority model, dedicated-server for headless export and deployment, physics-system for physics interpolation and RigidBody synchronization.


1. MultiplayerSynchronizer

MultiplayerSynchronizer is Godot's built-in node for replicating properties across the network. Add it as a child of the node whose state you want to share.

What It Does
  • Sends property values from the authority peer to all others at a configured interval
  • Supports both delta sync (only changed values) and full sync (all values every tick)
  • Allows visibility filters to control which peers receive updates
Replication Config in the Editor
  1. Select the MultiplayerSynchronizer node in the scene tree.
  2. In the Inspector, open Replication and click Add Property.
  3. Pick the parent node path and property name (e.g. position, velocity).
  4. Set Sync (send every interval) or Spawn (send only on spawn) per property.
  5. Set the Replication Interval (seconds). 0 means every physics frame.
Key Properties
PropertyDescription
replication_intervalSeconds between full sync updates. 0 = every physics frame
delta_intervalSeconds between delta sync updates. 0 = disabled
public_visibilityWhen true, updates go to all peers (default)
visibility_filtersArray of Callables; each returns true if a peer should receive updates
Delta vs Full Sync
ModeHow It WorksBest For
Full syncSends all configured properties every replication_intervalSimple objects, low property count
Delta syncSends only properties that changed since last sync, every delta_intervalObjects with many properties that change infrequently

Use both together: set replication_interval for periodic full state and delta_interval for frequent change-only bursts.

Visibility Filters (GDScript)
gdscript
# Only send updates to peers within 500 units of this object.
func _ready() -> void:
    $MultiplayerSynchronizer.add_visibility_filter(_is_peer_in_range)

func _is_peer_in_range(peer_id: int) -> bool:
    var peer_player := _get_player_node(peer_id)
    if peer_player == null:
        return false
    return global_position.distance_to(peer_player.global_position) <= 500.0
Visibility Filters (C#)
csharp
// Only send updates to peers within 500 units of this object.
public override void _Ready()
{
    var sync = GetNode<MultiplayerSynchronizer>("MultiplayerSynchronizer");
    sync.AddVisibilityFilter(Callable.From<int>(IsPeerInRange));
}

private bool IsPeerInRange(int peerId)
{
    var peerPlayer = GetPlayerNode(peerId);
    if (peerPlayer is null)
        return false;
    return GlobalPosition.DistanceTo(peerPlayer.GlobalPosition) <= 500.0f;
}

2. Property Synchronization

What to Sync

Sync the minimal state needed to reconstruct the visual on remote peers. Typical properties:

PropertyTypeNotes
positionVector2 / Vector3Core transform — sync every frame or use interpolation
velocityVector2 / Vector3Helps remote prediction stay ahead of position snaps
healthint / floatSync reliably on change; delta sync is ideal
animation_stateString / intSync on change; use an enum int to save bandwidth
is_crouchingboolLow-change boolean; delta sync or RPC on change
Synced Player (GDScript)
gdscript
# synced_player.gd
extends CharacterBody2D

## Sync interval in seconds — exposed so designers can tune per object type.
@export var sync_interval: float = 0.05  # 20 Hz

@export var speed: float = 200.0

# These properties are listed in the MultiplayerSynchronizer replication config.
var synced_position: Vector2 = Vector2.ZERO
var synced_velocity: Vector2 = Vector2.ZERO
var synced_health: int = 100
var synced_anim: int = 0  # 0 = idle, 1 = run, 2 = jump

@onready var _sync: MultiplayerSynchronizer = $MultiplayerSynchronizer


func _ready() -> void:
    _sync.replication_interval = sync_interval
    # Only the authority (owner) drives movement.
    set_physics_process(is_multiplayer_authority())


func _physics_process(_delta: float) -> void:
    # Authority: write canonical state so MultiplayerSynchronizer can replicate it.
    synced_position = global_position
    synced_velocity = velocity
    synced_anim     = _compute_anim_state()
Synced Player (C#)
csharp
// SyncedPlayer.cs
using Godot;

public partial class SyncedPlayer : CharacterBody2D
{
    /// <summary>Sync interval in seconds. Exposed so designers can tune per object type.</summary>
    [Export] public float SyncInterval { get; set; } = 0.05f; // 20 Hz

    [Export] public float Speed { get; set; } = 200.0f;

    // These properties are listed in the MultiplayerSynchronizer replication config.
    public Vector2 SyncedPosition { get; set; } = Vector2.Zero;
    public Vector2 SyncedVelocity { get; set; } = Vector2.Zero;
    public int SyncedHealth { get; set; } = 100;
    public int SyncedAnim   { get; set; } = 0; // 0=idle, 1=run, 2=jump

    private MultiplayerSynchronizer _sync = null!;

    public override void _Ready()
    {
        _sync = GetNode<MultiplayerSynchronizer>("MultiplayerSynchronizer");
        _sync.ReplicationInterval = SyncInterval;
        SetPhysicsProcess(IsMultiplayerAuthority());
    }

    public override void _PhysicsProcess(double delta)
    {
        // Authority: write canonical state for replication.
        SyncedPosition = GlobalPosition;
        SyncedVelocity = Velocity;
        SyncedAnim     = ComputeAnimState();
    }

    private int ComputeAnimState()
    {
        if (!IsOnFloor()) return 2;
        return Velocity.Length() > 1f ? 1 : 0;
    }
}

3. Interpolation

MultiplayerSynchronizer updates target properties at sync intervals (e.g., 30 Hz), but rendering runs at frame rate (60+ Hz). Without interpolation, remote players appear to teleport between snapshots. The fix: store position snapshots with timestamps and lerp in _process toward the latest snapshot using a small offset (interpolation buffer ~100 ms).

See references/interpolation.md for the full GDScript and C# interpolation buffer pattern (snapshot ring, latest-snapshot interpolation, render-time lerp).


4. Client-Side Prediction

For local-player responsiveness: predict movement immediately on client, send input to server, reconcile when server snapshot arrives. If server diverges from client prediction beyond a threshold, snap; otherwise smoothly lerp the correction over 100-200 ms.

See references/client-prediction.md for the full predict-and-reconcile pattern (input ring buffer, server reconciliation, replay) in GDScript + C#.


5. Lag Compensation

For hit-scan weapons in fast-paced games: when the server validates a hit, it rewinds the world state to the client's view-time (now - client_rtt/2 - interp_delay) and tests the hit against that historical state.

See references/lag-compensation.md for the snapshot-history pattern, view-time calculation, and a hit-scan validator in GDScript + C#.


Show full SKILL.md (368 more words)Show less

6. State vs Input Synchronization

Choose the synchronization model that fits your game's needs:

FactorSync StateSync Inputs
What is sentCurrent property values (position, health, etc.)Player input actions each frame
Who simulatesAuthority only; others receive resultsAll peers run the same simulation
Determinism requiredNoYes — every peer must produce identical output from the same inputs
BandwidthHigher — full state sent each intervalLower — small input structs per frame
ResponsivenessLower — non-authority peers wait for next sync tickHigher — local prediction is trivial when deterministic
ComplexityLower — no reconciliation loopHigher — requires deterministic physics, fixed-point math, or lockstep
Best forAction games, shooters, most real-time gamesFighting games, RTS, turn-based, simulation games
Lag compensation neededYes, for hit detectionUsually not — all peers are in sync

Hybrid approach (most real-time games): sync inputs for the local player's character (enabling prediction), sync state for all other objects and game events.


7. Bandwidth Optimization

Four levers: sync only changed properties (replication-config flag per property), quantize floats (Vector3 components in mm not floats — 16-bit cuts bytes by 2×), distance-based sync rate (far-away objects sync at 5 Hz, close at 30 Hz), and channel selection (reliable for state changes that must arrive, unreliable for position streams that get superseded).

See references/bandwidth-optimization.md for full GDScript + C# recipes for each lever, plus the reliable-vs-unreliable channel decision tree.


8. Implementation Checklist

  • MultiplayerSynchronizer is a direct child of the node it replicates
  • Only the authority peer writes to synced properties; others are read-only
  • set_multiplayer_authority() is called at spawn time with the correct peer ID
  • replication_interval and delta_interval are tuned for the object's update rate
  • Remote player visuals use interpolation in _process, not _physics_process
  • Interpolation stores previous and current state and blends using Engine.get_physics_interpolation_fraction()
  • Client-side prediction is applied only to the local player's own character
  • Pending input buffer is bounded (max ~128 ticks) to prevent memory growth
  • Reconciliation threshold prevents jitter from micro-corrections
  • Position and velocity use unreliable RPC; state changes use reliable
  • Float quantization is applied before sending position data over the network
  • Lag compensation snapshot history is pruned each tick to a bounded window
  • Server validates all hit detection; clients never self-report kills
  • Distance-based sync rate reduces bandwidth for far-away objects

© jame581, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/multiplayer-sync of jame581/GodotPrompter.

  • SKILL.md
  • references/bandwidth-optimization.md
  • references/client-prediction.md
  • references/interpolation.md
  • references/lag-compensation.md

Open the folder on GitHubat commit 1e7d79d

Compare with similar skills

Multiplayer Sync next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Multiplayer Sync compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Multiplayer Sync this skilljame581/GodotPrompter795—~2.7kAutomated safety check: PassMIT
Godot Admob App Openpoingstudios/godot-admob-plugin632—~1kAutomated safety check: PassMIT
Godot Admob Bannerpoingstudios/godot-admob-plugin632—~718Automated safety check: PassMIT
Godot Admob Get Startedpoingstudios/godot-admob-plugin632—~1kAutomated safety check: PassMIT
Godot Admob Interstitialpoingstudios/godot-admob-plugin632—~1.1kAutomated safety check: PassMIT
Godot Admob Native Overlaypoingstudios/godot-admob-plugin632—~1kAutomated safety check: PassMIT

Similar skills

  • Godot Admob App Open

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, show, and destroy App Open ads (shown on application startup or app resume) in GDScript and C.

    632 GitHub stars~1k tokensUpdated 7 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Banner

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, and destroy banner ads (AdView) using custom or adaptive sizes in GDScript and C.

    632 GitHub stars~718 tokensUpdated 7 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Get Started

    poingstudios/godot-admob-plugin

    Provides instructions to initialize the Godot AdMob SDK and configure user consent (UMP Flow) in GDScript and C.

    632 GitHub stars~1k tokensUpdated 7 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Interstitial

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, show, and destroy interstitial ads (full-screen image/text ads) in GDScript and C.

    632 GitHub stars~1.1k tokensUpdated 7 days ago
    Game DevelopmentAuto-check passed
  • Godot Admob Native Overlay

    poingstudios/godot-admob-plugin

    Provides instructions to implement, load, show, and destroy Native Overlay ads (customized/native-looking Control node template overlays) in GDScript and C.

    632 GitHub stars~1k tokensUpdated 7 days ago
    Game DevelopmentAuto-check passed
  • Apply the Stage Tamagotchi Godot C development method and code style when working in apps/stage-tamagotchi-kirie or its migration predecessor, engines/stage-tamagotchi-godot.

    50k GitHub stars~677 tokensUpdated today
    Game DevelopmentAuto-check passed

More from jame581/GodotPrompter

All 58 skills in this repo
  • Godot 2D Essentials

    jame581/GodotPrompter

    Covers Godot 4.3+ 2D systems with GDScript and C# examples: canvas layers, draw order, TileMaps, parallax, lights and shadows, particles and custom drawing.

    795 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Godot 3D Essentials

    jame581/GodotPrompter

    Covers Godot 4.3+ 3D systems such as materials, lighting, shadows, environment, global illumination, fog, LOD, occlusion culling and decals, with GDScript first and C# second.

    795 GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Godot Ability System

    jame581/GodotPrompter

    Builds a data-driven ability system in Godot 4 from Resources and a component node, with cooldowns, buffs, stat modifiers, gameplay tags and HUD binding.

    795 GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Godot Addon Development

    jame581/GodotPrompter

    Covers Godot 4.3+ editor plugins: plugin folders, @tool scripts, the EditorPlugin lifecycle, custom inspectors, dock panels and gizmos, in GDScript and C#.

    795 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Godot AI Navigation

    jame581/GodotPrompter

    Covers pathfinding and enemy movement in Godot 4.3 and later: navigation regions, NavigationAgent nodes, steering, behavior trees and patrol routes.

    795 GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed
  • Godot Animation System

    jame581/GodotPrompter

    Covers animation in Godot 4.3 and later: AnimationPlayer basics, AnimationTree blend trees and state machines, sprite animation, skeleton IK and code-driven motion.

    795 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Multiplayer Sync

What does Multiplayer Sync do?

A skill your agent uses when synchronizing multiplayer state — MultiplayerSynchronizer, interpolation, prediction, and lag compensation. Multiplayer Sync is an agent skill from jame581/GodotPrompter.

When should I use Multiplayer Sync?

Multiplayer Sync fits situations like: synchronizing multiplayer state — MultiplayerSynchronizer; lag compensation.

How do I install Multiplayer Sync in Claude Code?

Run `npx skills add jame581/GodotPrompter --skill multiplayer-sync -a claude-code`. Or copy the skill folder (skills/multiplayer-sync in jame581/GodotPrompter) into .claude/skills/multiplayer-sync in your project. Claude Code loads it when a task matches its description.

How do I install Multiplayer Sync in Codex?

Run `npx skills add jame581/GodotPrompter --skill multiplayer-sync -a codex`. Or copy the skill folder (skills/multiplayer-sync in jame581/GodotPrompter) into .agents/skills/multiplayer-sync in your project. Codex loads it when a task matches its description.

Can I use Multiplayer Sync in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jame581/GodotPrompter --skill multiplayer-sync -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/multiplayer-sync, .gemini/skills/multiplayer-sync, .github/skills/multiplayer-sync and .opencode/skills/multiplayer-sync in your project.

What does Multiplayer Sync need to run?

SKILL.md names no scripts, command-line tools or credentials: Multiplayer Sync is instructions for the agent only.

Does Multiplayer Sync access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Multiplayer Sync safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Multiplayer Sync use?

Multiplayer Sync is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Multiplayer Sync use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.7k tokens, read only when the agent opens those files.

What are the alternatives to Multiplayer Sync?

Skills that share tags, products or a category with Multiplayer Sync: Godot Admob App Open (poingstudios/godot-admob-plugin, 632 stars), Godot Admob Banner (poingstudios/godot-admob-plugin, 632 stars), Godot Admob Get Started (poingstudios/godot-admob-plugin, 632 stars) and Godot Admob Interstitial (poingstudios/godot-admob-plugin, 632 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Multiplayer Sync?

jame581 (a GitHub user) maintains it in jame581/GodotPrompter, which has 795 GitHub stars. The repository holds 58 skills in this directory. The repository was last updated on October 6, 2026.

Source: jame581/GodotPrompter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.