Hasty Briefsbeta

Bilingual

How We Synchronized Editing for Rec Room's Multiplayer Scripting System

4 hours ago
  • #multiplayer-synchronization
  • #game-development
  • #realtime-scripting
  • Circuits is Rec Room's multiplayer-synchronized realtime scripting system for building interactive experiences.
  • Circuits V1 was built quickly but had limitations due to high memory and CPU usage from thousands of game objects.
  • Circuits V2 was a rewrite that reduced complexity by treating all Circuits as a single game object.
  • The 'In-Memory Database' approach caused synchronization issues with cross-object operations.
  • The solution was inspired by Redux, using a single global state and reducer functions for changes.
  • The 'action funnel' ensures serializable isolation, preventing race conditions by processing actions one-by-one.
  • Join-in-progress was solved by periodically sending snapshots of the latest save data.
  • Compression and splitting techniques were used to handle large actions and bandwidth concerns.
  • Logging and automation were simplified due to the single code path, aiding debugging and testing.
  • Social solutions were prioritized over complex technology for issues like master disconnects and rapid edits.
  • The system's simplicity led to a low defect rate and ease of maintenance, even for new team members.