multiplayer-sync

Synchronize Decentraland scene state across players using syncEntity CRDTs and MessageBus events.

Updated Sep 11, 2026
One-click install
npx skills add https://github.com/ansonj-dev/neon-reverse --skill multiplayer-sync-ansonj-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: multiplayer-sync
Source: https://github.com/ansonj-dev/neon-reverse/tree/main/agent/skills/multiplayer-sync
Command: npx skills add https://github.com/ansonj-dev/neon-reverse --skill multiplayer-sync-ansonj-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @dcl/sdk, and includes references (resource) components.

What problem does it solve? In Decentraland SDK7, each player runs the scene locally, so changes one player makes to the world are invisible to others by default. This Skill provides the patterns to keep shared world state consistent across all players without running a server. ## Core Features & Use Cases - Shared State with syncEntity: Synchronize entities and custom components via CRDTs so late joiners see current state, using stable enum sync IDs for singletons and auto IDs for player-spawned entities. - Ephemeral Events with MessageBus: Broadcast fire-and-forget events like sounds, chat, or hit effects, plus a binary sendBinary path for high-frequency payloads. - Server Communication: Patterns for fetch, signedFetch, and WebSocket connections with reconnection, heartbeat, and typed JSON message conventions. - Use Case: Build a cooperative puzzle game where door states, switches, and scoreboards stay consistent for every player, while transient effects like particle triggers are sent as MessageBus events. ## Quick Start Add multiplayer synchronization to my Decentraland scene so the door entity's Transform stays in sync for all players using syncEntity.

Frequently Asked Questions about multiplayer-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync entities between players in Decentraland SDK7?

Call syncEntity from @dcl/sdk/network with the entity and an array of component IDs to replicate, such as Transform.componentId. Predefined entities should get a unique numeric sync ID from an enum so state persists consistently across clients.

What is the difference between syncEntity and MessageBus in Decentraland?

syncEntity keeps persistent shared state via CRDTs so late joiners receive current values, while MessageBus sends fire-and-forget events that late joiners miss. Use syncEntity for doors and scoreboards, MessageBus for sounds and transient effects.

Why is my synced entity not appearing for other players?

Common causes include calling syncEntity at module top-level instead of inside main(), reusing a sync ID after removeEntity in the same frame, or reading state before isStateSyncronized returns true. Short-lived auto-ID entities can also fail to reconcile on remote clients.

Can I use MessageBus in an authoritative-server Decentraland scene?

MessageBus is client-only and fails on the headless server runtime with a not-implemented error. In authoritative-server scenes, construct MessageBus only inside the client branch guarded by an isServer() check.

When should I use WebSocket instead of syncEntity for multiplayer?

Use WebSocket when you need continuous real-time communication with your own server, server-side validation, or anti-cheat. syncEntity suits decentralized shared objects where any player may mutate state, while competitive games benefit from an authoritative server.