multiplayer-sync

Implements peer-to-peer multiplayer state synchronization in Decentraland scenes using CRDT-based syncEntity and MessageBus.

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/stom66/dcl-bowling --skill multiplayer-sync-stom66
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: multiplayer-sync
Source: https://github.com/stom66/dcl-bowling/tree/main/agent/skills/multiplayer-sync
Command: npx skills add https://github.com/stom66/dcl-bowling --skill multiplayer-sync-stom66

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Decentraland scenes run locally in each player's explorer, so environment changes are not shared between players by default. This Skill provides the patterns to synchronize scene state across players without running a server, using the SDK7 CRDT networking layer. ## Core Features & Use Cases - syncEntity State Sync: Share persistent world state (doors, scoreboards, elevators) across all players including late joiners, with stable enum-based sync IDs and custom synced components. - MessageBus Events: Broadcast fire-and-forget events like chat messages, sound effects, and particle triggers to players currently in the scene, including a binary transport for high-frequency payloads. - Decision Guidance: A strategy table and decision flow for choosing between syncEntity, MessageBus, fetch/signedFetch, and WebSocket based on persistence and authority needs. - Use Case: Build a shared door that any player can open, where late joiners immediately see its current state, by calling syncEntity with a stable enum sync ID on the door entity. ## Quick Start Add multiplayer synchronization to my Decentraland scene so all players see the same shared object state 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, an array of component IDs to sync, and an optional numeric sync ID. Predefined entities should use unique enum-based sync IDs so state persists for late joiners.

What is the difference between syncEntity and MessageBus in Decentraland?▼

syncEntity keeps persistent shared state that late joiners receive, using CRDT last-write-wins conflict resolution. MessageBus is fire-and-forget messaging where late joiners miss past messages, suited for transient effects like sounds or chat.

Why is my synced entity not appearing for other players?▼

Common causes include calling syncEntity at module top-level instead of inside main(), reusing an auto-generated ID for a repeatedly recreated singleton, or reading state before isStateSyncronized returns true. Assign stable enum sync IDs to singletons.

Can I use MessageBus in a Decentraland authoritative server scene?▼

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

When should I use WebSocket instead of syncEntity in Decentraland?▼

Use WebSocket when you need continuous real-time bidirectional communication with your own server, such as live game servers or server-side validation. syncEntity covers shared world state without any server.